7 ms·
I'm not going to say that GraphQL is bad today, but If it returns error messages with a 200 OK status, then it's not restful at all ( https://github.com/graphq
by SideburnsOfDoom 8y ago
I'm not going to say that GraphQL is bad today, but
If it returns error messages with a 200 OK status, then it's not restful at all ( https://github.com/graphql/graphiql/issues/88 https://github.com/graphql/graphiql/issues/88 )
- Garvey 8y agoIsn't that specific to graphiql rather than GraphQL itself? From reading the issue it seems graphiql is expecting it in that format, and the actual status code to return is down to the developer.
- bdcravens 8y agoIsn't that easy to do with REST as well however?
- SideburnsOfDoom 8y agoAn error with a 200 OK status code is pretty clearly not what you _should_ do in REST.
- bdcravens 8y agoNo doubt, that's bad design. However, if you try-catch the code and return a custom error message, many frameworks would return a 200 by default if you don't explicitly set the status code.