-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Issue Using Fragments on Union Types #399
Comments
I ran into this as well, and I think the root issue has to do with fragment usage. The above query, with the fragment removed, does seem to work: query {
Q {
__typename
... on A {
a
}
... on B {
b
}
}
} |
I've found the issue can be resolved (though incorrectly) by omitting the following lines. Lines 62 to 64 in 5c870a4
It seems to me that a fragment on a union isn't truly supported. (edit: a fragment on a union appears unsupported, but if the fragment is on a common interface over the union type, this will work as expected) This is a very superficial look into this that may help someone with more knowledge understand the issue quickly. When I have some time, I may look into it further as we really like this tool so far, but this bug is a showstopper unfortunately. |
Following up on this, I see a related remark in pull request #335:
@lwc Would you mind weighing-in on this issue, your comment seems to suggest there's something fundamentally wrong with returning a list of heterogeneous types without an common interface. I don't see why, but maybe I'm missing something. |
Expected Behaviour
Response JSON
Actual Behavior
Actual Response JSON
Minimal graphql.schema and models to reproduce
schema
Query
Resolver
Description
I want to get for Expected Behaviour json when client request query.
But I can't receive Expected Behaviour json. So, It is not exists
"a": "1"
json field.Please tell me if there is a solution on this.
The text was updated successfully, but these errors were encountered: