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

Introspection fails when types implement multiple interfaces #434

Closed
Matt-Kantor-CK opened this issue Jun 14, 2018 · 1 comment
Closed
Labels
🌹 has-reproduction ❤ Has a reproduction in a codesandbox or single minimal repository

Comments

@Matt-Kantor-CK
Copy link

Matt-Kantor-CK commented Jun 14, 2018

Despite being valid, types like type FooBar implements IFoo, IBar cause the apollo-codegen introspect-schema command to blow up with a parser error (Unexpected Name). This was observed with apollo-codegen 0.19.1.

I created a small demo here: https://github.com/mkantor/demo-apollo-codegen-bug

@ghost ghost added the 🌹 has-reproduction ❤ Has a reproduction in a codesandbox or single minimal repository label Jun 14, 2018
@Matt-Kantor-CK
Copy link
Author

Matt-Kantor-CK commented Jul 4, 2018

I just took a closer look at the spec and it turns out that actually & is the official way to indicate that a type implements multiple interfaces.

However I see a lot of code in the wild using commas instead. I'm having trouble tracking down the history here, but would be curious if anyone has links where I can learn more. My guess would be that some tool(s) were based on an unofficial SDL grammar using comma before the official spec landed with &?

Anyway, this might not be a bug if this tool is only meant to support the official SDL grammar (& works as expected with apollo-codegen introspect-schema). Feel free to close this issue if that's the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌹 has-reproduction ❤ Has a reproduction in a codesandbox or single minimal repository
Projects
None yet
Development

No branches or pull requests

2 participants