# Run each mutation in the Shopify Admin GraphQL API (2025-07 or later), e.g. in the GraphiQL app. # Requires the write_metafield_definitions scope. Storefront access is PUBLIC_READ so the theme and Finder can read them. mutation Create_fit_note { metafieldDefinitionCreate(definition: { namespace: "jaus", key: "fit_note", name: "Fit note", type: "single_line_text_field", ownerType: PRODUCT, pin: true, description: "How the style runs, as stated by the label or confirmed by customer fit feedback.", access: { storefront: PUBLIC_READ }, validations: [{name: "choices", value: "[\"true to size\", \"runs small\", \"runs large\", \"size up\", \"size down\", \"fitted\", \"relaxed fit\"]"}] }) { createdDefinition { id name } userErrors { field message code } } } mutation Create_model_height { metafieldDefinitionCreate(definition: { namespace: "jaus", key: "model_height", name: "Model height", type: "single_line_text_field", ownerType: PRODUCT, pin: true, description: "Height of the model in the product photos, e.g. 5'8\" or 175cm.", access: { storefront: PUBLIC_READ } }) { createdDefinition { id name } userErrors { field message code } } } mutation Create_model_wears { metafieldDefinitionCreate(definition: { namespace: "jaus", key: "model_wears", name: "Model wears", type: "single_line_text_field", ownerType: PRODUCT, pin: true, description: "Size the model wears in the photos (store sizing: XXS\u20133XL).", access: { storefront: PUBLIC_READ }, validations: [{name: "choices", value: "[\"XXS\", \"XS\", \"S\", \"M\", \"L\", \"XL\", \"XXL\", \"3XL\"]"}] }) { createdDefinition { id name } userErrors { field message code } } } mutation Create_stretch { metafieldDefinitionCreate(definition: { namespace: "jaus", key: "stretch", name: "Stretch fabric", type: "boolean", ownerType: PRODUCT, pin: true, description: "True when the fabric has stretch.", access: { storefront: PUBLIC_READ } }) { createdDefinition { id name } userErrors { field message code } } } mutation Create_lining { metafieldDefinitionCreate(definition: { namespace: "jaus", key: "lining", name: "Lining", type: "single_line_text_field", ownerType: PRODUCT, pin: true, description: "Lined or unlined.", access: { storefront: PUBLIC_READ }, validations: [{name: "choices", value: "[\"lined\", \"unlined\", \"partially lined\"]"}] }) { createdDefinition { id name } userErrors { field message code } } } mutation Create_fabric { metafieldDefinitionCreate(definition: { namespace: "jaus", key: "fabric", name: "Fabric composition", type: "single_line_text_field", ownerType: PRODUCT, pin: true, description: "e.g. 86% polyester, 14% spandex.", access: { storefront: PUBLIC_READ } }) { createdDefinition { id name } userErrors { field message code } } } mutation Create_length { metafieldDefinitionCreate(definition: { namespace: "jaus", key: "length", name: "Length", type: "single_line_text_field", ownerType: PRODUCT, pin: true, description: "Dress length class used by filters and the Finder.", access: { storefront: PUBLIC_READ }, validations: [{name: "choices", value: "[\"mini\", \"midi\", \"maxi\", \"gown\"]"}] }) { createdDefinition { id name } userErrors { field message code } } } mutation Create_occasion { metafieldDefinitionCreate(definition: { namespace: "jaus", key: "occasion", name: "Occasions", type: "list.single_line_text_field", ownerType: PRODUCT, pin: true, description: "Occasions this style is merchandised for. Drives the Finder and occasion filters.", access: { storefront: PUBLIC_READ }, validations: [{name: "choices", value: "[\"wedding guest\", \"black tie\", \"bride\", \"bridesmaid\", \"prom\", \"homecoming\", \"night out\", \"vacation\", \"graduation\", \"bridal shower\"]"}] }) { createdDefinition { id name } userErrors { field message code } } } mutation Create_color_family { metafieldDefinitionCreate(definition: { namespace: "jaus", key: "color_family", name: "Color family", type: "single_line_text_field", ownerType: PRODUCT, pin: true, description: "One of 18 families so wine, merlot and cherry all filter as wine.", access: { storefront: PUBLIC_READ }, validations: [{name: "choices", value: "[\"black\", \"white\", \"red\", \"wine\", \"pink\", \"blue\", \"navy\", \"green\", \"brown\", \"nude\", \"yellow\", \"gold\", \"silver\", \"purple\", \"orange\", \"teal\", \"grey\", \"print\"]"}] }) { createdDefinition { id name } userErrors { field message code } } } mutation Create_sizes_in_stock { metafieldDefinitionCreate(definition: { namespace: "jaus", key: "sizes_in_stock", name: "Sizes in stock", type: "list.single_line_text_field", ownerType: PRODUCT, pin: true, description: "Computed nightly by the enrichment job from variant inventory; read by search filters.", access: { storefront: PUBLIC_READ } }) { createdDefinition { id name } userErrors { field message code } } } mutation Create_fit_feedback { metafieldDefinitionCreate(definition: { namespace: "jaus", key: "fit_feedback", name: "Fit feedback", type: "json", ownerType: PRODUCT, pin: true, description: "Counts from the post-purchase question: {\"small\":n,\"true\":n,\"large\":n}. Updated by Flow.", access: { storefront: PUBLIC_READ } }) { createdDefinition { id name } userErrors { field message code } } }