A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://shopify.dev/docs/api/admin-graphql/latest/mutations/metafieldDefinitionUpdate below:

metafieldDefinitionUpdate - GraphQL Admin

Requires API client to have access to the namespace and the resource type associated with the metafield definition.

Updates a metafield definition.

The input fields for the metafield definition update.

Was this section helpful?

The metafield definition that was updated.

The list of errors that occurred from executing the mutation.

The asynchronous job updating the metafield definition's validation_status.

Was this section helpful?

mutation UpdateMetafieldDefinition($definition: MetafieldDefinitionUpdateInput!) { metafieldDefinitionUpdate(definition: $definition) { updatedDefinition { id name } userErrors { field message code } } }curl -X POST \ https://your-development-store.myshopify.com/admin/api/2025-07/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "mutation UpdateMetafieldDefinition($definition: MetafieldDefinitionUpdateInput!) { metafieldDefinitionUpdate(definition: $definition) { updatedDefinition { id name } userErrors { field message code } } }", "variables": { "definition": { "name": "Pizza size (inches)", "namespace": "bakery", "key": "pizza_size", "ownerType": "PRODUCT" } } }'const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql mutation UpdateMetafieldDefinition($definition: MetafieldDefinitionUpdateInput!) { metafieldDefinitionUpdate(definition: $definition) { updatedDefinition { id name } userErrors { field message code } } }`, { variables: { "definition": { "name": "Pizza size (inches)", "namespace": "bakery", "key": "pizza_size", "ownerType": "PRODUCT" } }, }, ); const data = await response.json();const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: { "query": `mutation UpdateMetafieldDefinition($definition: MetafieldDefinitionUpdateInput!) { metafieldDefinitionUpdate(definition: $definition) { updatedDefinition { id name } userErrors { field message code } } }`, "variables": { "definition": { "name": "Pizza size (inches)", "namespace": "bakery", "key": "pizza_size", "ownerType": "PRODUCT" } }, }, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY mutation UpdateMetafieldDefinition($definition: MetafieldDefinitionUpdateInput!) { metafieldDefinitionUpdate(definition: $definition) { updatedDefinition { id name } userErrors { field message code } } } QUERY variables = { "definition": { "name": "Pizza size (inches)", "namespace": "bakery", "key": "pizza_size", "ownerType": "PRODUCT" } } response = client.query(query: query, variables: variables)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4