如何修复:Angular Apollo客户端返回数组而不是id

如何修复:Angular Apollo客户端返回数组而不是id,angular,apollo-client,Angular,Apollo Client,我在angular应用程序中使用的apollo客户端有问题。我正在调用一个graphQL查询,该查询返回以下内容: account: {id: 1} accountId: 1 contact: {id: 1} contactId: 1 id: 23 notes: null resultId: null stepId: 1 subject: "testsubject" 我在浏览器开发工具中看到了这个结果(调用的结果预览) 到目前为止还不错,但appolo客户端返回以下内容: account: {

我在angular应用程序中使用的apollo客户端有问题。我正在调用一个graphQL查询,该查询返回以下内容:

account: {id: 1}
accountId: 1
contact: {id: 1}
contactId: 1
id: 23
notes: null
resultId: null
stepId: 1
subject: "testsubject"
我在浏览器开发工具中看到了这个结果(调用的结果预览) 到目前为止还不错,但appolo客户端返回以下内容:

account: {id: 1}
accountId: 1
contact: {id: 1}
contactId: 1
id: {id: {…}, notes: null, stepId: 1, subject: "testsubject", resultId: null, …}
notes: null
resultId: null
stepId: 1
subject: "testsubject"
我在网上搜索这个问题,但似乎我是唯一一个有这个问题的人,尝试解决几乎相似的问题并没有解决任何问题

禁用缓存并不能解决这个问题

      this.apollo.create({
        link: from([this.logoutLink, this.authMiddleware, graphQLDataLink]),
        cache:  new InMemoryCache({
          addTypename: false
        }),
        defaultOptions: {
          query: {
            fetchPolicy: 'no-cache'
          }
        }
      }

我发现了问题。我在一个方法中调用了2个查询,并对结果进行了跟踪。以下是简化的方法:

callGQLQuery(query1)。然后(result=>{ …一些代码 callGQLQuery(query2)。然后(result=>{ =>这里的结果有我描述的错误,改变了result2中的第二个结果 解决了 }) })