DEV Community

Discussion on: Getting Started with Apollo Federation and Gateway

Collapse
 
tomschreck profile image
Tom Schreck

Thank you for the article. Is it possible for a gateway service A to have gateway service B as an item in gateway service A's service list? In other words, can we nest gateway services?

Collapse
 
mandiwise profile image
Mandi Wise

Out of the box, I think this would be contrary to the goals of Apollo Federation given that an implementing service is intended to manage part of a graph, not an entire graph. You could try wrapping gateway B in an implementing service in gateway A, but you would need to redefine the parts of the schema you want to expose in wrapper service's type defs and resolvers. I've done this with portions of the GitHub GraphQL API inside of an implementing service before.