假设我的查询如下所示:
query {
post {
id
user { id, name }
}
}
解析器映射如下所示:
{
Query: {
post: myPostResolverFunc,
}
}
如何为 post.user 添加额外的“嵌套”解析器?我试过这个但它不起作用:
addResolveFunctionsToSchema(schema, {
Query: {
post: {
user: postUserResolveFunc,
},
}
});