title: Using react-apollo, how to define 2 mutations in the same component with TypeScript?
body: <p>Using the following <a href="https://github.com/apollographql/react-apollo/issues/1369" rel="nofollow noreferrer">issue on GitHub</a> I am able to make one mutation work with <strong>Typescript</strong>. But I did not find a way to use 2 mutations in the same component.</p>
  
  <p>There is only one <code>mutate()</code> function in <code>this.props</code>.</p>
  
  <p>How must we typed our component to make it understand the <code>name</code> options passed to graphql?</p>
  
  <pre><code>graphql&lt;ContainerProps, {}, string, ContainerProps&gt;(gql`... `, { name: 'deleteData' });
  graphql&lt;ContainerProps, {}, string, ContainerProps&gt;(gql`...`, { name: 'createData' });
  </code></pre>
  
  <p>EDIT:
  If the 2 mutations have the same parameter name (a <code>string</code> named <code>id</code> for example), do we really need to wrap these parameters in an explicit type?</p>
  
  <p>EDIT 2:
  I have this exception when I declare the 2 mutations with <code>{ name: 'xxx' }</code>:</p>
  
  <blockquote>
    <p>TypeError: _this.props.mutate is not a function</p>
  </blockquote>
  
  <p>If I declare only one mutation (without the name option), it's working properly.</p>