title: How to wrap GraphQL mutation in Apollo client mutation component in React
body: <p>I am having an issue wrapping the Apollo mutation component along with the query component. If you look at the <strong>updateCell</strong> function I am able to get the oldValue, newValue, and ID for the row.
  How can I pass the values to ADDCOST mutation using Apollo client mutation component. </p>
  
  <p>Below is my code: </p>
  
  <p>Thanks in advance for any tips.</p>
  
  <pre><code>const APPROVALCHAIN_QUERY = gql`
      {
        vApprovalChainApproverCountList{
          applicationId
          applicationName
          collectionName
          licenseType
          cost
          approvers
  
        }
      }
      `;
  const ADDCOST_MUTATION = gql`
    mutation($cost: String!){
    updateCost(cost: $cost){
      applicationId
      cost
    }
  }
  `;
  
  
  
  class ApprovalChain extends Component {
      render() {
          return (
              &lt;Query
                  query={APPROVALCHAIN_QUERY}
              &gt;
                  {({ loading, error, data }) =&gt; {
                      if (loading)
                          return &lt;p&gt;Loading...&lt;/p&gt;;
  
                      if (error)
                          return &lt;p&gt;{error.message}&lt;/p&gt;;
  
                      const chain = JSON.parse(JSON.stringify(data.vApprovalChainApproverCountList));
  
                      return (
                          &lt;div&gt;
                              &lt;h1&gt;ApprovalChain&lt;/h1&gt;
  
                              &lt;BootstrapTable
                                  keyField="applicationId"
                                  data={chain}
                                  columns={columns}
                                  cellEdit={cellEditFactory({
                                      mode: 'click',
                                      blurToSave: true,
  
             Need Help -------------&gt;&gt;&gt;**updateCell:** (oldValue, newValue, row) =&gt; {
  
                                          console.log(row.applicationId, oldValue, newValue);
                                      },
                                  })}
                              /&gt;
                          &lt;/div&gt;
                      );
                  }}
              &lt;/Query&gt;
          );
      }
  }
  export default ApprovalChain;
  </code></pre>