title: Apollo GraphQL - How to get data recorded by mutation from the cache store?
body: <p>I am developing an application with React-Native and using GraphQL as REST in the server-side. I have authentication layer in my application and I would like to achieve reading data that I got from the mutation query from the server.</p>
  
  <p>This is signIn method passed to props : </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="true">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const login = graphql(LoginMutation, {
      props: ({ mutate }) =&gt; ({
          login: (user) =&gt;
              mutate({
                  variables: { email: user.email, password: user.password },
                  refetchQueries: [{ query: fetchShop }],
                  update: (proxy, { data: { signIn } }) =&gt; {
  
                      console.log("USSER : " + JSON.stringify(signIn))
  
                      const query = gql`
                          {
                              currentUser {
                                  id
                                  email
                                  jwt
                                  __typename
                              }
                          }
                      `;
                      try {
                          proxy.writeQuery({ query: query, data: signIn })
                      } catch (error) {
                          console.log("Error occured due to the followig error at write query : "+error)
                      }
  
                      //data.user.push(mutationResult.signIn);
                      //proxy.writeQuery({query,data})
                  }
              }),
      }),
  });</code></pre>
  </div>
  </div>
  </p>
  
  <p>This is my signIn mutation :</p>
  
  
  
  <pre class="lang-js prettyprint-override"><code>import gql from 'graphql-tag';
  
  export default gql`
  mutation SignIn($email : String!,$password : String!){
      signIn(email : $email, password : $password){
          id
          email
          name
          jwt
      }
  }
  `;
  </code></pre>
  
  <p></p>
  
  <p>I am saving authentication token inside the AsyncStorage from React-Native library. What I would like to do is fetching userInformation from the store. I do not have any problem reading root queries from the cache store. </p>
  
  <p>I looked at deep of client props provided by Apollo-client. I can see the user data inside there. It is under some property called ROOT_MUTATION under the store. ( I can share the props data )</p>
  
  <p>I am using readQuery but it throws a warning for "Missing field in currentUser in { "id" : "……..", "email":"asdasds","name":"ajdasdasd","jwt":token</p>
  
  <p>It still does not insert currentUser query to the ROOT_QUERIES to the props.client.</p>
  
  <p>Do you have an idea about how to achieve this goal ?</p>