Apollo Server requires either an existing schema, modules or typeDefs

Viewed 187

enter image description here

(node:1576) UnhandledPromiseRejectionWarning: Error: Apollo Server requires either an existing schema, modules or typeDefs at ApolloServer.constructSchema (E:\NestJS\Backup\Intern\internship-api-backend-nestjs\node_modules\apollo-server-express\node_modules\apollo-server-core\dist\ApolloServer.js:367:19) at new ApolloServerBase (E:\NestJS\Backup\Intern\internship-api-backend-nestjs\node_modules\apollo-server-express\node_modules\apollo-server-core\dist\ApolloServer.js:204:72) at new ApolloServer (E:\NestJS\Backup\Intern\internship-api-backend-nestjs\node_modules\apollo-server-express\dist\ApolloServer.js:60:9)
at GraphQLModule.registerExpress (E:\NestJS\Backup\Intern\internship-api-backend-nestjs\node_modules@nestjs\graphql\dist\graphql.module.js:131:30) at GraphQLModule. (E:\NestJS\Backup\Intern\internship-api-backend-nestjs\node_modules@nestjs\graphql\dist\graphql.module.js:115:22) at Generator.next () at E:\NestJS\Backup\Intern\internship-api-backend-nestjs\node_modules@nestjs\graphql\node_modules\tslib\tslib.js:117:75 at new Promise () at Object.__awaiter (E:\NestJS\Backup\Intern\internship-api-backend-nestjs\node_modules@nestjs\graphql\node_modules\tslib\tslib.js:113:16)
at GraphQLModule.registerGqlServer (E:\NestJS\Backup\Intern\internship-api-backend-nestjs\node_modules@nestjs\graphql\dist\graphql.module.js:111:24) at GraphQLModule. (E:\NestJS\Backup\Intern\internship-api-backend-nestjs\node_modules@nestjs\graphql\dist\graphql.module.js:98:24) at Generator.next () at fulfilled (E:\NestJS\Backup\Intern\internship-api-backend-nestjs\node_modules@nestjs\graphql\node_modules\tslib\tslib.js:114:62) at processTicksAndRejections (internal/process/task_queues.js:95:5) (Use node --trace-warnings ... to show where the warning was created) (node:1576) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:1576) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

0 Answers
Related