I'm able to get the behavior I want by wrapping payload union in DjangoMutationBase#resolve_type with StrawberryList if the original resolved type is an instance of StrawberryList, but I'm not certain it's the correct solution.
I'm still quite new to Strawberry and GraphQL, so apologies in advance if I'm using the API incorrectly.
Upvote & Fund
We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.
Describe the Bug
In my app, I would like to have something like:
This generates a mutation with schema:
I expect this to have a schema of:
because if
handle_django_errors
is removed, the mutation has schema:I'm able to get the behavior I want by wrapping payload union in
DjangoMutationBase#resolve_type
withStrawberryList
if the original resolved type is an instance ofStrawberryList
, but I'm not certain it's the correct solution.I'm still quite new to Strawberry and GraphQL, so apologies in advance if I'm using the API incorrectly.
Upvote & Fund