We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In this page, there is an interactive example for playing with fragments.
availableProduce returns an array of Produce, which is an interface. Using fragments, we can match on only Fruit items.
availableProduce
Produce
Fruit
Here is the query:
{ mostPopularStall { availableProduce { ... on Fruit { name hasEdibleSeeds } } } }
Then the response is:
{ "data": { "mostPopularStall": { "availableProduce": [ { "name": "pear", "hasEdibleSeeds": false }, { "name": "blueberry", "hasEdibleSeeds": true }, { "name": "banana", "hasEdibleSeeds": false }, {}, {} ] } } }
Notice how the non-matching items (type Vegetable) have been returned as empty objects {}.
Vegetable
{}
This behavior makes sense, however I was unable to find this documented in the spec.
What is the correct behavior here?
Sorry in advance if I have simply missed the relevant section!
Related PR: fsprojects/FSharp.Data.GraphQL#458
The text was updated successfully, but these errors were encountered:
Dupe of #1080
Sorry, something went wrong.
No branches or pull requests
In this page, there is an interactive example for playing with fragments.
availableProduce
returns an array ofProduce
, which is an interface. Using fragments, we can match on onlyFruit
items.Here is the query:
Then the response is:
Notice how the non-matching items (type
Vegetable
) have been returned as empty objects{}
.This behavior makes sense, however I was unable to find this documented in the spec.
What is the correct behavior here?
Sorry in advance if I have simply missed the relevant section!
Related PR: fsprojects/FSharp.Data.GraphQL#458
The text was updated successfully, but these errors were encountered: