4 ms·
I learned about this recently and have never been more disgusted with a software design decision. Why??
by nerdponx 5y ago
I learned about this recently and have never been more disgusted with a software design decision. Why??
- OJFord 5y agoIt makes sense in a 'technically true but ugh' sort of way. The GQL server is saying it successfully executed that query, here is the response, it happens to contain an error. And in further fairness, I believe there can be multiple 'responses' within, some of which may be errors and others not. But still ugh, personally I'd rather have resource-oriented semantic HTTP (read: 'REST' without triggering empassioned debate) just for that. I don't think adds enough over HTTP to warrant this sort of weirdness (sibling comment describes it as the next layer) - if it were just an HTTP alternative sitting on TCP fine, and I'm sure it would happily not have a top-level status code (or a more meaningful one) itself anyway.
- derefr 5y ago> and I'm sure it would happily not have a top-level status code (or a more meaningful one) itself anyway Fun thing to learn about: WebDAV introduced the HTTP 207 "Multi-Status" response status, for precisely the case where the response is actually a multi-response envelope. https://httpstatuses.com/207 https://httpstatuses.com/207 I often feel that the extra methods and features introduced by WebDAV would be usefully generalized to other analogous use-cases, like GraphQL. But then I recall that most of the WebDAV-specific stuff specifies XML-based request/response message formats, and quickly give up on the idea of any modern programmer doing it as a cool hack. Can't have "cool hack" and "XML" in the same sentence, after all ;)