title: Why is an updater/update function required to update the local cache in React Relay and Apollo Client?
body: <p>I am considering using React Relay or the Apollo Client.  I like the idea of GraphQL as a query language that can be executed against any API or data store.  </p>
  
  <p>However, I am surprised by the need to manually (and imperatively) update the store/cache after a simple mutation such as adding a todo item to a list.  Here is the documentation for the updater/update functions:</p>
  
  <p><a href="http://facebook.github.io/relay/docs/en/mutations.html" rel="nofollow noreferrer">http://facebook.github.io/relay/docs/en/mutations.html</a>
  <a href="https://www.apollographql.com/docs/react/essentials/mutations.html" rel="nofollow noreferrer">https://www.apollographql.com/docs/react/essentials/mutations.html</a></p>
  
  <p>Why is a user-defined updater function required?</p>
  
  <p>Specifically, why must I write an updater function to handle running these two GraphQL queries in sequence?</p>
  
  <pre><code>//Create todo item
  mutation createTodo($input: TodoInput!) {
      createTodo(input: $input) {
          id
          name
          desc
      }
  }
  
  mutationVariables = { input: { name: 'Shopping', desc: 'Get groceries' }};
  
  
  //Select all todos
  query {
      todos {
          id
          name
          desc
      }
  }  
  </code></pre>
  
  <p>Why would the todos query not return the new todo item automatically?  That is the POINT of a declarative query language IMO.</p>