@nestjs/graphql
Version:
Nest - modern, fast, powerful node.js web framework (@graphql)
19 lines (18 loc) • 675 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getApolloServer = void 0;
const __1 = require("..");
function getApolloServer(app) {
try {
const graphqlFederationModule = app.get(__1.GraphQLFederationModule);
return graphqlFederationModule.apolloServer;
}
catch (error) { }
try {
const graphqlModule = app.get(__1.GraphQLModule);
return graphqlModule.apolloServer;
}
catch (error) { }
throw new Error('Nest could not find either the GraphQLFederationModule or GraphQLModule. Neither module is registered in the given application.');
}
exports.getApolloServer = getApolloServer;