Jump to content

So I recently I read a bit about GraphQL and I proposed it at my company. We decided to try it on a medium-sized project we had. The impressions were mixed. I, working on the backend, found it very easy to work with it. Adding new fields to types was really easy and if I wanted to add a new computed field to a model, I had to edit just one file and write a single resolver and it was accessible everywhere this existed without having to make sure I include it in every endpoint. On the other hand, the frontend guys were not really that positive :P What I saw is that they had a bit of a hard time writing the queries and mutations. To be honest, I also found it kinda cumbersome that a lot of it had to be written by hand making it very error prone. However, I did not really go very deep in the front-end things so we probably (make that definitely actually) were doing things wrong there. What is your opinion on GraphQL, if you have used it. If not, would you want to try it?

MacBook Pro 15' 2018 (Pretty much the only system I use)

Link to comment
https://linustechtips.com/topic/1098282-thoughts-on-graphql/
Share on other sites

Link to post
Share on other sites

I'd definitely use it if I need to, played around with it a bit before. Thing is, only use it when you really need to, and for parts that you really need to. Complete migration to GraphQL is pointless IMO. Classic REST (and friends) are easier on everyone, and I don't want to overcomplicate my life. GraphQL makes sense when you have a situation of data arriving on it's own being much more efficient than polling it, which probably hits the database every time. Difficulty of coding and maintaining included in that efficiency. GraphQL is not supposed to be any easier, it's supposed to save your world when you have that specific resource problem. I have a really good spot (textbook almost) place that GraphQL would insert itself into easily where I work at, but it's not a problem yet, and likely will never be judging by the load, unless management magically decides "we have 3 VM's too many, we're not paying for that" and we have to jinx the load balancers that also do caching. Not really worth all that effort. The time developers spend implementing that will be time wasted not doing features (opportunity cost).

 

This is all business perspective though. It's usually easier to throw money at a problem until it becomes too much money, or too much pain for what it's worth. The enthusiast in me does get pretty mad about it and I kinda wish I'd get to use things like GraphQL more often. But it is how it is. Better yet, I could leave for another company that actually does or needs something innovative. Gotta find one first though. Good on you for giving it a go. I just wonder how much do you think you've gained from it?

Link to comment
https://linustechtips.com/topic/1098282-thoughts-on-graphql/#findComment-12843040
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×