We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f819521 commit 980044bCopy full SHA for 980044b
README.md
@@ -477,7 +477,7 @@ UserTC.addResolver({
477
type: UserTC,
478
args: { userId: 'MongoID!', valueToPush: 'String' },
479
resolve: async ({ source, args, context, info }) => {
480
- const user = await User.update({ _id: args.userId }, { $push: { arrayToPushTo: args.valueToPush } } })
+ const user = await User.update({ _id: args.userId }, { $push: { arrayToPushTo: args.valueToPush } })
481
if (!user) return null // or gracefully return an error etc...
482
return User.findOne({ _id: args.userId }) // return the record
483
}
0 commit comments