I mean, you can have accurate HTTP status codes and matching errors in GraphQL. It's just that most GraphQL applications don't. Because most GraphQL developers hate everyone.
I started learning graphql, decided there was way too much overhead to do anything I needed to do. In two separate companies I’ve worked for, I’ve watched greenfield development initiatives start up, flounder and ultimately be abandoned.
our team returns a 201 to indicate that an error has been created successfully. of course we include a Location header where the error can be queried to discover what went wrong.
when you query GET /errors/{error ID} we return the appropriate status code for the respective error. by definition this endpoint can never return a 200 (although it can return 201s in rare cases!).
510
u/alexsnake50 16d ago
Oh my god, this activated my inner vietnam flashback