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

get-graphql-schema Relay Schema with commas for multiple inheritance separators rejected by FB Relay Compiler #21

Open
kguller opened this issue Apr 8, 2018 · 3 comments

Comments

@kguller
Copy link

kguller commented Apr 8, 2018

I am using a generated schema from Graph.Cool that has the User type implementing two interfaces: Node and AnonymousUser. This looks like standard multiple inheritance. The Relay Compiler rejects this, however if I use an ampersand it works (implements Node & AnonymousUser vs. implements Node, AnonymousUser). A change in the SDL spec seems to have caused the get-graphql-schema to fall out of date.

Reproduction
I'm able to reproduce this consistently

Expected behavior?
Commas should be converted to ampersands when listing inheritance references. FB Relay Team feedback confirms:

This is due to a change in the SDL spec that was implemented in graphql-js v0.13. While graphql-js can technically accept an option to enable legacy parsing, it is not exposed in relay-compiler.
The simplest way to make this work would be to make get-graphql-schema work with graphql-js v0.13

facebook/relay#2364

@vinicio
Copy link

vinicio commented May 4, 2018

Hi, @kguller!

Consider using https://github.com/graphql-cli/graphql-cli. It's more active and with a more recent version of graphql-js.

@kguller
Copy link
Author

kguller commented May 4, 2018

@vinicio thank you! Works perfectly!

@cancan101
Copy link

Hi, @kguller!

Consider using https://github.com/graphql-cli/graphql-cli. It's more active and with a more recent version of graphql-js.

What is the subcommand that is roughly comparable?

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

3 participants