4 ms·
This is never the case, every time I use GQL, I always have to reshape the response. GQL only lets you declare the data you want, it does not let you declare th
by bern4444 4y ago
This is never the case, every time I use GQL, I always have to reshape the response. GQL only lets you declare the data you want, it does not let you declare the shape in which you want it.
- pandesal 4y agoThen that's a problem with the schema implementation and not necessarily a fault of GraphQL. The people implementing a GraphQL schema should be working very closely with the people working on the frontend and put a lot of importance on how they want to consume the data. GraphQL schemas that basically just expose the data models 1:1 without considering the exact workflows the frontend needs is a terrible implementation and misuse of GraphQL. Might as well just expose the data using REST
- bern4444 4y agoYup I agree. But this is often what happens imo. That level of cross collaboration seems naturally unlikely.
- cellar_door 4y agoUnfortunately this is my experience as well. Generally it's a misalignment of priorities. Since the people writing the endpoint don't have to consume it, they just do whatever is easiest as quickly as possible. And often many are dismissive of frontend concerns when challenged.