3 ms·
> We could write a one-shot resolver that implements the entire query. [...] This brings up the meta-question about why use GraphQL in the first place [...]. T
by SebastianKra 3y ago
> We could write a one-shot resolver that implements the entire query. [...] This brings up the meta-question about why use GraphQL in the first place [...].
This seems like a reasonable approach to me. Give downstream-developers the opportunity to work unobstructed, then observe which queries are slow / heavily used, and implement optimised resolvers for just these cases.
In the worst case, you might not save any work on your end, but at least teams that depend on your api are never blocked from iterating.
- throwaway2990 3y agoOr just stop separating front end and backend. The worst companies to work for are the ones who separate these 2 then try to patch it with junk like graphql.
- SebastianKra 3y agoWell, personally I have a bigger aversion to companies who hire dogmatic developers that discard an entire technology as junk, without even considering the scenarios in which you might prefer a horizontal separation of teams.