Skip to content

Instantly share code, notes, and snippets.

@joshbedo
Created November 24, 2021 15:27
Show Gist options
  • Save joshbedo/87c62b896b24fe65ef5c3ad187877d15 to your computer and use it in GitHub Desktop.
Save joshbedo/87c62b896b24fe65ef5c3ad187877d15 to your computer and use it in GitHub Desktop.
Shopify Metafields - Make new metafields visible for storefront API
// This needs entered in Shopify's GraphQL app to change visibility of metafield.
mutation ($input: MetafieldStorefrontVisibilityInput!) {
metafieldStorefrontVisibilityCreate(input: $input) {
metafieldStorefrontVisibility {
id
}
userErrors {
field
message
}
}
}
// INPUT
{
"input": {
"namespace": "my_fields",
"key": "delivery",
"ownerType": "PRODUCT"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment