really failing at this one: from the backend, tryi...
# prisma-whats-new
v
really failing at this one: from the backend, trying to query a node where a relation matches:
Copy code
const conversationExists = await ctx.db.exists.Conversation({
  participants_every: { AND: [{ id: userId }, { id: currentUserId }] }
});
Copy code
type Conversation {
  id: ID! @unique
  participants: [User!]!
}
n
I don't understand your query. It is semantically identical to these two:
Copy code
const conversationExists = await ctx.db.exists.Conversation({
  participants_every: { id: userId }
});
Copy code
const conversationExists = await ctx.db.exists.Conversation({
  participants_every: { id: currentUserId }
});
Oh, I think I get it. You are misunderstanding the
_every
filter.
_every
means "get me all conversations that fulfill all of the following requirements". You probably want to ask for
_some
instead.