Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot determine a GraphQL input type ("ObjectId") for the "userId". Make sure your class is decorated with an appropriate decorator. #25

Open
ajitStephen opened this issue Sep 12, 2024 · 3 comments

Comments

@ajitStephen
Copy link

ajitStephen commented Sep 12, 2024

I have just run install & start
added DB and JWT variables from .env

I am getting this error from file : src/app/book/dto/buy-book.input.ts

/home/ajit-stephen/projects/personal/learning/graphql-mongodb-nestjs-tutorial/node_modules/@nestjs/graphql/dist/schema-builder/factories/input-type.factory.js:19 throw new cannot_determine_input_type_error_1.CannotDetermineInputTypeError(hostType, typeRef); ^ Error: Cannot determine a GraphQL input type ("ObjectId") for the "userId". Make sure your class is decorated with an appropriate decorator. at InputTypeFactory.create (/home/ajit-stephen/projects/personal/learning/graphql-mongodb-nestjs-tutorial/node_modules/@nestjs/graphql/dist/schema-builder/factories/input-type.factory.js:19:23) at /home/ajit-stephen/projects/personal/learning/graphql-mongodb-nestjs-tutorial/node_modules/@nestjs/graphql/dist/schema-builder/factories/input-type-definition.factory.js:48:52 at Array.forEach (<anonymous>) at /home/ajit-stephen/projects/personal/learning/graphql-mongodb-nestjs-tutorial/node_modules/@nestjs/graphql/dist/schema-builder/factories/input-type-definition.factory.js:46:33 at resolveObjMapThunk (/home/ajit-stephen/projects/personal/learning/graphql-mongodb-nestjs-tutorial/node_modules/graphql/type/definition.js:504:40) at defineInputFieldMap (/home/ajit-stephen/projects/personal/learning/graphql-mongodb-nestjs-tutorial/node_modules/graphql/type/definition.js:1313:20) at GraphQLInputObjectType.getFields (/home/ajit-stephen/projects/personal/learning/graphql-mongodb-nestjs-tutorial/node_modules/graphql/type/definition.js:1276:27) at collectReferencedTypes (/home/ajit-stephen/projects/personal/learning/graphql-mongodb-nestjs-tutorial/node_modules/graphql/type/schema.js:395:51) at collectReferencedTypes (/home/ajit-stephen/projects/personal/learning/graphql-mongodb-nestjs-tutorial/node_modules/graphql/type/schema.js:391:11) at new GraphQLSchema (/home/ajit-stephen/projects/personal/learning/graphql-mongodb-nestjs-tutorial/node_modules/graphql/type/schema.js:183:7)

Do you know what i am missing here ?

@pacyL2K19
Copy link
Owner

Hello @ajitStephen

Thank you for raising the issue

May I know which branch you checked out from?
I suggest to follow the tutorial from part one to make sure all the required steps are followed, currently I dropped the development of the tutorial, being held by the book project on Nest.js which is going to be released very soon

@ajitStephen
Copy link
Author

Hello @ajitStephen

Thank you for raising the issue

May I know which branch you checked out from? I suggest to follow the tutorial from part one to make sure all the required steps are followed, currently I dropped the development of the tutorial, being held by the book project on Nest.js which is going to be released very soon

develop

@ajitStephen
Copy link
Author

ajitStephen commented Sep 12, 2024

Ok, I'll the check articles! Thanks for reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants