【发布时间】:2018-08-10 14:33:21
【问题描述】:
我对 GraphQL 和 Apollo 非常陌生,我不明白下面的“aliasEmail”字段有什么问题。当我将此添加到查询中时,我收到此错误消息。当我从查询中删除它时,一切正常。 它在“types.graphql”中有很好的定义,只是一个简单的字符串字段。
index.js:2178 Unhandled (in react apollo:Apollo(withRouter(EmailSettingsContainer))) Error: Network
error: Error writing result to store for query:
query getCompanyForAliasEmailEditForm($companyId: ID) {
Company(id: $companyId) {
name
isTaxActive
telFixe
aliasEmail
telMobile
__typename
}
}
Store error: the application attempted to write an object with no
provided id but the store already contains an id of
Company:cje6xkcnxl83u01353a20p1t6 for this object. The selectionSet
that was trying to be written is:
Company(id: $companyId) {
name
isTaxActive
telFixe
aliasEmail
telMobile
__typename
}
【问题讨论】: