title: How to update cache after GraphQL mutation?
body: <p>Hello I want to update my local cache after I mutated with network request to my API.
  This is my Apollo query:</p>
  <pre class="lang-js prettyprint-override"><code>    const CREATE_POST = gql`
    mutation createPost($title: String!, $body: String!, $userId: Int!) {
      createPost(title: $title, body: $body, userId: $userId) {
        title
        body
        userId
      }
    }
  `;
  
  
  
    const [createPost] = useMutation(CREATE_POST);
  
  const variables = { title, body, userId: numbered };
  console.log('variables', variables);
  createPost({
    variables,
    update(cache) {
      const results = cache.readQuery({ query: GET_POSTS });
      console.log(results);
      // cache.writeQuery({
      //   query: GET_POSTS,
      //   data: {
      //     posts: [...posts, variables],
      //   },
      // });
    },
  });
  </code></pre>
  <p>I am able to create a Post into the database, however I want to also update my local Apollo cache after I make the mutation request, however when I log results here I don't get anything.</p>
  <p>Am I implementing the local cache update after inserting into db correctly?</p>
  <p>Also in my typePolicies for inMemoryCache settings I have deep merge</p>
  <pre class="lang-js prettyprint-override"><code>typePolicies: {
    Query: {
      fields: {
        posts: {
          keyArgs: ['limit'],
          merge: (existing, incoming) =&gt; {
            console.log('existing', existing);
            console.log('incoming', incoming);
            const result = [...(existing || []), ...incoming];
            return result;
          },
        },
      },
    },
  </code></pre>