title: What is the correct syntax to pass variable into mutation in graphql
body: <p>I have a react native app.</p>
  
  <p>What is the correct syntax in graphql to pass <strong>variable</strong> into <strong>customerCreate</strong>?</p>
  
  <pre><code>const url = 'https://xxxx.myshopify.com/api/graphql';
  const query = `
      var variable = {
            "input": {
            "email": "test@test.com",
            "password": "pass"
            }
      }
  
      mutation customerCreate($input: CustomerCreateInput!) {
        customerCreate(input: $input) {
          userErrors {
            field
            message
          }
          customer {
            id
          }
        }
      }
  `;
  fetch(url, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ query: query }),
  })
  .then(res =&gt; res.json())
  .then(res =&gt; console.log(res.data));
  .catch(err =&gt; {
      console.log('-- gql err --')
      console.error(err);
  })
  </code></pre>