Open taobojlen opened 1 year ago
Hrm, interesting that setting it to Void
fixes the issue.
The main issue here is that input_mutation
by default creates a union of its return type with OperationInfo
, which will be returned when a django error happens. You can avoid that by passing handle_django_errors=False
to the input_mutation
I'm currently merging this lib into strawberry-graphql-django, and in there I'll make that option opt-in instead of opt-out
I have a mutation that looks something like
This throws an exception when I try to generate my schema:
It looks like the issue occurs in
get_possible_types
, which doesn't handle a None return type. It's possible to work around this by setting the return type annotation toVoid._scalar_definition
instead ofNone
, but that feels like a hack!