【发布时间】:2017-04-28 22:21:45
【问题描述】:
发送到 GraphQL 的突变查询不包括 track 查询和我的 Fat Query 之间的交集结果。
这是我的 Mutation 类:
getMutation() {
return Relay.QL`mutation { updateTag }`
}
getVariables() {
return {
id: this.props.id,
name: this.props.name,
isFollowed: this.props.isFollowed,
}
}
getFatQuery() {
return Relay.QL`
fragment on UpdateTagPayload {
viewer {
followedTags {
tagList {
name
}
}
}
}
`;
}
getConfigs() {
return [
{
type: 'FIELDS_CHANGE',
fieldIDs: {
viewer: this.props.viewerID,
},
},
]
}
这是结果查询,发送到 GraphQL:
mutation FollowTagMutation($input_0:UpdateTagInput!) {
updateTag(input:$input_0) {
clientMutationId
}
}
我希望我的 Fat Query 中定义的部分字段也存在。
在控制台中,Tracked Fragment Variables 是一个空对象 (Object{}),Tracked Fragment Query 只是空的。
所以看起来,当track和fat query被拦截时,结果是一个空的Intersection Query。
对此有任何帮助吗?我在这里错过了什么?
【问题讨论】:
标签: relayjs