Corey Snyder
08/07/2019, 3:30 AMtype User {
id: ID! @id
name: String!
email: String! @unique
active: Boolean @default(value: false)
}
type EmailVerification{
id: ID! @id
verificationCode: String!
user: User!
}
Is it possible to query for the email verification where user.email=test@example.com
I’m trying to query it like this but it’s not working and I’ve tried a bunch of different versions to no avail
let emailVerification = await context.prisma.emailVerifications({
where:{
user: {connect: {email: args.email}}
}
});
Corey Snyder
08/07/2019, 3:33 AMcontext.prisma.users({
where: {
email: args.email
}
}).emailVerifications();