I use gql whenever and as often as I can πŸ˜„

You got somewhat of a learning curve,
but in imho its a big time saver, takes a lot of the heavy lifting from building the standard rest api setup. Alot can be autogenerated, Its more or less language, db & framework agnostic and with gql you can more data with less queries written, fewer requests posted, easier caching and async behavior.
Its easy to get an overview of the db with native tools like graphiql that provides you with a clear and typed db-schema with no real config time.

So as u can tell I'am a fan, but there is also some tradeoffs. Such as quite different syntax, behavior and capabilities between providers.
For example if your backend is ruby and you use the gql provider Apollo you can use queries (kind of like a get) and mutations (post).
But if your setup is Node.js and prisma is the gql provider you get access to queries & mutations but also the type subscriptions (sort of a listener) which is awesome and very useful.

So like with any tech there is good and bad. But i don't think you would regret the time you spent if you learn graphQL no matter the usecase 😎

 

I used it in its early days. Definitely a good tool.

Configuring it via app code as a layer above the Postgres database using the GraphQL Ruby library was a really nice experience.

 

@Benhalpern we are using graphql, postgres db in dev.to. Is it correct or else?

 

Yes. It's awesome. If you have any questions, feel free to ask. this is my endpoint: server.communify.cc/ , you can explore it using this: github.com/skevy/graphiql-app

 

Update: I just exposed my endpoint with graphiql.. You can explore in-browser :) server.communify.cc/graphiql

Classic DEV Post from Nov 7 '18

Papers We Love!

Let's start a Papers We Love inspired discussion group here on DEV.to.

Amir Boroumand
Software Engineer specializing in backend Java development of web applications

Do you write code almost every day?

Join dev.to ❀️