-
Notifications
You must be signed in to change notification settings - Fork 428
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
Panic when using interfaces: Field homePlanet not found on type Some("Droid")
#815
Comments
@LukasKalbertodt yup, definitely a bug. The resolving mechanism shouldn't look for |
@tyranron Good to know! Thanks for the quick reply. Can I somehow help with fixing this bug? I'm unfamiliar with this codebase, but I could surely learn about it to fix the bug. Or are you already on it? :) |
@LukasKalbertodt PR are always welcome 👍 I don't have an opportunity to work on it at the moment. |
This fixes a panic when using inline fragments with interfaces (graphql-rust#815)
This fixes a panic when using inline fragments with interfaces (graphql-rust#815)
Reproducing
Using the current
master
(4ffd276). I am using the example from the docs ofgraphql_interface
:On my root query type I have a simple dummy resolver:
The generated schema is as expected. When running this query:
... everything works nicely. I get
{"data": {"characters": [{"id": "3"}, {"id": "7"} ] } }
back. However, when I query like this:This causes a panic! Specifically:
Stacktrace in my application:
This is a bug, right? I think the GraphQL spec allows these queries, even if not all objects are of that downcasted type. In either way, it shouldn't panic, right?
The text was updated successfully, but these errors were encountered: