Changing the mutation update resolver to allow for _id instead of id #1536
Unanswered
full-stacked
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using NestJs, GraphQL, TypeORM and MongoDB. When I try to do a simple updateOne like this:
I received Query Builder is not supported by MongoDB
I've created a base entity with the following fields
I've tried changing the id to the ObjectIdColumn and many other things but I believe the issue is the automatically handled updateOne resolver is trying to update using the id instead of _id. So it would need to be
updateOne({ id })
Is there a built-in solution for this or should I work to override the update resolvers to use my own logic? Any help would be appreciated!
Beta Was this translation helpful? Give feedback.
All reactions