Skip to content

fix(lexers): match whole GraphQL declaration keywords - #1513

Merged
github-actions[bot] merged 1 commit into
alecthomas:masterfrom
yxshee:fix/graphql-declaration-prefixes-nov19
Nov 19, 2026
Merged

github-actions[bot] merged 1 commit into
alecthomas:masterfrom
yxshee:fix/graphql-declaration-prefixes-nov19

Conversation

@yxshee

@yxshee yxshee commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

The GraphQL lexer splits field names beginning with a declaration keyword. Here typeName matches keyword type and class Name, and online matches keyword on and property line.

query { typeName online ...Details }
fragment Details on Query { id }

These keywords now match the full name. There is also a separate rule for ... to allow fragment spreads without a space. The fixture covers both keyword rules and a spread followed immediately by the fragment name.

--- FAIL: TestLexers/GraphQL/testdata/graphql.actual

bit -f test, bit -f lint, bit -f check-generated and go test -count=1 ./... all pass.

@github-actions
github-actions Bot enabled auto-merge (squash) November 19, 2026 11:19
@github-actions
github-actions Bot merged commit 33f5b05 into alecthomas:master Nov 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant