-
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
Apply type condition in inline fragments to fix panic when using inline fragments with interfaces #816
Apply type condition in inline fragments to fix panic when using inline fragments with interfaces #816
Conversation
(Converting to draft to fix test failures and add a new tests making sure this doesn't regress) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LukasKalbertodt thanks for the effort! ❤️
You've changed the async_await.rs
file, so fixed the async resolution. But there is still a sync resolution which behaves the old way. It would be nice to fix stuff there too.
This fixes a panic when using inline fragments with interfaces (graphql-rust#815)
`type_name` was already forwarded to `QueryT`, so I guess `concrete_type_name` should be forwarded as well. `RootNode` is an "object" anyway and those should implement the method.
f8700f0
to
9d8f2a3
Compare
9d8f2a3
to
4c9071c
Compare
Sorry for opening the PR without running the test. Now it seems to be fine. I fixed it for the sync code, too. And I added a test. Let me know if I can improve anything! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LukasKalbertodt Yay! Thanks! Seems legit!
Thanks for merging and for this amazing response time! |
Fixes #815
Note that I was completely unfamiliar with the code and am still unsure if this is the proper way to solve the problem. It works for me. Let me know if I have to change more stuff, if I should fix the bug at a different place in code or whether I should change anything else.
Thanks!