graphql-php icon indicating copy to clipboard operation
graphql-php copied to clipboard

Lexer wrong location when multiline comments

Open olivernybroe opened this issue 3 years ago • 1 comments

When using the lexer with a schema that has a multiline comments the location is wrong.

Taken the following schema

"""
testing
"""
scalar something

It ends up saying that the name token scalar is on line 2.

olivernybroe avatar Jun 16 '22 11:06 olivernybroe

Can you provide a pull request with a failing test case? The issue might be with the lexer, but I think a test for this would fit better with https://github.com/webonyx/graphql-php/blob/e8098fae49e2a007f389aa838796c6c154138744/tests/Language/SchemaParserTest.php#L166.

spawnia avatar Jun 17 '22 10:06 spawnia

Fixed with https://github.com/webonyx/graphql-php/releases/tag/v15.11.1

spawnia avatar Mar 11 '24 10:03 spawnia