title: How to update Shop Metafields using GraphQL in Shopify
body: <p>How can I create/update a shop metafield using GraphQL in shopify?
  I could easily create a collection metafield using the following:</p>
  <pre><code>mutation {
    collectionUpdate(
      input: {
        id: &quot;gid&quot;
        metafields: [
          {
            namespace: &quot;testNamespace&quot;
            key: &quot;testKey&quot;
            value: &quot;someValue2&quot;
            valueType: STRING
          }
          {
            id: &quot;gid&quot;
            value: &quot;value&quot;
          }
        ]
      }
    ) {
      collection {
        id
        metafields(first: 10) {
          edges {
            node {
              id
              value
            }
          }
        }
      }
      userErrors {
          field
          message
        }
    }
  }
  </code></pre>
  <p>But there seems to be no equivalent for the shop.
  Also, a shop metafield can be retrieved using:</p>
  <pre><code>{
    shop {
      metafield(namespace:&quot;namespace&quot;,key:&quot;key&quot;) {
            id
            value
          }
    }
  }
  </code></pre>