自动更新Apollo GraphQL中的存储

自动更新Apollo GraphQL中的存储,graphql,apollo-client,apollo-cache-inmemory,Graphql,Apollo Client,Apollo Cache Inmemory,我有一个帖子,里面有一些评论。数据形状看起来像 { id: '1234', content: 'It's some post', comments: [ { id: 'c1', content: 'comment 1' }, { id: 'c2', content: 'comment 2' }, { id: 'c3', content: 'comment 1' }, ] } 而GraphQL

我有一个帖子,里面有一些评论。数据形状看起来像

 { 
    id: '1234',
    content: 'It's some post',
    comments: [ 
        { id: 'c1', content: 'comment 1' }, 
        { id: 'c2', content: 'comment 2' },
        { id: 'c3', content: 'comment 1' },  
    ]
    
 }
而GraphQL TypeDefs是

extend type Mutation {
    addComment(content: String!, postId: ID!): Post!
    updateComment(commentInput: CommentInput, postId: ID!, commentId: ID!): Post!
    removeComment(commentId: ID!, postId: ID!): Post!
  }
在这种情况下,我删除了一些评论。注释缓存会自动更新。但我想知道一些事情

在下面的屏幕截图中,您可以在区域(1)中看到,即使我删除了注释(**55,**56,**57),注释仍保留在区域(1)中。但在区域(2)中,这些注释被删除。(1) 和(2)是不同的。我不知道这是否正常。为什么删除的评论仍保留在区域(1)中?我用得对吗