-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
Apologies if I'm missing something basic but I've pored over the docs and this seems like it should work. I have this code:
import { Customer } from "@/models/customer"
import type { Resolvers } from "../resolver-types"
import { PrismaSelect } from "@/prisma"
export const queries: Resolvers = {
Query: {
customers(p, a, c, i) {
const select = new PrismaSelect(i, {
excludeFields: {
user: ["fullName"],
},
}).value
return Customer.list(select)
},
},
User: {
fullName(p) {
return `${p.firstName} ${p.lastName}`
},
},
}
fullName
is a computed field, as you can see in the User resolver, but when I run a query, it tries to ask prisma for fullName, which of course fails. I've tried everything I can think of but excludeFields
just doesn't seem to work.
Metadata
Metadata
Assignees
Labels
No labels