问题描述
演示存储库:https://github.com/TheAschr/federation-bug-demo
{
accounts {
id
user {
... on StandardUser {
id
film {
id
__typename
}
}
... on AdminUser {
id
film {
id
review {
id
}
}
}
}
}
}
这是我得到的答复:
{
"errors": [
{
"message": "Field \"reviewId\" was not found in response.","extensions": {
"code": "INTERNAL_SERVER_ERROR","exception": {
"stacktrace": [
"Error: Field \"reviewId\" was not found in response."," at executeSelectionSet (C:\\Users\\me\\Documents\\github\\federation-demo\\node_modules\\@apollo\\gateway\\dist\\executeQueryPlan.js:217:27)"," at executeSelectionSet (C:\\Users\\me\\Documents\\github\\federation-demo\\node_modules\\@apollo\\gateway\\dist\\executeQueryPlan.js:236:51)"," at C:\\Users\\me\\Documents\\github\\federation-demo\\node_modules\\@apollo\\gateway\\dist\\executeQueryPlan.js:121:36"," at Array.forEach (<anonymous>)"," at executeFetch (C:\\Users\\me\\Documents\\github\\federation-demo\\node_modules\\@apollo\\gateway\\dist\\executeQueryPlan.js:120:18)"," at executeNode (C:\\Users\\me\\Documents\\github\\federation-demo\\node_modules\\@apollo\\gateway\\dist\\executeQueryPlan.js:82:23)"," at executeNode (C:\\Users\\me\\Documents\\github\\federation-demo\\node_modules\\@apollo\\gateway\\dist\\executeQueryPlan.js:73:33)"," at executeNode (C:\\Users\\me\\Documents\\github\\federation-demo\\node_modules\\@apollo\\gateway\\dist\\executeQueryPlan.js:56:46)"," at processticksAndRejections (internal/process/task_queues.js:97:5)"," at async Object.executeQueryPlan (C:\\Users\\me\\Documents\\github\\federation-demo\\node_modules\\@apollo\\gateway\\dist\\executeQueryPlan.js:22:27)"," at async Object.ApolloGateway.executor (C:\\Users\\me\\Documents\\github\\federation-demo\\node_modules\\@apollo\\gateway\\dist\\index.js:109:30)"
]
}
}
}
],"data": {
"accounts": [
{
"id": "1","user": {
"id": "1","film": {
"id": "1","review": null
}
}
},{
"id": "2","user": {
"id": "2","__typename": "Film"
}
}
}
]
}
}
{
accounts {
id
user {
... on StandardUser {
id
film {
id
}
}
... on AdminUser {
id
film {
id
review {
id
}
}
}
}
}
}
忽略此文本。 Stackoverflow希望我输入更多内容... asdf asdf asdfasdfa sfasdfasdf
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)