Moritz
09/17/2018, 8:47 AMgroups(parent, args, ctx, info) {
// pass the query params to the client
}
? should I simply stick to the $delegate
option like mentioned in @lawjolla migration guide, or is it intended to be used with the $request(query)
options from the docs? Whats the way to go?Dan Thareja
09/17/2018, 11:49 AM$delegate
has been removed from Prisma Client 1.17 (https://github.com/prisma/prisma/pull/3108), and I don’t see $request
defined on the new Client either. Any ideas?Dan Thareja
09/17/2018, 12:05 PM$fragment
might be the way to go for now.
const fragment = `
fragment UserWithLinks on User {
name
email
links {
description
url
}
}
`
const userWithPosts = await prisma.users().$fragment(fragment)
Though, this seems unnecessarily verbose. Why doesn’t prisma.users()
return the links relationship by default?Moritz
09/17/2018, 12:15 PMDan Thareja
09/17/2018, 5:13 PMnilan
09/19/2018, 12:03 PMprisma-binding
(this is exactly the schema delegation part). You would implement the resolution of every field on a type resolver level, like here: https://github.com/prisma/graphql-prisma-typescript/blob/master/src/resolvers/City.ts#L9-L12nilan
09/19/2018, 12:04 PMnilan
09/19/2018, 12:04 PMMoritz
09/20/2018, 8:12 AM