I keep coming across cool tech based on GraphQL. For example this GraphQL Curl with autocomplete . Does anyone here use graphQL in production ?
I wouldn't adopt any technology for my business because it's cool. Learning something new is putting speed bumps in your path.
With that said, I've been using GraphQL in production at my day job for 2 years. It's great for gluing together multiple REST APIs. You'll find a lot of client side developers love it too. There's a steep learning curve so make sure everyone is onboard with changing how they approach API design and development.
I think it depends on your data model. If you have a lot of entities and complex relationship between them, GraphQL make sense. If your app is more like a chat app with fewer entities, then it might not make sense.
My co-founder Derric wrote a very popular blog post on this topic:
(if you search for graphql vs rest on google, it is on page 1, since it is referenced a lot.)
https://www.moesif.com/blog/technical/graphql/REST-vs-GraphQL-APIs-the-good-the-bad-the-ugly/
I've just launched my first SaaS which is a GraphQL API for movies.
https://moviegraph.io
Initially I planned on just using REST endpoints, then I planned for a combination but eventually decided to just ship with a GQL endpoint. This was for 2 reasons:
There are hidden security and scalability risks when it comes to using GQL, too. In my case GQL is a starting point... if the project gets any traction I'll likely shift focus away from it.
I’m using GraphQL for both work and side-projects. Makes sense if:
From what I understand it's best used in cases where latency and network speed are a primary concern, such as for mobile apps. It's great for cutting down network requests by loading multiple resources in a single request. This is in contrast to REST where you typically have endpoints setup to handle different resources, so querying multiple things generally requires multiple requests.
I've not used GraphQL much, but that's my rough understanding of the core benefits.
I use it for my side projects. Go for it
I am using for my app. Specific use cases:
GraphQL is better than REST in pretty much every dimension except for set up time and learning curve. It's a big departure from REST. There's a lot to learn and a lot of boilerplate code to write before you can even start writing simple queries against it. I don't like using it for indie hacking because it's much slower to get a functional prototype using GraphQL than going with REST.
This comment was deleted 4 years ago