Graphql: (node:9676) UnhandledPromiseRejectionWarning: Error: Generating schema error

Created on 24 May 2019  路  6Comments  路  Source: nestjs/graphql

Can't get the schema to generate

[0] (node:9676) UnhandledPromiseRejectionWarning: Error: Generating schema error
[0] at Function. (C:\Users\KeonS\Desktop\Programming\vinsmart-backend\node_modules\type-graphql\dist\schema\schema-generator.js:20:27)
[0] at Generator.next ()
[0] at fulfilled (C:\Users\KeonS\Desktop\Programming\vinsmart-backend\node_modules\tslib\tslib.js:104:62)
[0] at process._tickCallback (internal/process/next_tick.js:68:7)
[0] at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
[0] at startup (internal/bootstrap/node.js:283:19)
[0] at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
[0] (node:9676) 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(). (rejection id: 1)
[0] (node:9676) [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.

All 6 comments

Fixed

@keonsam what was the fix?

@keonsam What was the fix ?

I'm not too sure what the fix was. The problem may have come from fixing "no default export import express for 'express' " etc or using type-graphql resolves and mutation/query functions. What I did was start a new repo, don't fix the express problem, install graphql like what is on nest website, and only use type-graphql in the classes not in the resolvers, use @nest/graphql instead.

The problem may have come from fixing the importing problem in @nest or your resolvers.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings