val
09/13/2018, 1:15 PMwhere
clause with multiple inputs do I have to surround them with an AND
or is it implicit?divyendu
09/13/2018, 1:17 PMval
09/13/2018, 1:20 PMdivyendu
09/13/2018, 1:26 PMAND
. Please search for
export interface UserWhereInput
here: https://www.prisma.io/docs/1.15/use-prisma-api/prisma-bindings/code-generation-frr1/
And you will see TS typings for prisma-binding. JS follows the same API πval
09/13/2018, 1:57 PMval
09/13/2018, 2:09 PMconst alreadyBooked = await ctx.db.bookings({
where: {
startDate_gte: args.checkIn,
startDate_lte: args.checkOut,
place: { id: args.placeId },
},
})
these all would have to be wrapped in an AND
?val
09/13/2018, 2:10 PMdivyendu
09/13/2018, 2:15 PMpatrickdevivo
09/13/2018, 2:40 PMAND
if you provide multiple conditions