Closed PetrShchukin closed 4 years ago
I've just noticed in graphene, that if a model has a non-null field and we don't provide that field, we will get 200 status along with an error 'not-null violation'. GraphQLError returns 200 status as well. It seems that's in entire django graphl implementation, we can't rely only on a status here.
When there is no a jwt token or token is invalid, I've got 200 status from server. That's an issue, it should return 401 status, we can't every time check a payload in a successful response. I've seen the same topic here https://github.com/flavors/django-graphql-jwt/issues/68, but django-graphql-extensions doesn't allow to change a response status. I understand that there is no standards but in common sense if I haven't got data that's not 200. Following your logic graphene should return 200 as well when a query isn't correct. But it returns 400. If there is any way how to implement 401 status code please let me know. For me that's a blocker of using django-graphql-jwt for prod projects.