3 ms·
Is this really an issue? I mean, what's interesting isn't what is possible, but what people actually do. Normally, you have an API and 2-3 different clients.
by k__ 7y ago
Is this really an issue?
I mean, what's interesting isn't what is possible, but what people actually do.
Normally, you have an API and 2-3 different clients. While the front-end devs define the queries while they are creating these clienst, once done, they will use these exact queries for most of the time, so you can optimize for them.
- virtualwhys 7y ago> Is this really an issue? Think of an "advanced search" feature on the client that allows for creating queries of arbitrary complexity (basically, a client-side query builder). The user could certainly go overboard I'd imagine.
- eloff 7y agoThat problem exists with any backend. If you can't optimize it properly in the backend, restrict the UI.
- dmitriid 7y agoThat's why GraphQL is probably okay when your backend and your clients are developed by you. IMO, REST APIs are a better fit if you open APIs to the whole world. Then, at least, you have a limited set of queries that you can optimise and plan for.