Aaron Waller
04/06/2022, 5:32 PMquery1: (parent, args) => {
return prisma.users.findMany({
where: {
age: {
gte: 20
},
profilepicture: true,
location: 'Germany'
}
})
}
and because the second user wants the same query but also wants to know if the person is active I have to create a complete new query for this case?
example2:
query2: (parent, args) => {
return prisma.users.findMany({
where: {
age: {
gte: 20
},
profilepicture: true,
location: 'Germany',
isActive: true
}
})
},
Aaron Waller
04/06/2022, 5:34 PMHector Grecco
04/06/2022, 5:53 PMHector Grecco
04/06/2022, 5:55 PMsingleQuery: (parent, args) => {
return prisma.users.findMany({
where: args.filters
})
}
Aaron Waller
04/07/2022, 4:21 AM