Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v2] Anonymous operation definitions with variable definitions do not parse #165

Closed
Yogu opened this issue Jul 2, 2018 · 1 comment
Closed

Comments

@Yogu
Copy link

Yogu commented Jul 2, 2018

Affects 2.0.0-alpha-3.

query($id: ID!) {
  test(id: $id) {
    id
  }
}

This should be a valid GraphQL document, but generates the error <definition> expected, got 'query'. graphql-js parses this just fine. It looks fine in the antlr definition of graphql-java, but maybe it's a bug there anyway.

jimkyndemeyer added a commit that referenced this issue Jul 2, 2018
#164 and #165)

- Fixed lexer keyword rule which return token as name for anonymous query with variables
- The grammar selectively allows keywords as identifiers, so removed lexer keyword rules
@jimkyndemeyer
Copy link
Collaborator

Thanks for this.

The fix will be in the next alpha.

@jimkyndemeyer jimkyndemeyer changed the title Anonymous operation definitions with variable definitions do not parse [v2] Anonymous operation definitions with variable definitions do not parse Jul 2, 2018
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

No branches or pull requests

2 participants