3 ms·
My problem with graphql always comes down to permissions and performance. I feel like we went through the thought process of: okay, front ends are smart enough
by ralusek 6y ago
My problem with graphql always comes down to permissions and performance.
I feel like we went through the thought process of: okay, front ends are smart enough to ask for the data that they want, so why not just let them structure their own queries? But my problem is, the only time a client is smart and and to just ask for whatever they want us if I'm building an admin application, otherwise, all sorts of access control needs to be added to various levels of most queries, something I've never felt as though GraphQL handles well.
Then there's the performance stuff, hitting caches or doing joins, it's much harder to make a GraphQL backend know when it can do these things, short of simple cache lookups by very limited keys.
With REST, I'm somewhere in the middle. I'm saying, okay, these are the resources, and these are the actions. You might get a little more or a little less data than you wanted with your response, but I know exactly what you're getting, can optimize it, and test the shit out of it.
I'm by no means resistant to new technology, I have just never worked on a project that avoided these pitfalls.