Skip to content

Instantly share code, notes, and snippets.

const superGraphSchema = await this.supergraphManager.getSupergraph();
if (!this.supergraphManager.checkSupergraph(superGraphSchema)) {
this.supergraphManager.setActualSupergraph(superGraphSchema);
await this.server.stop();
this.startServer(superGraphSchema.toString());
}
this.gateway = new ApolloGateway({ supergraphSdl: supergraph });
this.server = new ApolloServer({ gateway: this.gateway });
this.server.listen({ port: port });
@mikesjcz
mikesjcz / import.ts
Last active September 6, 2022 08:46
import { runServer } from '@monorepo-ws/server';
this.gateway = new ApolloGateway({ supergraphSdl: supergraph });
const gateway = new ApolloGateway({
servicesList: [
{ name: 'users', url: 'http://localhost:8080/graphql' },
{ name: 'articles', url: 'http://localhost:9000/graphql' }
]
})