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

Compiler errors at schema description #3376

Closed
marcotoniut opened this issue Mar 3, 2021 · 1 comment
Closed

Compiler errors at schema description #3376

marcotoniut opened this issue Mar 3, 2021 · 1 comment
Assignees

Comments

@marcotoniut
Copy link

While using another tool to generate the schema, I found out that the relay compiler errors whenever there's a string description above the topmost schema declaration.

"Description of the schema"
schema {
  query: RootQueryType
  mutation: RootMutationType
}

yields

ERROR:
Syntax Error: Expected "schema", found String "Description of the schema"
error Command failed with exit code 100.

After digging around for a bit, I found out that there has been a spec update to graphql which incorporates the ability to add descriptions at this level. Am I right to assume that relay is still catching up to it?
https://github.com/graphql/graphql-spec/pull/466/files

@captbaritone captbaritone self-assigned this Mar 3, 2021
@captbaritone
Copy link
Contributor

From what I can tell, this was added to graphql-js Feb 2nd and they have not yet cut a release that includes it. I have confirmed that this parses without error in the new Rust compiler.

If graphql-js cuts a new release with this change, and it's within the v15 range, you should be able to resolve this by upgrading your version of graphql-js since Relay expects it as a peer dependency.

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