Marcus
08/25/2018, 8:08 PMlet place = await context.prisma.query.place(
{
where: {
id: args.placeId
}
},
'{owners {id}}',
);
if (place.owners.filter(owner => owner.id === userId).length < 1) {
throw new Error("Place does not belong to User.")
}
Is there anyway to get the filtering part into the query?