title: Error: GraphQL error: Field 'metafieldsSet' doesn't exist on type 'Mutation' - Shopify GraphQL error
body: <p>I have been recently playing with Shopify App Development and i'm struggling with a graphql call to amend some text. The image below displays the call being made correctly in the shopify GraphQL app which is where I test it.</p>
  <p><a href="https://i.stack.imgur.com/1jtrn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1jtrn.png" alt="enter image description here" /></a></p>
  <p>However when I attempt to make this same call from the react component I get the following error</p>
  <pre><code>Unhandled Runtime Error
  Error: GraphQL error: Field 'metafieldsSet' doesn't exist on type 'Mutation'
  GraphQL error: Variable $metafields is declared by metafieldsSet but not used
  </code></pre>
  <p>Here is the react component in which I try and update the metafield</p>
  <pre><code>import React, { useState } from 'react';
  import gql from 'graphql-tag';
  import { Mutation } from 'react-apollo';
  import { Layout, Button, Banner, Toast, Stack, Frame } from '@shopify/polaris';
  import { Context } from '@shopify/app-bridge-react';
  // GraphQL mutation that updates the prices of products
  const UPDATE_TEXT = gql`mutation metafieldsSet($metafields: [MetafieldsSetInput!]!) {
      metafieldsSet(metafields: $metafields) {
        metafields {
          value
          id
          key
          ownerType
       
        }
        userErrors {
          field
          message
        }
      }
    }
  `;
  class UpdateTheText extends React.Component{
      static contextType = Context;
      render(){
          return(
              &lt;Mutation mutation={UPDATE_TEXT}&gt;
              {(handleSubmit, {error, data}) =&gt; {
                const [hasResults, setHasResults] = useState(false);
      
                const showError = error &amp;&amp; (
                  &lt;Banner status=&quot;critical&quot;&gt;{error.message}&lt;/Banner&gt;
                );
      
                const showToast = hasResults &amp;&amp; (
                  &lt;Toast
                    content=&quot;Successfully updated&quot;
                    onDismiss={() =&gt; setHasResults(false)}
                  /&gt;
                );
      
                return (
                  &lt;Frame&gt;
                    {showToast}
                    &lt;Layout.Section&gt;
                      {showError}
                    &lt;/Layout.Section&gt;
      
                    &lt;Layout.Section&gt;
                      &lt;Stack distribution={&quot;center&quot;}&gt;
                        &lt;Button
                          primary
                          textAlign={&quot;center&quot;}
                          onClick={() =&gt; {
                            let promise = new Promise((resolve) =&gt; resolve());
                              const newmetafields = {
                                    key: &quot;ExtraShopDesc&quot;,
                                    namespace: &quot;ExtraShopDescription&quot;,
                                    ownerId: &quot;gid://shopify/Shop/55595073672&quot;,
                                    type: &quot;single_line_text_field&quot;,
                                    value: &quot;This is an extra shop description twice&quot;
                                }
      
                              promise = promise.then(() =&gt; handleSubmit({ variables: { metafields: newmetafields }}));
                            
      
                            if (promise) {
                              promise.then(() =&gt; this.props.onUpdate().then(() =&gt; setHasResults(true)));
                          }}
                        }
                        &gt;
                          Update Text
                        &lt;/Button&gt;
                      &lt;/Stack&gt;
                    &lt;/Layout.Section&gt;
                  &lt;/Frame&gt;
                );
              }}
            &lt;/Mutation&gt;
          );
      }
  
  }
  
  export default UpdateTheText;
  </code></pre>
  <p>I believe i'm passing the variables into the gql but it doesn't seem to be picking them up?</p>