3 ms·
Some time ago after realising how GraphQL (don't) use http code, I decided that I wouldn't use http code for business logic like everybody does, but let that re
by G4BB3R 6y ago
Some time ago after realising how GraphQL (don't) use http code, I decided that I wouldn't use http code for business logic like everybody does, but let that responsibility only to the webserver (not auth 401, not found 404, exception 500, and few others). Is that absurd? Should I reconsider going back?
- bmn__ 6y agoIt's not absurd. If you have tuits to spare, strive to be in compliance with the standards to your best ability. Do not just relegate error handling to code you will not touch. For example, status 422 is used for syntactically correct, but semantically invalid request bodies. Augment your graphql library or application code where appropriate. That way, you reap the benefits of interoperability. Being in compliance makes you a good Internet citizen in the eyes of your peers.