So you're still stuck using REST APIs? That's like persisting on riding a donkey when there's a brand new sports car parked just there. Allow me to...
For further actions, you may consider blocking this person and/or reporting abuse
I feel like GraphQL is usually way too much unnecessary complexity, both for server and client. Also, the advantage of REST is that it's not limited to JSON, and on web apps, using hypertext instead is sometimes amazing (check out HTMX).In typescript land I like trpc instead.
It's hard until you understand it better
What complexity ? What you don't know appears complex compared to what you do know. You can only judge complexity when you know both. Do you know both to judge ? Dare try it and you may find out that it's not as complex as you think ;)
And who said GraphQL only supports JSON ?
when I read the comment I almost didn't bother putting in time to learn graph ql, I mean, why would I if it only supported json??
thanks man,
I'll definitely take a crash course and continue learning it
As muneeb said, its hard only until u understand it. And trust me , it is way better than Rest. Read about Graphql federations and embrace the power of graphql with federation.
I use to be fond of Rest apis from past 8 years but graphql changed it and I have been using graphql from past 2 years. It is specially useful in modern era of Apps sdk development.
And in nocase I am saying that its one solution that fits all, but the more u learn graphql the more u ll get to know where and when to use it.
It forces you to think about your data and the relationships. Similar to designing a databases. REST you can just poop anything out to the consumer.
And that's s good thing to get your models straight !
DE>SDE
Why am I seeing a post of GraphQL like it's something new? It was the talk of the town when it was first released back in 2015. Now comparing an architecture with a specification is the most noobish thing I have seen.
REST is an architecture and GraphQL is a specification for data query. GraphQL has some of the main properties of REST.
It's like saying you're still using ICE engines? Start using strong hybrids.
The strength of REST was never what it used for querying or versioning.
Now, looking past that, why is the adoption of GraphQL not as much as that of the traditional approach? Unfortunately in the market you don't have much frontend resources who are tech savy as the backend resources. Mainly thanks to how beginner friendly frontend development is, how you can get away with a lot of things. So back when the adoption for JSON were being pitched, the frontend guys felt at home and the backend resources didn't find it too complicated either. Now GraphQL is something both has to learn, it's relatively easy to get it done with the backed resources but the frontend resources mostly struggles.
Now don't get me started on "FULL STACK", I rarely see a single person who is great at both, usually it's a backend resource doing frontend or a frontend resource doing backend.
OP has the same energy with people who say "I use Arch btw"
It's really simple, complex = graphql, else it's not really worth it to dabble around with graphql, and if junior devs, stay away.
My dude rode that clickbait title all the way to conclusion! 😂😆 On a more serious note, GraphQL came to the scene years ago and is not the new magic wand. The reason it has not gained as much traction as its hype may have a lot to do with its complexity. Complex is not always bad, but simple always wins.
If it works, don't fix it. Rest APIs are just fine for 99% of what I've done/plan to do. Don't get me wrong, I understand why GraphQL is so nice, but there's no reason for me (and arguably most other people) to bring in a new tool that fixes issues that don't yet exist.
Yes, I agree, if you build a new project then start with GraphQL. On existing projects, bringing new tech will need to be considered more on the impact it will get compared to the pain points it will solve. If everything is working fine then let it be, unless you want more headaches.
GraphQL really isn't a better alternative to REST. It is just a solution that is meant to solve a different set of problems. An API following RESTful conventions is more than likely enough for most use cases. What GraphQL excels at is when there are multiple data sources that you want to retrieve data from using an intuitive interface. But that would be the only scenario that I would consider it and that too matters only at a sufficient large enough scale since it has it's own performance implications. Adding an overhead to the server/client for a better DX isn't always a better solution.
You sound like a kid that just got a super cool new toy and only see the shiny parts ! that's cute :)
Lol. Seems like you just discovered it dazzled by the shiny object syndrome.
Brother, It's almost 4 years
GraphQL is good but the next question is should we replace REST with GraphQL in the existing project? If yes then how to do it with less impactful?
what a caption. awesome. :)
Intercept each argument in Graphql and authorise is quiet difficult and i am still struggling with that
Please is there any way forward with this, been trying to do this in nestjs, but am not just getting it
Yeah, i used it to make an API for my project