title: How to delete items from a paginated list in Apollo?
body: <p>I'm wondering how to delete items in a paginated list so that I always show the same number of items. My current approach isn’t working (the list gets smaller after each delete):</p>
  
  <pre><code>const GET_PAGINATED_POSTS = gql`
    query postsBySize($page: Int!, $pageSize: Int!) {
      postsPage(page: $page, size: $pageSize) {
        _id
        title
      }
    }
  `;
  
  deletePost() {
    this.$apollo.mutate({
      mutation: DELETE_POST,
      variables: {
        postId: this.post._id,
        commentIds: this.post.comments.map(x =&gt; x._id)
      },
      update: (cache, { data: { deletePost } }) =&gt; {
        const query = {
          query: GET_PAGINATED_POSTS,
          variables: {
            page: 0,
            pageSize: 10
          },
        };
  
        const data = cache.readQuery({ ...query });
        data.postsPage = data.postsPage.filter(post =&gt; post._id != this.post._id)
        cache.writeQuery({ ...query, data })
      }
    })
  }
  </code></pre>