Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
C0D4681384yIt's a "depends" kind of thing, hmm like most things these days really.
GraphQL comes in handy if you need to retrieve a hell of a lot data in a dynamic means, where as traditional REST is hitting a number of endpoints based on what you are looking for instead, it feels more structured rather then just querying an api.
IMO, it's just another buzzword to flex being "modern" with your stack. -
@C0D4 thanks for the answer, the CTO in my company was talking to me about incorporating graph ql in future projects...
-
Voxera115854y@souvikpunk if you really have a use case for it sure.
But before considering a new tech or protocol, read up on what its pros and cons are and check if your customers will need it.
We had such a thing with A/B testing which every one asked for but we as devs where hesitant to due to it requiring quite a lit of work and our prediction was it would not be used.
Finally we did add some features.
About 2 years later we happened to notice that the menu item opening the A/B testing gui was not working due to a mismatch in name. And looking back it had been so for a few months without a single complaint from any of our 1000 customers. So our prediction on how customers where going to use it was true, never.
It was a seller and buyer feature, not a user feature since the actual users never got the time allocated to do multiple versions and test, the customers just did not want to put the extra time in, but the buyer had read about it and decided that they “needed” this feature ;) -
GraphQL implementations requires significative work on the backend side (you need to implement a middleware server that will do the actual rest/db operations based on the gql queries).
If you have a lot of entities linked together in a complex fashion AND your front end is complex as well, the GraphQL might be worth a shot.
Also : https://www.howtographql.com -
@react-guy so you mean to say that i should only use graphQl while working on a big complex app right? Not suitable for small to medium sized apps right?
-
https://www.prisma.io/graphql
GraphQL with Database & Prisma | Next-Generation ORM for SQL ... -
I have implemented GraphQL into my website a while ago and I can't say I want to go back...
If you do it right, it's a lot easier to maintain and consume.
Additionally, depending on how you implement it, it can save a decent amount of requests as well. -
Lyniven45594yI used it with laravel, nestjs (yay) and prisma, so far, I'd say yes, use it if you're project is somewhat big /
Related Rants
Hey guys, is graphQl worth learning? Rest API is so easy to work with...
rant
graphql
rest api