Matt
04/17/2020, 6:26 PM...
return ctx.prisma.TableA
.findMany({
where: {
...
},
include: {
TableBconnectionField: true },
})
...
I get all the fields in Table A and all the fields in Table B.
But I also have a connection field in Table B to Table C and I need some data from that included in the return JSON as well. If I put
...
return ctx.prisma.TableA
.findMany({
where: {
...
},
include: {
TableBconnectionField: {
select: { field_1: true, field_2: true, TableCconnectionField: true },
}
},
})
...
I get all the fields for Tables A and C but only get field_1 and field_2 for Table B. Is there a way to do this that gives me all the fields for Table B as well without me having to explicitly request them?Matt
04/17/2020, 6:41 PMMatt
04/17/2020, 6:41 PM