You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
currently, because the line of code linked above is before the check if is_leaf_type(return_type), so long as Output = someScalarOrEnumType the mutation will return {"data": {"someMutationThatReturnsNone": None}.
Which I don't think is right.
Would appreciate your thoughts.
The text was updated successfully, but these errors were encountered:
errors as expected. Because the if is_non_null_type(return_type): will catch it first.
So maybe it should be enforced that Output class attributes are wrapped by graphene.NonNull in the Graphene library here.
But I guess that would mean that I will not be able to do what I want: create a CustomNullTypeScalar when I want a mutation to return None. There is nothing in the specs that I can find that prohibits returning something like: {"data": {"someMutationThatReturnsNone": None}.
Again would be interested in your thoughts @Cito 🙏
Reporting issues with GraphQL-core 3
I came across an issue that may be due to Graphene but the problem surfaces here.
I was writing a mutation which would raise an Error or return:
instead of something like:
I was happy that this worked:
until I realised that this would also work:
currently, because the line of code linked above is before the check
if is_leaf_type(return_type)
, so long asOutput = someScalarOrEnumType
the mutation will return{"data": {"someMutationThatReturnsNone": None}
.Which I don't think is right.
Would appreciate your thoughts.
The text was updated successfully, but these errors were encountered: