title: How to update Apollo cache after query?
body: <p>How can I override a value in the Apollo cache?</p>
  
  <p>I have a graphql query to fetch the user. This returns a user with a default currency. This currency can then be override from a select dropdown. </p>
  
  <p>The query fetches <code>paymentCurrencies</code> from an API, then uses a client side resolver to set the first item in the array of <code>paymentCurrencies</code> to be the users <code>currency</code></p>
  
  <pre><code>query me {
    me {
      username
      currency @client
      paymentCurrencies
    }
  }
  </code></pre>
  
  <p>When somebody selects a currency from the dropdown menu, I want to over the users currency with whatever they have selected.</p>
  
  <p>I have something like this so far:</p>
  
  <pre><code>const onChange = e =&gt; {
    const { value } = e.target
    client.writeData({ user: { currency: value, username, __typename: "User" } })
  }
  </code></pre>
  
  <p>I get the following error: <code>Error writing result to store for query:
   {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GeneratedClientQuery"},"selectionSet":null}]}
  Cannot read property 'selections' of null</code></p>
  
  <p>Is using <code>writeData</code> is the correct method or should I be using <code>writeQuery</code> or something?</p>