Skip to content

Commit

Permalink
reproduction
Browse files Browse the repository at this point in the history
  • Loading branch information
bwhitty committed Oct 2, 2019
1 parent 00f5119 commit a424d3d
Show file tree
Hide file tree
Showing 6 changed files with 4,277 additions and 3,220 deletions.
10 changes: 8 additions & 2 deletions gateway.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
const { ApolloServer } = require("apollo-server");
const { ApolloGateway } = require("@apollo/gateway");
const { ApolloGateway, RemoteGraphQLDataSource } = require("@apollo/gateway");

const gateway = new ApolloGateway({
serviceList: [
{ name: "accounts", url: "http://localhost:4001/graphql" },
{ name: "reviews", url: "http://localhost:4002/graphql" },
{ name: "products", url: "http://localhost:4003/graphql" },
{ name: "inventory", url: "http://localhost:4004/graphql" }
]
],

buildService({ name, url }) {
console.log(name, url);

return new RemoteGraphQLDataSource({ url });
}
});

(async () => {
Expand Down
Loading

0 comments on commit a424d3d

Please sign in to comment.