【发布时间】:2018-10-24 04:47:48
【问题描述】:
我正在尝试将我的突变分组为二级类型。架构已正确解析,但解析器未在 Apollo 中触发。这甚至可能吗?这是我想要的查询:
mutation {
pets: {
echo (txt:"test")
}
}
这就是我的尝试
架构:
type PetsMutations {
echo(txt: String): String
}
type Mutation {
"Mutations related to pets"
pets: PetsMutations
}
schema {
mutation: Mutation
}
解析器:
...
return {
Mutation: {
pets : {
echo(root, args, context) {
return args.txt;
}
},
}
【问题讨论】:
标签: graphql graphql-js