veksen
04/02/2018, 3:10 AMconst conversationExists = await ctx.db.exists.Conversation({
participants_every: { AND: [{ id: userId }, { id: currentUserId }] }
});
type Conversation {
id: ID! @unique
participants: [User!]!
}
nilan
04/02/2018, 7:19 AMconst conversationExists = await ctx.db.exists.Conversation({
participants_every: { id: userId }
});
const conversationExists = await ctx.db.exists.Conversation({
participants_every: { id: currentUserId }
});
nilan
04/02/2018, 7:20 AM_every
filter. _every
means "get me all conversations that fulfill all of the following requirements". You probably want to ask for _some
instead.