Metaobjects guide

How to run metaobject queries and mutations in Shopify’s GraphiQL app

Get the queries

Install and run

  1. Open Shopify’s GraphiQL app at https://shopify-graphiql-app.shopifycloud.com/ and enter your store’s myshopify.com address.
  2. Under Admin API scopes, turn on the ones the tool lists (for metaobjects: metaobject definitions and metaobjects), then install.
  3. In GraphiQL, delete the sample query, paste what the tool copied, and press the Run (play) button.
  4. Copy the whole result from the right-hand side and paste it back into the tool.

Scopes to turn on

  • Reading definitions: metaobject definitions (read).
  • Exporting entries: metaobjects (read).
  • Importing entries: metaobjects (write).
  • Lookup data: products (read) for products, variants and collections; files (read) for files; online store pages or content (read) for pages.

If something goes wrong

  • “Access denied”: the app was installed without a scope the query needs. Reinstall it and turn that scope on.
  • Entries of an app’s definition (type starts with app--) can’t be changed from GraphiQL, because it can’t access data owned by other apps.
  • A 400 or permission error after it worked before: sign out of the GraphiQL app, sign back in, and try again.
  • Staff accounts need permission to edit metaobject entries in your store.

Prefer the command line?

Download the script from the tool. It signs in once with shopify store auth, then runs each batch with shopify store execute --allow-mutations and saves the results to files you can paste back.

Shopify CLI
STORE=your-store.myshopify.com bash metaobjects-upsert.sh
# runs, for each batch:
shopify store execute --store "$STORE" --allow-mutations --json \
  --query-file queries/upsertentriesbatch1.graphql \
  --output-file results/upsertentriesbatch1.json

More metaobject guides

Based on Shopify’s metaobjectUpsert and data types docs (Admin API 2026-10). Not affiliated with, endorsed by, or sponsored by Shopify Inc. Shopify is a trademark of Shopify Inc.