Skip to main content

Team,

When I execute a graphql api for few case the api is success and it returns the data.
But if we make any mistakes in constructing the query or some other error then that time in the response it has errors but it gives us 200 as API Status code. How can we distinguish success and failure APIs. 

Can‘t we find this from the API status code ?

I agree, a status 200 for an erronous query is not very helpful. I do the checks by looking whether the response JSON has the property “errors”.


Reply