Open tokr-bit opened 1 month ago
I propose to introduce a new OperationMessage.kind value: ObjectDoesNotExist.
OperationMessage.kind
ObjectDoesNotExist
If an object does not exist, Django raises an ObjectDoesNotExist-exception. This is translated into an OperationMessage with the kind field being set to OperationMessage.Kind.ERROR: https://github.com/strawberry-graphql/strawberry-django/blob/5f5aca95b4ef98d770ddc6c5c7aaa21b16607085/strawberry_django/mutations/fields.py#L53
OperationMessage
kind
OperationMessage.Kind.ERROR
However, as an API user, this value might be misleading. Therefore, I propose to introduce a new enum-Value, e.g. ObjectDoesNotExist.
I propose to introduce a new
OperationMessage.kind
value:ObjectDoesNotExist
.Feature Request Type
Description
If an object does not exist, Django raises an
ObjectDoesNotExist
-exception. This is translated into anOperationMessage
with thekind
field being set toOperationMessage.Kind.ERROR
: https://github.com/strawberry-graphql/strawberry-django/blob/5f5aca95b4ef98d770ddc6c5c7aaa21b16607085/strawberry_django/mutations/fields.py#L53However, as an API user, this value might be misleading. Therefore, I propose to introduce a new enum-Value, e.g.
ObjectDoesNotExist
.Upvote & Fund