title: ApolloError.js:43 Uncaught (in promise) Error: Network error: Cannot read property 'Mutation' of undefined
body: <p>Hello i have these error when i invoque a mutation function for local-state with apollo-link-state. </p>
  
  <p>Also i have the picture problem with a node module, and cant now how solve.   </p>
  
  <p>Please any help.</p>
  
  <p>------node problem<a href="https://i.stack.imgur.com/nU7DL.png" rel="nofollow noreferrer">apollo-link-http-common</a></p>
  
  <p>------Code-------</p>
  
  <p>------index.js</p>
  
  <pre><code>import React from 'react';
  import ReactDOM from 'react-dom';
  import { BrowserRouter } from 'react-router-dom'
  import 'typeface-roboto'
  import registerServiceWorker from './registerServiceWorker';
  import App from './App';
  import './style.css';
  
  import { ApolloProvider } from 'react-apollo';
  import { ApolloClient } from 'apollo-client';
  import { HttpLink } from 'apollo-link-http';
  import { InMemoryCache } from 'apollo-cache-inmemory';
  import { withClientState } from 'apollo-link-state';
  import { ApolloLink } from 'apollo-link';
  
   const cache = new InMemoryCache();
  
  
  const defaulState = {
  pagPrincipal: {
  __typename: 'PagPrincipal',
  bienvenido: 'Bienvenido Hello!! estamos desde el local state',
  descripcion: 'Este es el primer software web con tecnologia React, 
  ApolloGraphQl, Material-ui, node.js y mongoDB'
  },
   datosNumericos: {
  __typename: 'DatosNumericos',
  cantStock: 0
  }
  }
  
  const stateLink = withClientState({
  cache,
  defaults: defaulState,
  resolver: {
  Mutation: {
    updatePagPrinc: (_, { index, value }, { cache }) =&gt; {
      console.log(index, value)
    }
  } 
  }
  })
  
   const MONGODB_BASE_URL = 'http://192.168.1.2:4000/graphql';
   const httpLink = new HttpLink({
   uri: MONGODB_BASE_URL,
   });
  
  
  
  
   const client = new ApolloClient({
  
   link: ApolloLink.from([
   stateLink, //Unica Fuente de la verdad
   httpLink //Servidor ApolloGraphQl
   ]),
   cache
   });
  
   ReactDOM.render(
   &lt;ApolloProvider client={client}&gt;
   &lt;BrowserRouter&gt;
    &lt;App /&gt;
   &lt;/BrowserRouter&gt;
   &lt;/ApolloProvider&gt;,  
   document.getElementById('root')
   );
  
   registerServiceWorker();
  </code></pre>
  
  <p>-------updatePagPrincipal.js</p>
  
  <pre><code>import gql from 'graphql-tag';
  
  export default gql`
  mutation updatePagPrinc($index: String! , $value: String!) {
      updatePagPrinc(index: $index, value: $value) @client{
          bienvenido
      }
   }
   `
  </code></pre>
  
  <p>--------FromLogin.js</p>
  
  <pre><code>import React, {Fragment}from 'react'
  import { compose, graphql  } from 'react-apollo';
  import updatePagPrincipal from '../../LocalState/graphql/updatePagPrincipal'
  
  
   class FormLogin extends React.Component{
   constructor(props) {
      super(props);
      // create a ref to store the textInput DOM element
      this.titleInput = React.createRef();
      this.descriptionInput = React.createRef();                  
    }
   render(){
      const { updatePagPrinc } = this.props 
      return (
               &lt;Fragment&gt;
  
               &lt;form onSubmit={e =&gt; {
                       e.preventDefault();
                       //when invoque these is the problem!!!
                        updatePagPrinc({
                           variables: {
                           index: 'Titulo',
                           value: this.titleInput.current.value
                       }
                   })
                       console.log(this.titleInput.current.value)
                       this.titleInput.current.value = ""
                   }}&gt;
                   &lt;label&gt; Titulo:&lt;/label&gt;&lt;input type="Text" ref= 
           {this.titleInput}/&gt;
                   {/* &lt;label&gt; descripcion:&lt;/label&gt;&lt;input type="Text" ref= 
           {this.descriptionInput}/&gt; */}
                   &lt;button type="submit" &gt;Guardar&lt;/button&gt;
               &lt;/form&gt;
           &lt;/Fragment&gt;
  
          )
         }
      }
  
    export default compose(graphql(
    updatePagPrincipal, {
    name: 'updatePagPrinc'
    })
    )(FormLogin);
  </code></pre>