title: Shopify GraphQL mutation returns "Parse error on \"gid\" (IDENTIFIER)"
body: <p>I am trying write some PHP code to run a mutation on the shopify graphql api. When I run the mutation from command line curl, it works well. But, for some reason PHP curl for the same returns an error/</p>
  
  <p>Here is the command line curl and its output.</p>
  
  <pre><code>    curl -X  POST \
      &gt; "https://myshopname.myshopify.com/admin/api/2019-04/graphql.json" \
      &gt; -H "Content-Type: application/graphql" \
      &gt; -H "X-Shopify-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
      &gt; -d '
      &gt; mutation{
      &gt; productVariantUpdate(input: {
      &gt;     id: "gid://shopify/ProductVariant/126493786xxxx",
      &gt;     price: 2998.5
      &gt;   }){
      &gt;     productVariant{ id, price }
      &gt;   }
      &gt; 
      &gt; }
      &gt; '
      {"data":{"productVariantUpdate":{"productVariant":{"id":"gid:\/\/shopify\/ProductVariant\/126493786xxxx","price":"2998.50"}}},"extensions":{"cost":{"requestedQueryCost":10,"actualQueryCost":10,"throttleStatus":{"maximumAvailable":1000.0,"currentlyAvailable":990,"restoreRate":50.0}}}}
  </code></pre>
  
  <p>I cannot post the exact php code since its from multiple files, but here is the payload of the php curl call</p>
  
  <pre><code>    mutation{productVariantUpdate(input: {    id: "gid://shopify/ProductVariant/126493786xxxx",    price: 2998.5  }){    productVariant{ id, price }  }}
  </code></pre>
  
  <p>and the curl_info output</p>
  
  <pre><code>    array(
          'url' =&gt; 'https://myshopname.myshopify.com/admin/api/2019-04/graphql.json',
          'content_type' =&gt; 'application/json; charset=utf-8',
          'http_code' =&gt; (int) 200,
          'header_size' =&gt; (int) 2431,
          'request_size' =&gt; (int) 385,
          'filetime' =&gt; (int) -1,
          'ssl_verify_result' =&gt; (int) 0,
          'redirect_count' =&gt; (int) 0,
          'total_time' =&gt; (float) 0.719179,
          'namelookup_time' =&gt; (float) 0.060711,
          'connect_time' =&gt; (float) 0.123953,
          'pretransfer_time' =&gt; (float) 0.273472,
          'size_upload' =&gt; (float) 151,
          'size_download' =&gt; (float) 110,
          'speed_download' =&gt; (float) 152,
          'speed_upload' =&gt; (float) 210,
          'download_content_length' =&gt; (float) -1,
          'upload_content_length' =&gt; (float) 151,
          'starttransfer_time' =&gt; (float) 0.718514,
          'redirect_time' =&gt; (float) 0,
          'redirect_url' =&gt; '',
          'primary_ip' =&gt; '23.227.63.64',
          'certinfo' =&gt; array(),
          'primary_port' =&gt; (int) 443,
          'local_ip' =&gt; '192.168.0.101',
          'local_port' =&gt; (int) 40882,
          'request_header' =&gt; 'POST /admin/api/2019-04/graphql.json HTTP/1.1
      Host: alberto-torresi-2.myshopify.com
      User-Agent: wcurl
      Accept: */*
      Content-Type: application/graphql
      X-Shopify-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      Content-Length: 151
  
      '
      )
  </code></pre>
  
  <p>The error returned is:</p>
  
  <pre><code>    {"errors":[{"message":"Parse error on \"gid\" (IDENTIFIER) at [1, 49]","locations":[{"line":1,"column":49}]}]}
  </code></pre>