0
How to search in Mongo with condition parameters, type:
Collection.find({userId}, {done: true}).fetch();
This way I wrote I want to return all the documents that have the done true, doing a search in the User id.
I have at Collection one userid, _id of the Collection, and the field done
I’m using Meteor and grahql, this is mine resolve
Query: {
async taskCompleted(obj, args, {userId}) {
return await Tasks.find({userId}).fetch();
}
}
In this code snippet, it returns all tasks of the user in question