Open HonzaBejvl opened 2 years ago
We've the same problem with thrown exceptions handled with IErrorFilter. We can transform the exception for GraphQL, but the Query has non nullable return defined and strawberry shake will cause the same exception afterwards in our clients.
Is there an existing issue for this?
Describe the bug
I'm in the situation where shake is not able parse the response and throws.
Steps to reproduce
I have created a repro repo where you can find my query that causes the problem.
I have a
Listing
.Listing
is implemented byListingSimple
andProjekt
.ListingSimple
is implemented byOffer
andAuction
.Project
has a fieldlistings
that is selection wrapper around[ListingSimple!]!
.I also have a query
listing(..): [Listing]!
where I would like to query all project listings. But it seems that Shake threats all Listings the same - I mean that if I query for non nullable field in "child project listings" it also nullchecks for that field in the "parent project listing" even though I did not query for that particular field (it is not present in the response) so an ArgumentNullException is thrown.Relevant log output
Additional Context?
Note: I'm 100% sure that there is no null value in non-nullable field.
Product
Strawberry Shake
Version
12.12.1