Is there a way to access same subgraphs from different PoDs through single apolloGateway ?
const gateway = new ApolloGateway({
serviceList: [
{ name: "subgraphA, url: "https://app.pod1.user/graphql" },
{ name: "subgraphA", url: "https://app.pod2.user/graphql" },
],
});
The above code will have schema conflicts. Since all the types in SDL will be Duplicate.
I am looking for a solution. Where we can update/change serviceList based on request from OriginUrl(Client).
Example:
Scenario 1:
client ( https://app.pod1.apollo.com )
Create logic in gateway to update service list as below.
const gateway = new ApolloGateway({
serviceList: [
{ name: "subgraphA, url: "https://app.pod1.user/graphql" },
],
});
Scenario 2:
client ( https://app.pod2.apollo.com )
Create logic in gateway to update service list as below
const gateway = new ApolloGateway({
serviceList: [
{ name: "subgraphA, url: "https://app.pod2.user/graphql" },
],
});