Skip to content

Pop type state when encountering punctuation for graphql - #1210

Merged
alecthomas merged 1 commit into
alecthomas:masterfrom
frodi-karlsson:graphql/first-property-classification
Feb 1, 2026
Merged

alecthomas merged 1 commit into
alecthomas:masterfrom
frodi-karlsson:graphql/first-property-classification

Conversation

@frodi-karlsson

@frodi-karlsson frodi-karlsson commented Feb 1, 2026 •

Copy link
Copy Markdown
Contributor

Previously, something like query \{ a, b \} would have a resolve as a NameClass. We need to pop out of the type state when we encounter that {

I added that simple example in graphql.actual locally for finding the bug, but reverted as it is covered by other cases (otherField, etc)

Although just { would cover the actual issue, I thought it'd be best to be more open-ended, which handles all punctuation that might reasonably follow a type reference.

fixes #1084

Previously, something like `query { a, b }` would have a resolve as a NameClass. We need to pop out of the type state when we encounter that {

fixes alecthomas#1084
@alecthomas
alecthomas merged commit 17e5911 into alecthomas:master Feb 1, 2026
2 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.

Bug in graphql lexer

2 participants

⌂ 换网址