3 ms·
I found it easier to create a centralized graphql server that stitches together all of my rest services with resolvers. I define all of the types, resolvers, a
by sf_barbary 8y ago
I found it easier to create a centralized graphql server that stitches together all of my rest services with resolvers. I define all of the types, resolvers, and mutations for each of the services in the central graphql gateway and it clients don't need to know where they get data from. Why wouldn't you just use this approach?
- yellow 8y agoThe biggest problem with GraphQL in this regard is that it is a single endpoint. API gateways often define authorization rules, throttling rates, and caching times differently for each route. Consequently, you may need to write authorization, throttling, and caching logic in a separate layer or perhaps even in your microservices themselves.
- bedis9 8y agoGraphql seems to be limited because of its single endpoint design. So some features are applied globally while you may want them per route.