1
比方說我的查詢看起來像這樣:如何將嵌套解析器添加到模式?
query {
post {
id
user { id, name }
}
}
和分解圖如下所示:
{
Query: {
post: myPostResolverFunc,
}
}
我怎麼能爲post.user添加額外的「嵌套」解析器? 我試過,但它不工作:
addResolveFunctionsToSchema(schema, {
Query: {
post: {
user: postUserResolveFunc,
},
}
});