github.com/maeglindeveloper/gqlgen@v0.13.1-0.20210413081235-57808b12a0a0/example/federation/gateway/index.js (about) 1 const { ApolloServer } = require('apollo-server'); 2 const { ApolloGateway } = require("@apollo/gateway"); 3 4 const gateway = new ApolloGateway({ 5 serviceList: [ 6 { name: 'accounts', url: 'http://localhost:4001/query' }, 7 { name: 'products', url: 'http://localhost:4002/query' }, 8 { name: 'reviews', url: 'http://localhost:4003/query' } 9 ], 10 }); 11 12 const server = new ApolloServer({ 13 gateway, 14 15 subscriptions: false, 16 }); 17 18 server.listen().then(({ url }) => { 19 console.log(`🚀 Server ready at ${url}`); 20 });