Dgraph admin have different response patterns

This is a minor issue / feature request

So I was in the process of building CI that verifies the provided GraphQL Schema against dgraph and updates it. The endpoint /admin/schema always reponds with status 200 no matter the outcome of the requests, and only contains the response json field errors if an actual error happened. The /admin/schema/validate endpoint always returns the results inside the error field. The outcome of the action here can only be observed via the status code of the response.

This is by default in GraphQL Spec… Error handling in GraphQL does not take into account the HTTP standard. So it will always be 200.

1 Like