Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
const {
path,
disableHealthCheck,
onHealthCheck,
cors,
bodyParserConfig,
typePaths,
} = this.options;
const app = httpAdapter.getInstance();
// @ts-ignore
const typeDefs = await this.graphqlTypesLoader.getTypesFromPaths(typePaths);
const mergedTypeDefs = extend(typeDefs, this.options.typeDefs);
const apolloOptions = await this.graphqlDistributedFactory.mergeOptions({
...this.options,
typeDefs: mergedTypeDefs,
});
if (this.options.definitions && this.options.definitions.path) {
await this.graphqlFactory.generateDefinitions(
// @ts-ignore
printSchema(apolloOptions.schema),
this.options,
);
}
this.apolloServer = new ApolloServer(apolloOptions as any);
this.apolloServer.applyMiddleware({
app,
return resolvers.reduce((prev, curr) => extend(prev, curr), {});
}