Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I agree with the majority of this with respect to simplicity in general, and only really take issue with this bit, about GraphQL:

> • Our various apps (user app, support app, Wave agent app, etc.) can mostly share one API, reducing complexity

This could of course be done with a RESTful API.

> • Composable query language allows clients to fetch exactly the data they need in a single packet roundtrip without needing to build a large number of special-purpose endpoints

This, too, can be done with a RESTful API. Two approaches which immediately spring to mind are passing desired items as query parameters or passing a template item as a query parameter or request body.

> • Eliminates bikeshedding over what counts as a RESTful API

This may actually be a benefit of GraphQL! There’re a ton of soi-disant ‘RESTful’ APIs which simply don’t follow REST principles at all (e.g.: ‘REST’ ≠ ‘JSON RPC’; also HATEOAS is hugely important, even when the hypermedia is in a non-HTML format such as JSON). But I also think that real REST really is a powerful framework for distributed computing. Sometimes the discussion really is bikeshedding, but sometimes it is a definition of terms.



> Two approaches which immediately spring to mind are passing desired items as query parameters or passing a template item as a query parameter or request body.

I've implemented this twice, you quickly end up at something resembling GraphQL after a couple of rounds of "iOS needs the the profile picture in two different sizes, dependent on native screen size, and with version 2 of the blurhash"

Might as well use GraphQL and get schemas, libraries for clients and servers and IDE support out of the box at that point. It's no panacea - many of the backend libraries were somewhat low quality last time I checked - but I wouldn't hesitate to use it if I had a somewhat complex main product served by multiple frontends following different UI guidelines.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: