[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-openai-shopify-custom-data":3,"mdc--s62jrz-key":33,"related-repo-openai-shopify-custom-data":1594,"related-org-openai-shopify-custom-data":1717},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":22,"repoUrl":23,"updatedAt":24,"license":25,"forks":26,"topics":27,"repo":28,"sourceUrl":31,"mdContent":32},"shopify-custom-data","model and store custom Shopify data","MUST be used first when prompts mention Metafields or Metaobjects. Use Metafields and Metaobjects to model and store custom data for your app. Metafields extend built-in Shopify data types like products or customers, Metaobjects are custom data types that can be used to store bespoke data structures. Metafield and Metaobject definitions provide a schema and configuration for values to follow.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"openai","OpenAI","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fopenai.png",[12,16,19],{"name":13,"slug":14,"type":15},"E-commerce","e-commerce","tag",{"name":17,"slug":18,"type":15},"Data Modeling","data-modeling",{"name":20,"slug":21,"type":15},"Shopify","shopify",3992,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins","2026-06-30T19:00:57.102",null,465,[],{"repoUrl":23,"stars":22,"forks":26,"topics":29,"description":30},[],"OpenAI Plugins","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins\u002Ftree\u002FHEAD\u002Fplugins\u002Fshopify\u002Fskills\u002Fshopify-custom-data","---\nname: shopify-custom-data\ndescription: \"MUST be used first when prompts mention Metafields or Metaobjects. Use Metafields and Metaobjects to model and store custom data for your app. Metafields extend built-in Shopify data types like products or customers, Metaobjects are custom data types that can be used to store bespoke data structures. Metafield and Metaobject definitions provide a schema and configuration for values to follow.\"\ncompatibility: Requires Node.js\nmetadata:\n  author: Shopify\n  version: \"1.9.1\"\n---\n\n\u003Ccritical-instructions>\n# Best Practise for working with Metafields and Metaobjects\n\n# ESSENTIAL RULES\n\n- **ALWAYS** show creating metafield\u002Fmetaobject definitions, then writing values, then retrieving values.\n- **NEVER** show or offer alternate approaches to the same problem if not explicitly requested. It will only increase the user's confusion.\n- Keep examples minimal -- avoid unnecessary prose and comments\n- Remember the audience for this guidance is app developers -- they do not have access to the Shopify Admin site\n- Follow this guidance meticulously and thoroughly\n\nREMEMBER!!! Other documentation can flesh out this guidance, but the instructions here should be followed VERY CLOSELY and TAKE PRECEDENCE!\n\n# ALWAYS: First, create definitions\n\n## with TOML (99.99% of apps)\n\n```toml\n# shopify.app.toml\n\n# Metafield definition -- owner type is PRODUCT, namespace is $app, key is care_guide\n[product.metafields.app.care_guide]\ntype = \"single_line_text_field\"\nname = \"Care Guide\"\naccess.admin = \"merchant_read_write\"\n\n# Metaobject definition -- type is $app:author\n[metaobjects.app.author]\nname = \"Author\"\ndisplay_name_field = \"name\"\naccess.storefront = \"public_read\"\n\n[metaobjects.app.author.fields.name]\nname = \"Author Name\"\ntype = \"single_line_text_field\"\nrequired = true\n\n# Link metaobject to product\n[product.metafields.app.author]\ntype = \"metaobject_reference\u003C$app:author>\"\nname = \"Book Author\"\n```\n\nWhy: Version controlled, auto-installed, type-safe. GraphQL (Admin\u002FStorefront) is used for reading or writing values after the TOML definitions already exist. Fields\u002Fobjects can be edited by merchants when `access.admin = \"merchant_read_write\"` is set.\n\n**NEVER** include `metafieldDefinitionCreate`, `metaobjectDefinitionCreate` GraphQL if TOML is the correct fit.\n\n### Exceptions (0.01% of apps)\n\n**NEVER, EVER** show these unless strictly required:\n\n- Apps that **REQUIRE** creating definitions at **runtime** (i.e. types are configured dynamically by merchants) should use `metafieldDefinitionCreate`, `metaobjectDefinitionCreate`\n- Apps that want **other apps** to read\u002Fwrite their data should use the above GraphQL, and \"merchant-owned\" namespace\n\n# CRITICAL: App-Owned Metaobject and Metafield identification\n\n- Metaobjects defined with `[metaobjects.app.example...]` in `shopify.app.toml`, MUST be accessed using `type: $app:example`\n- Metafields defined with `[product.metafields.app.example]` MUST be accessed using `namespace: $app` and `key: example`\n  - The same applies to other owner types, like customers, orders, etc.\n- Avoid customizing namespaces for metafields.\n- Avoid the common mistake of using `namespace: app`. This is profoundly incorrect.\n\n# NEXT: demonstrate writing metafield and metaobject values via Admin API\n\n## Writing metafields\n\n**ALWAYS** use `metafieldsSet` to write metafields. `namespace` should normally be excluded as the default is $app.\n\n```graphql\nmutation {\n  metafieldsSet(metafields:[{\n    ownerId: \"gid:\u002F\u002Fshopify\u002FProduct\u002F1234\",\n    key: \"example\",\n    value: \"Hello, World!\"\n  }]) { ... }\n}\n```\n\n## Writing metaobjects\n\n**ALWAYS** use `metaobjectUpsert` to write metaobjects.\n\n```graphql\nmutation {\n  metaobjectUpsert(handle: {\n    type: \"$app:author\",\n    handle: \"my-metaobject\",\n  }, metaobject: {\n    fields: [{\n      key: \"example\",\n      value: \"Hello, world!\"\n    }]\n  }) { ... }\n}\n```\n\n# FINALLY: demonstrate reading metafield and metaobject values\n\n## Loading metafields\n\nMetafields are accessed via their owning type (e.g. a Product). `namespace` should normally be excluded as the default is $app.\n\n- Always prefer `jsonValue` where possible as it better serialises complex types\n- Always alias metafield loads for easy reference\n\n```graphql\n# Admin API\nquery {\n  product(id: \"gid:\u002F\u002Fshopify\u002FProduct\u002F1234\") {\n    example: metafield(key: \"example\") {\n      jsonValue\n    }\n  }\n}\n# Storefront API\nquery {\n  product(handle: \"wireless-headphones-1\") {\n    example: metafield(key: \"example\") {\n      value\n    }\n  }\n}\n```\n\n## Loading metaobjects\n\n```graphql\n# Admin API\nquery {\n  metaobjects(type: \"$app:author\", first: 10) {\n    nodes {\n      handle\n      example: field(key: \"example\") {\n        jsonValue\n      }\n    }\n  }\n}\n# Storefront API\nquery {\n  metaobjects(type: \"$app:author\", first: 10) {\n    nodes {\n      handle\n      example: field(key: \"example\") {\n        value\n      }\n    }\n  }\n}\n```\n\n### Access Metafields directly in checkout extensions\n\n**DO**: Access app-owned metafields directly (NO network call):\n\n```tsx\nfunction Extension() {\n  \u002F\u002F ESSENTIAL: Register this metafield in `shopify.extension.toml`\n  const [energyRating] = useAppMetafields({\n    namespace: \"$app\",\n    key: \"energy-rating\",\n    type: \"product\",\n  }).filter((entry) => entry.target.id === productVariantId);\n}\n```\n\n**DON'T**: Make network calls for app-owned metafields.\n\n### Access Metafields in Shopify Functions\n\nUse the GraphQL input query to select metafields to load:\n\n```graphql\nquery Input {\n  cart {\n    lines {\n      merchandise {\n        __typename\n        ... on ProductVariant {\n          example: metafield(namespace: \"$app\", key: \"example\") {\n            jsonValue\n          }\n        }\n      }\n    }\n  }\n}\n```\n\nDocs: [Metafields & Metaobjects](https:\u002F\u002Fshopify.dev\u002Fdocs\u002Fapps\u002Fbuild\u002Fcustom-data)\n\u003C\u002Fcritical-instructions>\n\n### Always use Shopify CLI\n\n- **CLI:** ALWAYS use Shopify CLI to scaffold apps and extensions. Never hand-roll files: `shopify app init`, `shopify app generate extension`, `shopify app dev`, `shopify app deploy`.\n- For CLI installation, setup, upgrade, or troubleshooting, use `shopify-use-shopify-cli`.\n",{"data":34,"body":38},{"name":4,"description":6,"compatibility":35,"metadata":36},"Requires Node.js",{"author":20,"version":37},"1.9.1",{"type":39,"children":40},"root",[41,1588],{"type":42,"tag":43,"props":44,"children":45},"element","critical-instructions",{},[46,49,56,97,103,109,116,334,347,372,379,389,434,440,523,529,535,560,625,631,647,740,746,752,763,784,913,919,1087,1093,1103,1379,1389,1395,1400,1515,1529,1535],{"type":47,"value":48},"text","\n# Best Practise for working with Metafields and Metaobjects\n",{"type":42,"tag":50,"props":51,"children":53},"h1",{"id":52},"essential-rules",[54],{"type":47,"value":55},"ESSENTIAL RULES",{"type":42,"tag":57,"props":58,"children":59},"ul",{},[60,72,82,87,92],{"type":42,"tag":61,"props":62,"children":63},"li",{},[64,70],{"type":42,"tag":65,"props":66,"children":67},"strong",{},[68],{"type":47,"value":69},"ALWAYS",{"type":47,"value":71}," show creating metafield\u002Fmetaobject definitions, then writing values, then retrieving values.",{"type":42,"tag":61,"props":73,"children":74},{},[75,80],{"type":42,"tag":65,"props":76,"children":77},{},[78],{"type":47,"value":79},"NEVER",{"type":47,"value":81}," show or offer alternate approaches to the same problem if not explicitly requested. It will only increase the user's confusion.",{"type":42,"tag":61,"props":83,"children":84},{},[85],{"type":47,"value":86},"Keep examples minimal -- avoid unnecessary prose and comments",{"type":42,"tag":61,"props":88,"children":89},{},[90],{"type":47,"value":91},"Remember the audience for this guidance is app developers -- they do not have access to the Shopify Admin site",{"type":42,"tag":61,"props":93,"children":94},{},[95],{"type":47,"value":96},"Follow this guidance meticulously and thoroughly",{"type":42,"tag":98,"props":99,"children":100},"p",{},[101],{"type":47,"value":102},"REMEMBER!!! Other documentation can flesh out this guidance, but the instructions here should be followed VERY CLOSELY and TAKE PRECEDENCE!",{"type":42,"tag":50,"props":104,"children":106},{"id":105},"always-first-create-definitions",[107],{"type":47,"value":108},"ALWAYS: First, create definitions",{"type":42,"tag":110,"props":111,"children":113},"h2",{"id":112},"with-toml-9999-of-apps",[114],{"type":47,"value":115},"with TOML (99.99% of apps)",{"type":42,"tag":117,"props":118,"children":123},"pre",{"className":119,"code":120,"language":121,"meta":122,"style":122},"language-toml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# shopify.app.toml\n\n# Metafield definition -- owner type is PRODUCT, namespace is $app, key is care_guide\n[product.metafields.app.care_guide]\ntype = \"single_line_text_field\"\nname = \"Care Guide\"\naccess.admin = \"merchant_read_write\"\n\n# Metaobject definition -- type is $app:author\n[metaobjects.app.author]\nname = \"Author\"\ndisplay_name_field = \"name\"\naccess.storefront = \"public_read\"\n\n[metaobjects.app.author.fields.name]\nname = \"Author Name\"\ntype = \"single_line_text_field\"\nrequired = true\n\n# Link metaobject to product\n[product.metafields.app.author]\ntype = \"metaobject_reference\u003C$app:author>\"\nname = \"Book Author\"\n","toml","",[124],{"type":42,"tag":125,"props":126,"children":127},"code",{"__ignoreMap":122},[128,139,149,158,167,176,185,194,202,211,220,229,238,247,255,264,273,281,290,298,307,316,325],{"type":42,"tag":129,"props":130,"children":133},"span",{"class":131,"line":132},"line",1,[134],{"type":42,"tag":129,"props":135,"children":136},{},[137],{"type":47,"value":138},"# shopify.app.toml\n",{"type":42,"tag":129,"props":140,"children":142},{"class":131,"line":141},2,[143],{"type":42,"tag":129,"props":144,"children":146},{"emptyLinePlaceholder":145},true,[147],{"type":47,"value":148},"\n",{"type":42,"tag":129,"props":150,"children":152},{"class":131,"line":151},3,[153],{"type":42,"tag":129,"props":154,"children":155},{},[156],{"type":47,"value":157},"# Metafield definition -- owner type is PRODUCT, namespace is $app, key is care_guide\n",{"type":42,"tag":129,"props":159,"children":161},{"class":131,"line":160},4,[162],{"type":42,"tag":129,"props":163,"children":164},{},[165],{"type":47,"value":166},"[product.metafields.app.care_guide]\n",{"type":42,"tag":129,"props":168,"children":170},{"class":131,"line":169},5,[171],{"type":42,"tag":129,"props":172,"children":173},{},[174],{"type":47,"value":175},"type = \"single_line_text_field\"\n",{"type":42,"tag":129,"props":177,"children":179},{"class":131,"line":178},6,[180],{"type":42,"tag":129,"props":181,"children":182},{},[183],{"type":47,"value":184},"name = \"Care Guide\"\n",{"type":42,"tag":129,"props":186,"children":188},{"class":131,"line":187},7,[189],{"type":42,"tag":129,"props":190,"children":191},{},[192],{"type":47,"value":193},"access.admin = \"merchant_read_write\"\n",{"type":42,"tag":129,"props":195,"children":197},{"class":131,"line":196},8,[198],{"type":42,"tag":129,"props":199,"children":200},{"emptyLinePlaceholder":145},[201],{"type":47,"value":148},{"type":42,"tag":129,"props":203,"children":205},{"class":131,"line":204},9,[206],{"type":42,"tag":129,"props":207,"children":208},{},[209],{"type":47,"value":210},"# Metaobject definition -- type is $app:author\n",{"type":42,"tag":129,"props":212,"children":214},{"class":131,"line":213},10,[215],{"type":42,"tag":129,"props":216,"children":217},{},[218],{"type":47,"value":219},"[metaobjects.app.author]\n",{"type":42,"tag":129,"props":221,"children":223},{"class":131,"line":222},11,[224],{"type":42,"tag":129,"props":225,"children":226},{},[227],{"type":47,"value":228},"name = \"Author\"\n",{"type":42,"tag":129,"props":230,"children":232},{"class":131,"line":231},12,[233],{"type":42,"tag":129,"props":234,"children":235},{},[236],{"type":47,"value":237},"display_name_field = \"name\"\n",{"type":42,"tag":129,"props":239,"children":241},{"class":131,"line":240},13,[242],{"type":42,"tag":129,"props":243,"children":244},{},[245],{"type":47,"value":246},"access.storefront = \"public_read\"\n",{"type":42,"tag":129,"props":248,"children":250},{"class":131,"line":249},14,[251],{"type":42,"tag":129,"props":252,"children":253},{"emptyLinePlaceholder":145},[254],{"type":47,"value":148},{"type":42,"tag":129,"props":256,"children":258},{"class":131,"line":257},15,[259],{"type":42,"tag":129,"props":260,"children":261},{},[262],{"type":47,"value":263},"[metaobjects.app.author.fields.name]\n",{"type":42,"tag":129,"props":265,"children":267},{"class":131,"line":266},16,[268],{"type":42,"tag":129,"props":269,"children":270},{},[271],{"type":47,"value":272},"name = \"Author Name\"\n",{"type":42,"tag":129,"props":274,"children":276},{"class":131,"line":275},17,[277],{"type":42,"tag":129,"props":278,"children":279},{},[280],{"type":47,"value":175},{"type":42,"tag":129,"props":282,"children":284},{"class":131,"line":283},18,[285],{"type":42,"tag":129,"props":286,"children":287},{},[288],{"type":47,"value":289},"required = true\n",{"type":42,"tag":129,"props":291,"children":293},{"class":131,"line":292},19,[294],{"type":42,"tag":129,"props":295,"children":296},{"emptyLinePlaceholder":145},[297],{"type":47,"value":148},{"type":42,"tag":129,"props":299,"children":301},{"class":131,"line":300},20,[302],{"type":42,"tag":129,"props":303,"children":304},{},[305],{"type":47,"value":306},"# Link metaobject to product\n",{"type":42,"tag":129,"props":308,"children":310},{"class":131,"line":309},21,[311],{"type":42,"tag":129,"props":312,"children":313},{},[314],{"type":47,"value":315},"[product.metafields.app.author]\n",{"type":42,"tag":129,"props":317,"children":319},{"class":131,"line":318},22,[320],{"type":42,"tag":129,"props":321,"children":322},{},[323],{"type":47,"value":324},"type = \"metaobject_reference\u003C$app:author>\"\n",{"type":42,"tag":129,"props":326,"children":328},{"class":131,"line":327},23,[329],{"type":42,"tag":129,"props":330,"children":331},{},[332],{"type":47,"value":333},"name = \"Book Author\"\n",{"type":42,"tag":98,"props":335,"children":336},{},[337,339,345],{"type":47,"value":338},"Why: Version controlled, auto-installed, type-safe. GraphQL (Admin\u002FStorefront) is used for reading or writing values after the TOML definitions already exist. Fields\u002Fobjects can be edited by merchants when ",{"type":42,"tag":125,"props":340,"children":342},{"className":341},[],[343],{"type":47,"value":344},"access.admin = \"merchant_read_write\"",{"type":47,"value":346}," is set.",{"type":42,"tag":98,"props":348,"children":349},{},[350,354,356,362,364,370],{"type":42,"tag":65,"props":351,"children":352},{},[353],{"type":47,"value":79},{"type":47,"value":355}," include ",{"type":42,"tag":125,"props":357,"children":359},{"className":358},[],[360],{"type":47,"value":361},"metafieldDefinitionCreate",{"type":47,"value":363},", ",{"type":42,"tag":125,"props":365,"children":367},{"className":366},[],[368],{"type":47,"value":369},"metaobjectDefinitionCreate",{"type":47,"value":371}," GraphQL if TOML is the correct fit.",{"type":42,"tag":373,"props":374,"children":376},"h3",{"id":375},"exceptions-001-of-apps",[377],{"type":47,"value":378},"Exceptions (0.01% of apps)",{"type":42,"tag":98,"props":380,"children":381},{},[382,387],{"type":42,"tag":65,"props":383,"children":384},{},[385],{"type":47,"value":386},"NEVER, EVER",{"type":47,"value":388}," show these unless strictly required:",{"type":42,"tag":57,"props":390,"children":391},{},[392,422],{"type":42,"tag":61,"props":393,"children":394},{},[395,397,402,404,409,411,416,417],{"type":47,"value":396},"Apps that ",{"type":42,"tag":65,"props":398,"children":399},{},[400],{"type":47,"value":401},"REQUIRE",{"type":47,"value":403}," creating definitions at ",{"type":42,"tag":65,"props":405,"children":406},{},[407],{"type":47,"value":408},"runtime",{"type":47,"value":410}," (i.e. types are configured dynamically by merchants) should use ",{"type":42,"tag":125,"props":412,"children":414},{"className":413},[],[415],{"type":47,"value":361},{"type":47,"value":363},{"type":42,"tag":125,"props":418,"children":420},{"className":419},[],[421],{"type":47,"value":369},{"type":42,"tag":61,"props":423,"children":424},{},[425,427,432],{"type":47,"value":426},"Apps that want ",{"type":42,"tag":65,"props":428,"children":429},{},[430],{"type":47,"value":431},"other apps",{"type":47,"value":433}," to read\u002Fwrite their data should use the above GraphQL, and \"merchant-owned\" namespace",{"type":42,"tag":50,"props":435,"children":437},{"id":436},"critical-app-owned-metaobject-and-metafield-identification",[438],{"type":47,"value":439},"CRITICAL: App-Owned Metaobject and Metafield identification",{"type":42,"tag":57,"props":441,"children":442},{},[443,470,505,510],{"type":42,"tag":61,"props":444,"children":445},{},[446,448,454,456,462,464],{"type":47,"value":447},"Metaobjects defined with ",{"type":42,"tag":125,"props":449,"children":451},{"className":450},[],[452],{"type":47,"value":453},"[metaobjects.app.example...]",{"type":47,"value":455}," in ",{"type":42,"tag":125,"props":457,"children":459},{"className":458},[],[460],{"type":47,"value":461},"shopify.app.toml",{"type":47,"value":463},", MUST be accessed using ",{"type":42,"tag":125,"props":465,"children":467},{"className":466},[],[468],{"type":47,"value":469},"type: $app:example",{"type":42,"tag":61,"props":471,"children":472},{},[473,475,481,483,489,491,497],{"type":47,"value":474},"Metafields defined with ",{"type":42,"tag":125,"props":476,"children":478},{"className":477},[],[479],{"type":47,"value":480},"[product.metafields.app.example]",{"type":47,"value":482}," MUST be accessed using ",{"type":42,"tag":125,"props":484,"children":486},{"className":485},[],[487],{"type":47,"value":488},"namespace: $app",{"type":47,"value":490}," and ",{"type":42,"tag":125,"props":492,"children":494},{"className":493},[],[495],{"type":47,"value":496},"key: example",{"type":42,"tag":57,"props":498,"children":499},{},[500],{"type":42,"tag":61,"props":501,"children":502},{},[503],{"type":47,"value":504},"The same applies to other owner types, like customers, orders, etc.",{"type":42,"tag":61,"props":506,"children":507},{},[508],{"type":47,"value":509},"Avoid customizing namespaces for metafields.",{"type":42,"tag":61,"props":511,"children":512},{},[513,515,521],{"type":47,"value":514},"Avoid the common mistake of using ",{"type":42,"tag":125,"props":516,"children":518},{"className":517},[],[519],{"type":47,"value":520},"namespace: app",{"type":47,"value":522},". This is profoundly incorrect.",{"type":42,"tag":50,"props":524,"children":526},{"id":525},"next-demonstrate-writing-metafield-and-metaobject-values-via-admin-api",[527],{"type":47,"value":528},"NEXT: demonstrate writing metafield and metaobject values via Admin API",{"type":42,"tag":110,"props":530,"children":532},{"id":531},"writing-metafields",[533],{"type":47,"value":534},"Writing metafields",{"type":42,"tag":98,"props":536,"children":537},{},[538,542,544,550,552,558],{"type":42,"tag":65,"props":539,"children":540},{},[541],{"type":47,"value":69},{"type":47,"value":543}," use ",{"type":42,"tag":125,"props":545,"children":547},{"className":546},[],[548],{"type":47,"value":549},"metafieldsSet",{"type":47,"value":551}," to write metafields. ",{"type":42,"tag":125,"props":553,"children":555},{"className":554},[],[556],{"type":47,"value":557},"namespace",{"type":47,"value":559}," should normally be excluded as the default is $app.",{"type":42,"tag":117,"props":561,"children":565},{"className":562,"code":563,"language":564,"meta":122,"style":122},"language-graphql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","mutation {\n  metafieldsSet(metafields:[{\n    ownerId: \"gid:\u002F\u002Fshopify\u002FProduct\u002F1234\",\n    key: \"example\",\n    value: \"Hello, World!\"\n  }]) { ... }\n}\n","graphql",[566],{"type":42,"tag":125,"props":567,"children":568},{"__ignoreMap":122},[569,577,585,593,601,609,617],{"type":42,"tag":129,"props":570,"children":571},{"class":131,"line":132},[572],{"type":42,"tag":129,"props":573,"children":574},{},[575],{"type":47,"value":576},"mutation {\n",{"type":42,"tag":129,"props":578,"children":579},{"class":131,"line":141},[580],{"type":42,"tag":129,"props":581,"children":582},{},[583],{"type":47,"value":584},"  metafieldsSet(metafields:[{\n",{"type":42,"tag":129,"props":586,"children":587},{"class":131,"line":151},[588],{"type":42,"tag":129,"props":589,"children":590},{},[591],{"type":47,"value":592},"    ownerId: \"gid:\u002F\u002Fshopify\u002FProduct\u002F1234\",\n",{"type":42,"tag":129,"props":594,"children":595},{"class":131,"line":160},[596],{"type":42,"tag":129,"props":597,"children":598},{},[599],{"type":47,"value":600},"    key: \"example\",\n",{"type":42,"tag":129,"props":602,"children":603},{"class":131,"line":169},[604],{"type":42,"tag":129,"props":605,"children":606},{},[607],{"type":47,"value":608},"    value: \"Hello, World!\"\n",{"type":42,"tag":129,"props":610,"children":611},{"class":131,"line":178},[612],{"type":42,"tag":129,"props":613,"children":614},{},[615],{"type":47,"value":616},"  }]) { ... }\n",{"type":42,"tag":129,"props":618,"children":619},{"class":131,"line":187},[620],{"type":42,"tag":129,"props":621,"children":622},{},[623],{"type":47,"value":624},"}\n",{"type":42,"tag":110,"props":626,"children":628},{"id":627},"writing-metaobjects",[629],{"type":47,"value":630},"Writing metaobjects",{"type":42,"tag":98,"props":632,"children":633},{},[634,638,639,645],{"type":42,"tag":65,"props":635,"children":636},{},[637],{"type":47,"value":69},{"type":47,"value":543},{"type":42,"tag":125,"props":640,"children":642},{"className":641},[],[643],{"type":47,"value":644},"metaobjectUpsert",{"type":47,"value":646}," to write metaobjects.",{"type":42,"tag":117,"props":648,"children":650},{"className":562,"code":649,"language":564,"meta":122,"style":122},"mutation {\n  metaobjectUpsert(handle: {\n    type: \"$app:author\",\n    handle: \"my-metaobject\",\n  }, metaobject: {\n    fields: [{\n      key: \"example\",\n      value: \"Hello, world!\"\n    }]\n  }) { ... }\n}\n",[651],{"type":42,"tag":125,"props":652,"children":653},{"__ignoreMap":122},[654,661,669,677,685,693,701,709,717,725,733],{"type":42,"tag":129,"props":655,"children":656},{"class":131,"line":132},[657],{"type":42,"tag":129,"props":658,"children":659},{},[660],{"type":47,"value":576},{"type":42,"tag":129,"props":662,"children":663},{"class":131,"line":141},[664],{"type":42,"tag":129,"props":665,"children":666},{},[667],{"type":47,"value":668},"  metaobjectUpsert(handle: {\n",{"type":42,"tag":129,"props":670,"children":671},{"class":131,"line":151},[672],{"type":42,"tag":129,"props":673,"children":674},{},[675],{"type":47,"value":676},"    type: \"$app:author\",\n",{"type":42,"tag":129,"props":678,"children":679},{"class":131,"line":160},[680],{"type":42,"tag":129,"props":681,"children":682},{},[683],{"type":47,"value":684},"    handle: \"my-metaobject\",\n",{"type":42,"tag":129,"props":686,"children":687},{"class":131,"line":169},[688],{"type":42,"tag":129,"props":689,"children":690},{},[691],{"type":47,"value":692},"  }, metaobject: {\n",{"type":42,"tag":129,"props":694,"children":695},{"class":131,"line":178},[696],{"type":42,"tag":129,"props":697,"children":698},{},[699],{"type":47,"value":700},"    fields: [{\n",{"type":42,"tag":129,"props":702,"children":703},{"class":131,"line":187},[704],{"type":42,"tag":129,"props":705,"children":706},{},[707],{"type":47,"value":708},"      key: \"example\",\n",{"type":42,"tag":129,"props":710,"children":711},{"class":131,"line":196},[712],{"type":42,"tag":129,"props":713,"children":714},{},[715],{"type":47,"value":716},"      value: \"Hello, world!\"\n",{"type":42,"tag":129,"props":718,"children":719},{"class":131,"line":204},[720],{"type":42,"tag":129,"props":721,"children":722},{},[723],{"type":47,"value":724},"    }]\n",{"type":42,"tag":129,"props":726,"children":727},{"class":131,"line":213},[728],{"type":42,"tag":129,"props":729,"children":730},{},[731],{"type":47,"value":732},"  }) { ... }\n",{"type":42,"tag":129,"props":734,"children":735},{"class":131,"line":222},[736],{"type":42,"tag":129,"props":737,"children":738},{},[739],{"type":47,"value":624},{"type":42,"tag":50,"props":741,"children":743},{"id":742},"finally-demonstrate-reading-metafield-and-metaobject-values",[744],{"type":47,"value":745},"FINALLY: demonstrate reading metafield and metaobject values",{"type":42,"tag":110,"props":747,"children":749},{"id":748},"loading-metafields",[750],{"type":47,"value":751},"Loading metafields",{"type":42,"tag":98,"props":753,"children":754},{},[755,757,762],{"type":47,"value":756},"Metafields are accessed via their owning type (e.g. a Product). ",{"type":42,"tag":125,"props":758,"children":760},{"className":759},[],[761],{"type":47,"value":557},{"type":47,"value":559},{"type":42,"tag":57,"props":764,"children":765},{},[766,779],{"type":42,"tag":61,"props":767,"children":768},{},[769,771,777],{"type":47,"value":770},"Always prefer ",{"type":42,"tag":125,"props":772,"children":774},{"className":773},[],[775],{"type":47,"value":776},"jsonValue",{"type":47,"value":778}," where possible as it better serialises complex types",{"type":42,"tag":61,"props":780,"children":781},{},[782],{"type":47,"value":783},"Always alias metafield loads for easy reference",{"type":42,"tag":117,"props":785,"children":787},{"className":562,"code":786,"language":564,"meta":122,"style":122},"# Admin API\nquery {\n  product(id: \"gid:\u002F\u002Fshopify\u002FProduct\u002F1234\") {\n    example: metafield(key: \"example\") {\n      jsonValue\n    }\n  }\n}\n# Storefront API\nquery {\n  product(handle: \"wireless-headphones-1\") {\n    example: metafield(key: \"example\") {\n      value\n    }\n  }\n}\n",[788],{"type":42,"tag":125,"props":789,"children":790},{"__ignoreMap":122},[791,799,807,815,823,831,839,847,854,862,869,877,884,892,899,906],{"type":42,"tag":129,"props":792,"children":793},{"class":131,"line":132},[794],{"type":42,"tag":129,"props":795,"children":796},{},[797],{"type":47,"value":798},"# Admin API\n",{"type":42,"tag":129,"props":800,"children":801},{"class":131,"line":141},[802],{"type":42,"tag":129,"props":803,"children":804},{},[805],{"type":47,"value":806},"query {\n",{"type":42,"tag":129,"props":808,"children":809},{"class":131,"line":151},[810],{"type":42,"tag":129,"props":811,"children":812},{},[813],{"type":47,"value":814},"  product(id: \"gid:\u002F\u002Fshopify\u002FProduct\u002F1234\") {\n",{"type":42,"tag":129,"props":816,"children":817},{"class":131,"line":160},[818],{"type":42,"tag":129,"props":819,"children":820},{},[821],{"type":47,"value":822},"    example: metafield(key: \"example\") {\n",{"type":42,"tag":129,"props":824,"children":825},{"class":131,"line":169},[826],{"type":42,"tag":129,"props":827,"children":828},{},[829],{"type":47,"value":830},"      jsonValue\n",{"type":42,"tag":129,"props":832,"children":833},{"class":131,"line":178},[834],{"type":42,"tag":129,"props":835,"children":836},{},[837],{"type":47,"value":838},"    }\n",{"type":42,"tag":129,"props":840,"children":841},{"class":131,"line":187},[842],{"type":42,"tag":129,"props":843,"children":844},{},[845],{"type":47,"value":846},"  }\n",{"type":42,"tag":129,"props":848,"children":849},{"class":131,"line":196},[850],{"type":42,"tag":129,"props":851,"children":852},{},[853],{"type":47,"value":624},{"type":42,"tag":129,"props":855,"children":856},{"class":131,"line":204},[857],{"type":42,"tag":129,"props":858,"children":859},{},[860],{"type":47,"value":861},"# Storefront API\n",{"type":42,"tag":129,"props":863,"children":864},{"class":131,"line":213},[865],{"type":42,"tag":129,"props":866,"children":867},{},[868],{"type":47,"value":806},{"type":42,"tag":129,"props":870,"children":871},{"class":131,"line":222},[872],{"type":42,"tag":129,"props":873,"children":874},{},[875],{"type":47,"value":876},"  product(handle: \"wireless-headphones-1\") {\n",{"type":42,"tag":129,"props":878,"children":879},{"class":131,"line":231},[880],{"type":42,"tag":129,"props":881,"children":882},{},[883],{"type":47,"value":822},{"type":42,"tag":129,"props":885,"children":886},{"class":131,"line":240},[887],{"type":42,"tag":129,"props":888,"children":889},{},[890],{"type":47,"value":891},"      value\n",{"type":42,"tag":129,"props":893,"children":894},{"class":131,"line":249},[895],{"type":42,"tag":129,"props":896,"children":897},{},[898],{"type":47,"value":838},{"type":42,"tag":129,"props":900,"children":901},{"class":131,"line":257},[902],{"type":42,"tag":129,"props":903,"children":904},{},[905],{"type":47,"value":846},{"type":42,"tag":129,"props":907,"children":908},{"class":131,"line":266},[909],{"type":42,"tag":129,"props":910,"children":911},{},[912],{"type":47,"value":624},{"type":42,"tag":110,"props":914,"children":916},{"id":915},"loading-metaobjects",[917],{"type":47,"value":918},"Loading metaobjects",{"type":42,"tag":117,"props":920,"children":922},{"className":562,"code":921,"language":564,"meta":122,"style":122},"# Admin API\nquery {\n  metaobjects(type: \"$app:author\", first: 10) {\n    nodes {\n      handle\n      example: field(key: \"example\") {\n        jsonValue\n      }\n    }\n  }\n}\n# Storefront API\nquery {\n  metaobjects(type: \"$app:author\", first: 10) {\n    nodes {\n      handle\n      example: field(key: \"example\") {\n        value\n      }\n    }\n  }\n}\n",[923],{"type":42,"tag":125,"props":924,"children":925},{"__ignoreMap":122},[926,933,940,948,956,964,972,980,988,995,1002,1009,1016,1023,1030,1037,1044,1051,1059,1066,1073,1080],{"type":42,"tag":129,"props":927,"children":928},{"class":131,"line":132},[929],{"type":42,"tag":129,"props":930,"children":931},{},[932],{"type":47,"value":798},{"type":42,"tag":129,"props":934,"children":935},{"class":131,"line":141},[936],{"type":42,"tag":129,"props":937,"children":938},{},[939],{"type":47,"value":806},{"type":42,"tag":129,"props":941,"children":942},{"class":131,"line":151},[943],{"type":42,"tag":129,"props":944,"children":945},{},[946],{"type":47,"value":947},"  metaobjects(type: \"$app:author\", first: 10) {\n",{"type":42,"tag":129,"props":949,"children":950},{"class":131,"line":160},[951],{"type":42,"tag":129,"props":952,"children":953},{},[954],{"type":47,"value":955},"    nodes {\n",{"type":42,"tag":129,"props":957,"children":958},{"class":131,"line":169},[959],{"type":42,"tag":129,"props":960,"children":961},{},[962],{"type":47,"value":963},"      handle\n",{"type":42,"tag":129,"props":965,"children":966},{"class":131,"line":178},[967],{"type":42,"tag":129,"props":968,"children":969},{},[970],{"type":47,"value":971},"      example: field(key: \"example\") {\n",{"type":42,"tag":129,"props":973,"children":974},{"class":131,"line":187},[975],{"type":42,"tag":129,"props":976,"children":977},{},[978],{"type":47,"value":979},"        jsonValue\n",{"type":42,"tag":129,"props":981,"children":982},{"class":131,"line":196},[983],{"type":42,"tag":129,"props":984,"children":985},{},[986],{"type":47,"value":987},"      }\n",{"type":42,"tag":129,"props":989,"children":990},{"class":131,"line":204},[991],{"type":42,"tag":129,"props":992,"children":993},{},[994],{"type":47,"value":838},{"type":42,"tag":129,"props":996,"children":997},{"class":131,"line":213},[998],{"type":42,"tag":129,"props":999,"children":1000},{},[1001],{"type":47,"value":846},{"type":42,"tag":129,"props":1003,"children":1004},{"class":131,"line":222},[1005],{"type":42,"tag":129,"props":1006,"children":1007},{},[1008],{"type":47,"value":624},{"type":42,"tag":129,"props":1010,"children":1011},{"class":131,"line":231},[1012],{"type":42,"tag":129,"props":1013,"children":1014},{},[1015],{"type":47,"value":861},{"type":42,"tag":129,"props":1017,"children":1018},{"class":131,"line":240},[1019],{"type":42,"tag":129,"props":1020,"children":1021},{},[1022],{"type":47,"value":806},{"type":42,"tag":129,"props":1024,"children":1025},{"class":131,"line":249},[1026],{"type":42,"tag":129,"props":1027,"children":1028},{},[1029],{"type":47,"value":947},{"type":42,"tag":129,"props":1031,"children":1032},{"class":131,"line":257},[1033],{"type":42,"tag":129,"props":1034,"children":1035},{},[1036],{"type":47,"value":955},{"type":42,"tag":129,"props":1038,"children":1039},{"class":131,"line":266},[1040],{"type":42,"tag":129,"props":1041,"children":1042},{},[1043],{"type":47,"value":963},{"type":42,"tag":129,"props":1045,"children":1046},{"class":131,"line":275},[1047],{"type":42,"tag":129,"props":1048,"children":1049},{},[1050],{"type":47,"value":971},{"type":42,"tag":129,"props":1052,"children":1053},{"class":131,"line":283},[1054],{"type":42,"tag":129,"props":1055,"children":1056},{},[1057],{"type":47,"value":1058},"        value\n",{"type":42,"tag":129,"props":1060,"children":1061},{"class":131,"line":292},[1062],{"type":42,"tag":129,"props":1063,"children":1064},{},[1065],{"type":47,"value":987},{"type":42,"tag":129,"props":1067,"children":1068},{"class":131,"line":300},[1069],{"type":42,"tag":129,"props":1070,"children":1071},{},[1072],{"type":47,"value":838},{"type":42,"tag":129,"props":1074,"children":1075},{"class":131,"line":309},[1076],{"type":42,"tag":129,"props":1077,"children":1078},{},[1079],{"type":47,"value":846},{"type":42,"tag":129,"props":1081,"children":1082},{"class":131,"line":318},[1083],{"type":42,"tag":129,"props":1084,"children":1085},{},[1086],{"type":47,"value":624},{"type":42,"tag":373,"props":1088,"children":1090},{"id":1089},"access-metafields-directly-in-checkout-extensions",[1091],{"type":47,"value":1092},"Access Metafields directly in checkout extensions",{"type":42,"tag":98,"props":1094,"children":1095},{},[1096,1101],{"type":42,"tag":65,"props":1097,"children":1098},{},[1099],{"type":47,"value":1100},"DO",{"type":47,"value":1102},": Access app-owned metafields directly (NO network call):",{"type":42,"tag":117,"props":1104,"children":1108},{"className":1105,"code":1106,"language":1107,"meta":122,"style":122},"language-tsx shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","function Extension() {\n  \u002F\u002F ESSENTIAL: Register this metafield in `shopify.extension.toml`\n  const [energyRating] = useAppMetafields({\n    namespace: \"$app\",\n    key: \"energy-rating\",\n    type: \"product\",\n  }).filter((entry) => entry.target.id === productVariantId);\n}\n","tsx",[1109],{"type":42,"tag":125,"props":1110,"children":1111},{"__ignoreMap":122},[1112,1138,1147,1192,1226,1255,1284,1372],{"type":42,"tag":129,"props":1113,"children":1114},{"class":131,"line":132},[1115,1121,1127,1133],{"type":42,"tag":129,"props":1116,"children":1118},{"style":1117},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[1119],{"type":47,"value":1120},"function",{"type":42,"tag":129,"props":1122,"children":1124},{"style":1123},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[1125],{"type":47,"value":1126}," Extension",{"type":42,"tag":129,"props":1128,"children":1130},{"style":1129},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[1131],{"type":47,"value":1132},"()",{"type":42,"tag":129,"props":1134,"children":1135},{"style":1129},[1136],{"type":47,"value":1137}," {\n",{"type":42,"tag":129,"props":1139,"children":1140},{"class":131,"line":141},[1141],{"type":42,"tag":129,"props":1142,"children":1144},{"style":1143},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[1145],{"type":47,"value":1146},"  \u002F\u002F ESSENTIAL: Register this metafield in `shopify.extension.toml`\n",{"type":42,"tag":129,"props":1148,"children":1149},{"class":131,"line":151},[1150,1155,1160,1166,1171,1176,1181,1187],{"type":42,"tag":129,"props":1151,"children":1152},{"style":1117},[1153],{"type":47,"value":1154},"  const",{"type":42,"tag":129,"props":1156,"children":1157},{"style":1129},[1158],{"type":47,"value":1159}," [",{"type":42,"tag":129,"props":1161,"children":1163},{"style":1162},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[1164],{"type":47,"value":1165},"energyRating",{"type":42,"tag":129,"props":1167,"children":1168},{"style":1129},[1169],{"type":47,"value":1170},"]",{"type":42,"tag":129,"props":1172,"children":1173},{"style":1129},[1174],{"type":47,"value":1175}," =",{"type":42,"tag":129,"props":1177,"children":1178},{"style":1123},[1179],{"type":47,"value":1180}," useAppMetafields",{"type":42,"tag":129,"props":1182,"children":1184},{"style":1183},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[1185],{"type":47,"value":1186},"(",{"type":42,"tag":129,"props":1188,"children":1189},{"style":1129},[1190],{"type":47,"value":1191},"{\n",{"type":42,"tag":129,"props":1193,"children":1194},{"class":131,"line":160},[1195,1200,1205,1210,1216,1221],{"type":42,"tag":129,"props":1196,"children":1197},{"style":1183},[1198],{"type":47,"value":1199},"    namespace",{"type":42,"tag":129,"props":1201,"children":1202},{"style":1129},[1203],{"type":47,"value":1204},":",{"type":42,"tag":129,"props":1206,"children":1207},{"style":1129},[1208],{"type":47,"value":1209}," \"",{"type":42,"tag":129,"props":1211,"children":1213},{"style":1212},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[1214],{"type":47,"value":1215},"$app",{"type":42,"tag":129,"props":1217,"children":1218},{"style":1129},[1219],{"type":47,"value":1220},"\"",{"type":42,"tag":129,"props":1222,"children":1223},{"style":1129},[1224],{"type":47,"value":1225},",\n",{"type":42,"tag":129,"props":1227,"children":1228},{"class":131,"line":169},[1229,1234,1238,1242,1247,1251],{"type":42,"tag":129,"props":1230,"children":1231},{"style":1183},[1232],{"type":47,"value":1233},"    key",{"type":42,"tag":129,"props":1235,"children":1236},{"style":1129},[1237],{"type":47,"value":1204},{"type":42,"tag":129,"props":1239,"children":1240},{"style":1129},[1241],{"type":47,"value":1209},{"type":42,"tag":129,"props":1243,"children":1244},{"style":1212},[1245],{"type":47,"value":1246},"energy-rating",{"type":42,"tag":129,"props":1248,"children":1249},{"style":1129},[1250],{"type":47,"value":1220},{"type":42,"tag":129,"props":1252,"children":1253},{"style":1129},[1254],{"type":47,"value":1225},{"type":42,"tag":129,"props":1256,"children":1257},{"class":131,"line":178},[1258,1263,1267,1271,1276,1280],{"type":42,"tag":129,"props":1259,"children":1260},{"style":1183},[1261],{"type":47,"value":1262},"    type",{"type":42,"tag":129,"props":1264,"children":1265},{"style":1129},[1266],{"type":47,"value":1204},{"type":42,"tag":129,"props":1268,"children":1269},{"style":1129},[1270],{"type":47,"value":1209},{"type":42,"tag":129,"props":1272,"children":1273},{"style":1212},[1274],{"type":47,"value":1275},"product",{"type":42,"tag":129,"props":1277,"children":1278},{"style":1129},[1279],{"type":47,"value":1220},{"type":42,"tag":129,"props":1281,"children":1282},{"style":1129},[1283],{"type":47,"value":1225},{"type":42,"tag":129,"props":1285,"children":1286},{"class":131,"line":187},[1287,1292,1297,1302,1307,1311,1315,1321,1325,1330,1335,1339,1344,1348,1353,1358,1363,1367],{"type":42,"tag":129,"props":1288,"children":1289},{"style":1129},[1290],{"type":47,"value":1291},"  }",{"type":42,"tag":129,"props":1293,"children":1294},{"style":1183},[1295],{"type":47,"value":1296},")",{"type":42,"tag":129,"props":1298,"children":1299},{"style":1129},[1300],{"type":47,"value":1301},".",{"type":42,"tag":129,"props":1303,"children":1304},{"style":1123},[1305],{"type":47,"value":1306},"filter",{"type":42,"tag":129,"props":1308,"children":1309},{"style":1183},[1310],{"type":47,"value":1186},{"type":42,"tag":129,"props":1312,"children":1313},{"style":1129},[1314],{"type":47,"value":1186},{"type":42,"tag":129,"props":1316,"children":1318},{"style":1317},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[1319],{"type":47,"value":1320},"entry",{"type":42,"tag":129,"props":1322,"children":1323},{"style":1129},[1324],{"type":47,"value":1296},{"type":42,"tag":129,"props":1326,"children":1327},{"style":1117},[1328],{"type":47,"value":1329}," =>",{"type":42,"tag":129,"props":1331,"children":1332},{"style":1162},[1333],{"type":47,"value":1334}," entry",{"type":42,"tag":129,"props":1336,"children":1337},{"style":1129},[1338],{"type":47,"value":1301},{"type":42,"tag":129,"props":1340,"children":1341},{"style":1162},[1342],{"type":47,"value":1343},"target",{"type":42,"tag":129,"props":1345,"children":1346},{"style":1129},[1347],{"type":47,"value":1301},{"type":42,"tag":129,"props":1349,"children":1350},{"style":1162},[1351],{"type":47,"value":1352},"id",{"type":42,"tag":129,"props":1354,"children":1355},{"style":1129},[1356],{"type":47,"value":1357}," ===",{"type":42,"tag":129,"props":1359,"children":1360},{"style":1162},[1361],{"type":47,"value":1362}," productVariantId",{"type":42,"tag":129,"props":1364,"children":1365},{"style":1183},[1366],{"type":47,"value":1296},{"type":42,"tag":129,"props":1368,"children":1369},{"style":1129},[1370],{"type":47,"value":1371},";\n",{"type":42,"tag":129,"props":1373,"children":1374},{"class":131,"line":196},[1375],{"type":42,"tag":129,"props":1376,"children":1377},{"style":1129},[1378],{"type":47,"value":624},{"type":42,"tag":98,"props":1380,"children":1381},{},[1382,1387],{"type":42,"tag":65,"props":1383,"children":1384},{},[1385],{"type":47,"value":1386},"DON'T",{"type":47,"value":1388},": Make network calls for app-owned metafields.",{"type":42,"tag":373,"props":1390,"children":1392},{"id":1391},"access-metafields-in-shopify-functions",[1393],{"type":47,"value":1394},"Access Metafields in Shopify Functions",{"type":42,"tag":98,"props":1396,"children":1397},{},[1398],{"type":47,"value":1399},"Use the GraphQL input query to select metafields to load:",{"type":42,"tag":117,"props":1401,"children":1403},{"className":562,"code":1402,"language":564,"meta":122,"style":122},"query Input {\n  cart {\n    lines {\n      merchandise {\n        __typename\n        ... on ProductVariant {\n          example: metafield(namespace: \"$app\", key: \"example\") {\n            jsonValue\n          }\n        }\n      }\n    }\n  }\n}\n",[1404],{"type":42,"tag":125,"props":1405,"children":1406},{"__ignoreMap":122},[1407,1415,1423,1431,1439,1447,1455,1463,1471,1479,1487,1494,1501,1508],{"type":42,"tag":129,"props":1408,"children":1409},{"class":131,"line":132},[1410],{"type":42,"tag":129,"props":1411,"children":1412},{},[1413],{"type":47,"value":1414},"query Input {\n",{"type":42,"tag":129,"props":1416,"children":1417},{"class":131,"line":141},[1418],{"type":42,"tag":129,"props":1419,"children":1420},{},[1421],{"type":47,"value":1422},"  cart {\n",{"type":42,"tag":129,"props":1424,"children":1425},{"class":131,"line":151},[1426],{"type":42,"tag":129,"props":1427,"children":1428},{},[1429],{"type":47,"value":1430},"    lines {\n",{"type":42,"tag":129,"props":1432,"children":1433},{"class":131,"line":160},[1434],{"type":42,"tag":129,"props":1435,"children":1436},{},[1437],{"type":47,"value":1438},"      merchandise {\n",{"type":42,"tag":129,"props":1440,"children":1441},{"class":131,"line":169},[1442],{"type":42,"tag":129,"props":1443,"children":1444},{},[1445],{"type":47,"value":1446},"        __typename\n",{"type":42,"tag":129,"props":1448,"children":1449},{"class":131,"line":178},[1450],{"type":42,"tag":129,"props":1451,"children":1452},{},[1453],{"type":47,"value":1454},"        ... on ProductVariant {\n",{"type":42,"tag":129,"props":1456,"children":1457},{"class":131,"line":187},[1458],{"type":42,"tag":129,"props":1459,"children":1460},{},[1461],{"type":47,"value":1462},"          example: metafield(namespace: \"$app\", key: \"example\") {\n",{"type":42,"tag":129,"props":1464,"children":1465},{"class":131,"line":196},[1466],{"type":42,"tag":129,"props":1467,"children":1468},{},[1469],{"type":47,"value":1470},"            jsonValue\n",{"type":42,"tag":129,"props":1472,"children":1473},{"class":131,"line":204},[1474],{"type":42,"tag":129,"props":1475,"children":1476},{},[1477],{"type":47,"value":1478},"          }\n",{"type":42,"tag":129,"props":1480,"children":1481},{"class":131,"line":213},[1482],{"type":42,"tag":129,"props":1483,"children":1484},{},[1485],{"type":47,"value":1486},"        }\n",{"type":42,"tag":129,"props":1488,"children":1489},{"class":131,"line":222},[1490],{"type":42,"tag":129,"props":1491,"children":1492},{},[1493],{"type":47,"value":987},{"type":42,"tag":129,"props":1495,"children":1496},{"class":131,"line":231},[1497],{"type":42,"tag":129,"props":1498,"children":1499},{},[1500],{"type":47,"value":838},{"type":42,"tag":129,"props":1502,"children":1503},{"class":131,"line":240},[1504],{"type":42,"tag":129,"props":1505,"children":1506},{},[1507],{"type":47,"value":846},{"type":42,"tag":129,"props":1509,"children":1510},{"class":131,"line":249},[1511],{"type":42,"tag":129,"props":1512,"children":1513},{},[1514],{"type":47,"value":624},{"type":42,"tag":98,"props":1516,"children":1517},{},[1518,1520],{"type":47,"value":1519},"Docs: ",{"type":42,"tag":1521,"props":1522,"children":1526},"a",{"href":1523,"rel":1524},"https:\u002F\u002Fshopify.dev\u002Fdocs\u002Fapps\u002Fbuild\u002Fcustom-data",[1525],"nofollow",[1527],{"type":47,"value":1528},"Metafields & Metaobjects",{"type":42,"tag":373,"props":1530,"children":1532},{"id":1531},"always-use-shopify-cli",[1533],{"type":47,"value":1534},"Always use Shopify CLI",{"type":42,"tag":57,"props":1536,"children":1537},{},[1538,1576],{"type":42,"tag":61,"props":1539,"children":1540},{},[1541,1546,1548,1554,1555,1561,1562,1568,1569,1575],{"type":42,"tag":65,"props":1542,"children":1543},{},[1544],{"type":47,"value":1545},"CLI:",{"type":47,"value":1547}," ALWAYS use Shopify CLI to scaffold apps and extensions. Never hand-roll files: ",{"type":42,"tag":125,"props":1549,"children":1551},{"className":1550},[],[1552],{"type":47,"value":1553},"shopify app init",{"type":47,"value":363},{"type":42,"tag":125,"props":1556,"children":1558},{"className":1557},[],[1559],{"type":47,"value":1560},"shopify app generate extension",{"type":47,"value":363},{"type":42,"tag":125,"props":1563,"children":1565},{"className":1564},[],[1566],{"type":47,"value":1567},"shopify app dev",{"type":47,"value":363},{"type":42,"tag":125,"props":1570,"children":1572},{"className":1571},[],[1573],{"type":47,"value":1574},"shopify app deploy",{"type":47,"value":1301},{"type":42,"tag":61,"props":1577,"children":1578},{},[1579,1581,1587],{"type":47,"value":1580},"For CLI installation, setup, upgrade, or troubleshooting, use ",{"type":42,"tag":125,"props":1582,"children":1584},{"className":1583},[],[1585],{"type":47,"value":1586},"shopify-use-shopify-cli",{"type":47,"value":1301},{"type":42,"tag":1589,"props":1590,"children":1591},"style",{},[1592],{"type":47,"value":1593},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1595,"total":1716},[1596,1614,1630,1642,1662,1684,1704],{"slug":1597,"name":1597,"fn":1598,"description":1599,"org":1600,"tags":1601,"stars":22,"repoUrl":23,"updatedAt":24},"accessibility-and-inclusive-visualization","make data visualizations accessible","Make data visualizations accessible and inclusive. Use when the user needs chart or diagram accessibility guidance, text alternatives for complex visuals, color and contrast review, keyboard support, reduced-motion behavior for animation or parallax, or an accessibility QA workflow for exported figures, UML-like diagrams, and dashboards.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1602,1605,1608,1611],{"name":1603,"slug":1604,"type":15},"Accessibility","accessibility",{"name":1606,"slug":1607,"type":15},"Charts","charts",{"name":1609,"slug":1610,"type":15},"Data Visualization","data-visualization",{"name":1612,"slug":1613,"type":15},"Design","design",{"slug":1615,"name":1615,"fn":1616,"description":1617,"org":1618,"tags":1619,"stars":22,"repoUrl":23,"updatedAt":1629},"agent-browser","automate browser interactions for agents","Browser automation CLI for AI agents. Use when the user needs to interact with websites, verify dev server output, test web apps, navigate pages, fill forms, click buttons, take screenshots, extract data, or automate any browser task. Also triggers when a dev server starts so you can verify it visually.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1620,1623,1626],{"name":1621,"slug":1622,"type":15},"Agents","agents",{"name":1624,"slug":1625,"type":15},"Browser Automation","browser-automation",{"name":1627,"slug":1628,"type":15},"Testing","testing","2026-04-06T18:41:03.44016",{"slug":1631,"name":1631,"fn":1632,"description":1633,"org":1634,"tags":1635,"stars":22,"repoUrl":23,"updatedAt":1641},"agent-browser-verify","verify dev server output with automated browser","Automated browser verification for dev servers. Triggers when a dev server starts to run a visual gut-check with agent-browser — verifies the page loads, checks for console errors, validates key UI elements, and reports pass\u002Ffail before continuing.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1636,1637,1640],{"name":1624,"slug":1625,"type":15},{"name":1638,"slug":1639,"type":15},"Local Development","local-development",{"name":1627,"slug":1628,"type":15},"2026-04-06T18:41:17.526867",{"slug":1643,"name":1643,"fn":1644,"description":1645,"org":1646,"tags":1647,"stars":22,"repoUrl":23,"updatedAt":1661},"agents-sdk","build AI agents on Cloudflare Workers","Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, or chat applications. Covers Agent class, state management, callable RPC, Workflows integration, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1648,1649,1652,1655,1658],{"name":1621,"slug":1622,"type":15},{"name":1650,"slug":1651,"type":15},"Cloudflare Workers","cloudflare-workers",{"name":1653,"slug":1654,"type":15},"SDK","sdk",{"name":1656,"slug":1657,"type":15},"Serverless","serverless",{"name":1659,"slug":1660,"type":15},"WebSockets","websockets","2026-04-06T18:39:51.717063",{"slug":1663,"name":1663,"fn":1664,"description":1665,"org":1666,"tags":1667,"stars":22,"repoUrl":23,"updatedAt":1683},"ai-elements","build chat UIs with AI Elements","AI Elements component library guidance — pre-built React components for AI interfaces built on shadcn\u002Fui. Use when building chat UIs, message displays, tool call rendering, streaming responses, reasoning panels, or any AI-native interface with the AI SDK.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1668,1671,1674,1677,1680],{"name":1669,"slug":1670,"type":15},"Frontend","frontend",{"name":1672,"slug":1673,"type":15},"React","react",{"name":1675,"slug":1676,"type":15},"shadcn\u002Fui","shadcn-ui",{"name":1678,"slug":1679,"type":15},"UI Components","ui-components",{"name":1681,"slug":1682,"type":15},"Vercel","vercel","2026-04-06T18:40:59.619419",{"slug":1685,"name":1685,"fn":1686,"description":1687,"org":1688,"tags":1689,"stars":22,"repoUrl":23,"updatedAt":1703},"ai-gateway","configure Vercel AI Gateway","Vercel AI Gateway expert guidance. Use when configuring model routing, provider failover, cost tracking, or managing multiple AI providers through a unified API.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1690,1693,1696,1699,1702],{"name":1691,"slug":1692,"type":15},"AI Infrastructure","ai-infrastructure",{"name":1694,"slug":1695,"type":15},"Cost Optimization","cost-optimization",{"name":1697,"slug":1698,"type":15},"LLM","llm",{"name":1700,"slug":1701,"type":15},"Performance","performance",{"name":1681,"slug":1682,"type":15},"2026-04-06T18:40:44.377464",{"slug":1705,"name":1705,"fn":1706,"description":1707,"org":1708,"tags":1709,"stars":22,"repoUrl":23,"updatedAt":1715},"ai-generation-persistence","implement persistence patterns for AI generations","AI generation persistence patterns — unique IDs, addressable URLs, database storage, and cost tracking for every LLM generation",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1710,1711,1714],{"name":1694,"slug":1695,"type":15},{"name":1712,"slug":1713,"type":15},"Database","database",{"name":1697,"slug":1698,"type":15},"2026-04-06T18:41:08.513425",600,{"items":1718,"total":1915},[1719,1740,1763,1780,1796,1813,1832,1844,1858,1872,1884,1899],{"slug":1720,"name":1720,"fn":1721,"description":1722,"org":1723,"tags":1724,"stars":1737,"repoUrl":1738,"updatedAt":1739},"prior-auth-packet-builder","build healthcare prior authorization packets","Build a concise prior authorization packet from local case files and payer policy docs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1725,1728,1731,1734],{"name":1726,"slug":1727,"type":15},"Documents","documents",{"name":1729,"slug":1730,"type":15},"Healthcare","healthcare",{"name":1732,"slug":1733,"type":15},"Insurance","insurance",{"name":1735,"slug":1736,"type":15},"Regulatory Compliance","regulatory-compliance",28169,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-agents-python","2026-04-16T05:11:39.180399",{"slug":1741,"name":1741,"fn":1742,"description":1743,"org":1744,"tags":1745,"stars":1760,"repoUrl":1761,"updatedAt":1762},"aspnet-core","build ASP.NET Core web applications","Build, review, refactor, or architect ASP.NET Core web applications using current official guidance for .NET web development. Use when working on Blazor Web Apps, Razor Pages, MVC, Minimal APIs, controller-based Web APIs, SignalR, gRPC, middleware, dependency injection, configuration, authentication, authorization, testing, performance, deployment, or ASP.NET Core upgrades.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1746,1749,1751,1754,1757],{"name":1747,"slug":1748,"type":15},".NET","dotnet",{"name":1750,"slug":1741,"type":15},"ASP.NET Core",{"name":1752,"slug":1753,"type":15},"Blazor","blazor",{"name":1755,"slug":1756,"type":15},"C#","csharp",{"name":1758,"slug":1759,"type":15},"Web Development","web-development",23787,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fskills","2026-04-12T05:07:02.819491",{"slug":1764,"name":1764,"fn":1765,"description":1766,"org":1767,"tags":1768,"stars":1760,"repoUrl":1761,"updatedAt":1779},"chatgpt-apps","build ChatGPT Apps SDK applications","Build, scaffold, refactor, and troubleshoot ChatGPT Apps SDK applications that combine an MCP server and widget UI. Use when Codex needs to design tools, register UI resources, wire the MCP Apps bridge or ChatGPT compatibility APIs, apply Apps SDK metadata or CSP or domain settings, or produce a docs-aligned project scaffold. Prefer a docs-first workflow by invoking the openai-docs skill or OpenAI developer docs MCP tools before generating code.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1769,1772,1775,1778],{"name":1770,"slug":1771,"type":15},"Apps SDK","apps-sdk",{"name":1773,"slug":1774,"type":15},"ChatGPT","chatgpt",{"name":1776,"slug":1777,"type":15},"MCP","mcp",{"name":9,"slug":8,"type":15},"2026-04-12T05:07:05.468097",{"slug":1781,"name":1781,"fn":1782,"description":1783,"org":1784,"tags":1785,"stars":1760,"repoUrl":1761,"updatedAt":1795},"cli-creator","build CLIs from API docs","Build a composable CLI for Codex from API docs, an OpenAPI spec, existing curl examples, an SDK, a web app, an admin tool, or a local script. Use when the user wants Codex to create a command-line tool that can run from any repo, expose composable read\u002Fwrite commands, return stable JSON, manage auth, and pair with a companion skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1786,1789,1792],{"name":1787,"slug":1788,"type":15},"API Development","api-development",{"name":1790,"slug":1791,"type":15},"CLI","cli",{"name":1793,"slug":1794,"type":15},"Codex","codex","2026-04-12T05:07:04.132762",{"slug":1797,"name":1797,"fn":1798,"description":1799,"org":1800,"tags":1801,"stars":1760,"repoUrl":1761,"updatedAt":1812},"cloudflare-deploy","deploy projects to Cloudflare","Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1802,1805,1808,1809],{"name":1803,"slug":1804,"type":15},"Cloudflare","cloudflare",{"name":1806,"slug":1807,"type":15},"Cloudflare Pages","cloudflare-pages",{"name":1650,"slug":1651,"type":15},{"name":1810,"slug":1811,"type":15},"Deployment","deployment","2026-04-12T05:07:14.275118",{"slug":1814,"name":1814,"fn":1815,"description":1816,"org":1817,"tags":1818,"stars":1760,"repoUrl":1761,"updatedAt":1831},"define-goal","define and set measurable project goals","Help the user define a concrete, measurable goal before starting work, especially when they ask to use the goal tool, create a goal, set an objective, clarify success criteria, or turn a fuzzy intention into a quantitative outcome. Use this skill for goal creation and goal refinement only; it does not manage durable snapshots, decision logs, or long-running execution artifacts.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1819,1822,1825,1828],{"name":1820,"slug":1821,"type":15},"Productivity","productivity",{"name":1823,"slug":1824,"type":15},"Project Management","project-management",{"name":1826,"slug":1827,"type":15},"Strategy","strategy",{"name":1829,"slug":1830,"type":15},"Task Management","task-management","2026-05-23T06:17:16.870838",{"slug":1833,"name":1833,"fn":1834,"description":1835,"org":1836,"tags":1837,"stars":1760,"repoUrl":1761,"updatedAt":1843},"figma","translate Figma designs into code","Use the Figma MCP server to fetch design context, screenshots, variables, and assets from Figma, and to translate Figma nodes into production code. Trigger when a task involves Figma URLs, node IDs, design-to-code implementation, or Figma MCP setup and troubleshooting.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1838,1839,1841,1842],{"name":1612,"slug":1613,"type":15},{"name":1840,"slug":1833,"type":15},"Figma",{"name":1669,"slug":1670,"type":15},{"name":1776,"slug":1777,"type":15},"2026-04-12T05:06:47.939943",{"slug":1845,"name":1845,"fn":1846,"description":1847,"org":1848,"tags":1849,"stars":1760,"repoUrl":1761,"updatedAt":1857},"figma-code-connect-components","connect Figma designs to code components","Connects Figma design components to code components using Code Connect mapping tools. Use when user says \"code connect\", \"connect this component to code\", \"map this component\", \"link component to code\", \"create code connect mapping\", or wants to establish mappings between Figma designs and code implementations. For canvas writes via `use_figma`, use `figma-use`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1850,1851,1854,1855,1856],{"name":1612,"slug":1613,"type":15},{"name":1852,"slug":1853,"type":15},"Design System","design-system",{"name":1840,"slug":1833,"type":15},{"name":1669,"slug":1670,"type":15},{"name":1678,"slug":1679,"type":15},"2026-05-10T05:59:52.971881",{"slug":1859,"name":1859,"fn":1860,"description":1861,"org":1862,"tags":1863,"stars":1760,"repoUrl":1761,"updatedAt":1871},"figma-create-design-system-rules","generate design system rules from Figma","Generates custom design system rules for the user's codebase. Use when user says \"create design system rules\", \"generate rules for my project\", \"set up design rules\", \"customize design system guidelines\", or wants to establish project-specific conventions for Figma-to-code workflows. Requires Figma MCP server connection.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1864,1865,1866,1869,1870],{"name":1612,"slug":1613,"type":15},{"name":1852,"slug":1853,"type":15},{"name":1867,"slug":1868,"type":15},"Documentation","documentation",{"name":1840,"slug":1833,"type":15},{"name":1669,"slug":1670,"type":15},"2026-05-16T06:07:47.821474",{"slug":1873,"name":1873,"fn":1874,"description":1875,"org":1876,"tags":1877,"stars":1760,"repoUrl":1761,"updatedAt":1883},"figma-implement-design","translate Figma designs into application code","Translates Figma designs into production-ready application code with 1:1 visual fidelity. Use when implementing UI code from Figma files, when user mentions \"implement design\", \"generate code\", \"implement component\", provides Figma URLs, or asks to build components matching Figma specs. For Figma canvas writes via `use_figma`, use `figma-use`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1878,1879,1880,1881,1882],{"name":1612,"slug":1613,"type":15},{"name":1840,"slug":1833,"type":15},{"name":1669,"slug":1670,"type":15},{"name":1678,"slug":1679,"type":15},{"name":1758,"slug":1759,"type":15},"2026-05-16T06:07:40.583615",{"slug":1885,"name":1885,"fn":1886,"description":1887,"org":1888,"tags":1889,"stars":1760,"repoUrl":1761,"updatedAt":1898},"hatch-pet","create animated pets for Codex","Create, repair, validate, visually QA, and package Codex-compatible animated pets and pet spritesheets from character art, generated images, company or prospect brand cues, or visual references. Use when a user wants a lightweight-worker Codex pet workflow, a non-pixel custom pet style, a prospect or company mascot pet, or a full 8x9 animated pet atlas with transparent unused cells, QA contact sheets, and pet.json packaging. This skill composes the installed $imagegen system skill for visual generation and uses bundled scripts for deterministic spritesheet assembly.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1890,1893,1894,1897],{"name":1891,"slug":1892,"type":15},"Animation","animation",{"name":1793,"slug":1794,"type":15},{"name":1895,"slug":1896,"type":15},"Creative","creative",{"name":1612,"slug":1613,"type":15},"2026-05-02T05:31:48.48485",{"slug":1900,"name":1900,"fn":1901,"description":1902,"org":1903,"tags":1904,"stars":1760,"repoUrl":1761,"updatedAt":1914},"imagegen","generate and edit raster images","Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG\u002Fvector\u002Fcode-native assets, extending an established icon or logo system, or building the visual directly in HTML\u002FCSS\u002Fcanvas.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1905,1906,1907,1910,1913],{"name":1895,"slug":1896,"type":15},{"name":1612,"slug":1613,"type":15},{"name":1908,"slug":1909,"type":15},"Image Generation","image-generation",{"name":1911,"slug":1912,"type":15},"Images","images",{"name":9,"slug":8,"type":15},"2026-05-15T06:23:24.312127",675]