GraphQL vs. REST APIs: a complete guide
airplane.dev
GraphQL vs. REST APIs: a complete guide
1–10 of 103 posts
Re: GraphQL vs. REST APIs: a complete guide
#2Re: GraphQL vs. REST APIs: a complete guide
#3Re: GraphQL vs. REST APIs: a complete guide
#4Just like OOP vs FP. REST is OOP (you start with resource), Graphql deals with function (query and mutation).
Re: GraphQL vs. REST APIs: a complete guide
#5edit: more usefully, you need to be really careful w/ your GraphQL end points because they are being access in an untrusted computing environment:
https://intercoolerjs.org/2016/02/17/api-churn-vs-security.h...
my understanding is that facebook whitelists their graphql queries but, last I looked, I didn't see security getting much attention around it...
Re: GraphQL vs. REST APIs: a complete guide
#6Just like OOP vs FP. REST is OOP (you start with resource), Graphql deals with function (query and mutation).
Re: GraphQL vs. REST APIs: a complete guide
#7Sparse field sets / compound documents are nothing new and I'd argue its easy to overlook that there's no magic in the backend for graphql either.
Re: GraphQL vs. REST APIs: a complete guide
#8Re: GraphQL vs. REST APIs: a complete guide
#9- REST/Hypermedia when you're actually building a website (not app) and your "site" is a state machine
- OpenAPI when you expose and API to 3rd parties
- Isomorphic TypeScript APIs when you're using TS on both backend and frontend [0]
- GraphQL when the frontend needs to talk to an API layer provided by different teams
- OpenAPI when one backend talks to another backend
- gRPC might be an option, but most teams don't need it
[0]: https://wundergraph.com/blog/isomorphic_typescript_apis_end_...
Re: GraphQL vs. REST APIs: a complete guide
#10Here's how you do it: - REST/Hypermedia when you're actually building a website (not app) and your "site" is a state machine - OpenAPI when you expose and API to 3rd parties - Isomorphic TypeScript APIs when you're using TS on both backend and frontend [0] - GraphQL when the frontend needs to talk to an API layer provided by different teams - OpenAPI when one backend talks to another backend - gRPC might be an option…