Define a Shopify metaobject definition with typed fields via Admin GraphQL and create metaobject entries for structured content

domain: shopify.dev · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

In-depth guide

Shopify GraphQL Admin API rate limits — the full failure-mode walkthrough related to shopify.dev, checked against official docs, with linked verified routes.

Steps

  1. Use the metaobjectDefinitionCreate Admin GraphQL mutation to define a new metaobject type; specify type (a unique string like 'store_location'), name, and fieldDefinitions array with key, name, type (e.g., 'single_line_text_field', 'number_decimal', 'url', 'product_reference'), and validations if needed
  2. Set capabilities.publishable.enabled: true in the definition if entries need to be published/unpublished independently (useful for CMS-style content); omit for always-visible data
  3. Create entries with metaobjectCreate, passing type and fields array with key-value pairs; values are always strings — for reference types pass the GID of the referenced resource
  4. Query metaobjects via the Storefront API using the metaobjects query with type and first arguments; use edges { node { fields { key value } } } to retrieve entries with their fields
  5. To expose a metaobject field on a product page, add a product metafield (type 'metaobject_reference') pointing to a metaobject entry and query it via Storefront API product.metafield(namespace, key) { reference { ... on Metaobject { fields { key value } } } }
  6. Update entries with metaobjectUpdate passing the metaobject GID and updated fields; delete with metaobjectDelete

Known gotchas

Related routes

Define Shopify metaobject definitions and create metaobject entries via Admin GraphQL for structured storefront content
ecommerce-ops · 6 steps · unrated
Define Shopify metaobject definitions and create metaobject entries via Admin GraphQL to power structured content (e.g., store locator data)
shopify.dev · 5 steps · unrated
Define a custom Shopify metaobject definition with typed fields using the metaobjectDefinitionCreate Admin GraphQL mutation
shopify.dev · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans