I'd like to federate services, but let the federation gateway also hold own schema and logic that would proxy REST API endpoints for simplicity. Now it looks like I need to have federation gateway service, federated graphql service(s) and the rest<->graphql bridge service separately. Anyhow in our case the rest-graphql gateway could be living in the federation-gateway at least for the time being to avoid unnecessary bootstrapping & maintenance.
Looks like Apollo federation gateway has localServiceList
that seemingly serves exactly this purpose. An example config:
const gateway = new ApolloGateway({
serviceList: [
{ name: "some-service", url: "http://localhost:40001/graph" }
],
localServiceList: [
{ name: "rest-bridge", typeDefs }
]
});
But it does not do the trick: If there is localServiceList, it skips the serviceList.
So the question is: Is this possible to hold also own schema & logic in Apollo Federation gateway?