5

Hey guys, is graphQl worth learning? Rest API is so easy to work with...

Comments
  • 2
  • 2
    @HitWRight that baloon reminds me of pennywise from IT :p
  • 1
    @souvikpunk it was supposed to be a pin, since the question also interests me. ;)
  • 5
    It'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.
  • 1
    @C0D4 thanks for the answer, the CTO in my company was talking to me about incorporating graph ql in future projects...
  • 1
  • 3
    @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 ;)
  • 0
    @Voxera thanks a pot for your answer :) i will keep that in mind
  • 3
    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
  • 1
    @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?
  • 2
    @souvikpunk exactly
  • 0
  • 3
    https://www.prisma.io/graphql
    GraphQL with Database & Prisma | Next-Generation ORM for SQL ...
  • 3
    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.
  • 1
    I used it with laravel, nestjs (yay) and prisma, so far, I'd say yes, use it if you're project is somewhat big /
Add Comment