Lars-Jørgen Kristiansen
02/20/2019, 2:38 PMquery {
workspaces {
id
title
workers {
id
name
}
}
}
Resolvers:
{
Query: {
workspaces: (parent, args, ctx) => {
return ctx.prisma.workspaces();
}
},
Workspace: {
workers: (parent, args, ctx) => {
return ctx.prisma
.workspace({
id: parent.id
})
.workers();
}
}
}
But looking at the debug output it does'nt seem to solve the problem at all:
Query:
{
workspaces {
id
title
}
}
Query:
query ($where: WorkspaceWhereUniqueInput!) {
workspace(where: $where) {
workers {
id
name
}
}
}
Variables:
{"where":{"id":"cjsd9u584000b07629ei22dpc"}}
Query:
query ($where: WorkspaceWhereUniqueInput!) {
workspace(where: $where) {
workers {
id
name
}
}
}
Variables:
{"where":{"id":"cjsdab6s8000p0762vxhtca4d"}}
Am i doing something wrong?