Version: unstable
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/unstable/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query MetafieldDefinitionTypes { metafieldDefinitionTypes { category name supportsDefinitionMigrations supportedValidations { name type } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query MetafieldDefinitionTypes {\n metafieldDefinitionTypes {\n category\n name\n supportsDefinitionMigrations\n supportedValidations {\n name\n type\n }\n }\n }`,\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n query MetafieldDefinitionTypes {\n metafieldDefinitionTypes {\n category\n name\n supportsDefinitionMigrations\n supportedValidations {\n name\n type\n }\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n" PHP example: "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<query([\"query\" => $query]);\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query MetafieldDefinitionTypes {\n metafieldDefinitionTypes {\n category\n name\n supportsDefinitionMigrations\n supportedValidations {\n name\n type\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query MetafieldDefinitionTypes {\n metafieldDefinitionTypes {\n category\n name\n supportsDefinitionMigrations\n supportedValidations {\n name\n type\n }\n }\n}"
input: null
response: { "data": { "metafieldDefinitionTypes": [ { "category": "TRUE_FALSE", "name": "boolean", "supportsDefinitionMigrations": true, "supportedValidations": [] }, { "category": "COLOR", "name": "color", "supportsDefinitionMigrations": true, "supportedValidations": [] }, { "category": "DATE_TIME", "name": "date_time", "supportsDefinitionMigrations": true, "supportedValidations": [ { "name": "min", "type": "date_time" }, { "name": "max", "type": "date_time" } ] }, { "category": "DATE_TIME", "name": "date", "supportsDefinitionMigrations": true, "supportedValidations": [ { "name": "min", "type": "date" }, { "name": "max", "type": "date" } ] }, { "category": "MEASUREMENT", "name": "dimension", "supportsDefinitionMigrations": true, "supportedValidations": [ { "name": "min", "type": "dimension" }, { "name": "max", "type": "dimension" } ] }, { "category": "JSON", "name": "json", "supportsDefinitionMigrations": true, "supportedValidations": [ { "name": "schema", "type": "json" } ] }, { "category": "LANGUAGE", "name": "language", "supportsDefinitionMigrations": false, "supportedValidations": [] }, { "category": "COLOR", "name": "list.color", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "list.min", "type": "number_integer" }, { "name": "list.max", "type": "number_integer" } ] }, { "category": "DATE_TIME", "name": "list.date_time", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "min", "type": "date_time" }, { "name": "max", "type": "date_time" }, { "name": "list.min", "type": "number_integer" }, { "name": "list.max", "type": "number_integer" } ] }, { "category": "DATE_TIME", "name": "list.date", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "min", "type": "date" }, { "name": "max", "type": "date" }, { "name": "list.min", "type": "number_integer" }, { "name": "list.max", "type": "number_integer" } ] }, { "category": "MEASUREMENT", "name": "list.dimension", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "min", "type": "dimension" }, { "name": "max", "type": "dimension" }, { "name": "list.min", "type": "number_integer" }, { "name": "list.max", "type": "number_integer" } ] }, { "category": "NUMBER", "name": "list.number_decimal", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "min", "type": "number_decimal" }, { "name": "max", "type": "number_decimal" }, { "name": "max_precision", "type": "number_integer" }, { "name": "list.min", "type": "number_integer" }, { "name": "list.max", "type": "number_integer" } ] }, { "category": "NUMBER", "name": "list.number_integer", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "min", "type": "number_integer" }, { "name": "max", "type": "number_integer" }, { "name": "list.min", "type": "number_integer" }, { "name": "list.max", "type": "number_integer" } ] }, { "category": "RATING", "name": "list.rating", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "scale_min", "type": "number_decimal" }, { "name": "scale_max", "type": "number_decimal" }, { "name": "list.min", "type": "number_integer" }, { "name": "list.max", "type": "number_integer" } ] }, { "category": "TEXT", "name": "list.single_line_text_field", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "min", "type": "number_integer" }, { "name": "max", "type": "number_integer" }, { "name": "regex", "type": "single_line_text_field" }, { "name": "choices", "type": "list.single_line_text_field" }, { "name": "list.min", "type": "number_integer" }, { "name": "list.max", "type": "number_integer" } ] }, { "category": "URL", "name": "list.url", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "allowed_domains", "type": "list.single_line_text_field" }, { "name": "list.min", "type": "number_integer" }, { "name": "list.max", "type": "number_integer" } ] }, { "category": "MEASUREMENT", "name": "list.volume", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "min", "type": "volume" }, { "name": "max", "type": "volume" }, { "name": "list.min", "type": "number_integer" }, { "name": "list.max", "type": "number_integer" } ] }, { "category": "MEASUREMENT", "name": "list.weight", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "min", "type": "weight" }, { "name": "max", "type": "weight" }, { "name": "list.min", "type": "number_integer" }, { "name": "list.max", "type": "number_integer" } ] }, { "category": "MONEY", "name": "money", "supportsDefinitionMigrations": false, "supportedValidations": [] }, { "category": "TEXT", "name": "multi_line_text_field", "supportsDefinitionMigrations": true, "supportedValidations": [ { "name": "min", "type": "number_integer" }, { "name": "max", "type": "number_integer" }, { "name": "regex", "type": "single_line_text_field" } ] }, { "category": "NUMBER", "name": "number_decimal", "supportsDefinitionMigrations": true, "supportedValidations": [ { "name": "min", "type": "number_decimal" }, { "name": "max", "type": "number_decimal" }, { "name": "max_precision", "type": "number_integer" } ] }, { "category": "NUMBER", "name": "number_integer", "supportsDefinitionMigrations": true, "supportedValidations": [ { "name": "min", "type": "number_integer" }, { "name": "max", "type": "number_integer" } ] }, { "category": "RATING", "name": "rating", "supportsDefinitionMigrations": true, "supportedValidations": [ { "name": "scale_min", "type": "number_decimal" }, { "name": "scale_max", "type": "number_decimal" } ] }, { "category": "TEXT", "name": "rich_text_field", "supportsDefinitionMigrations": false, "supportedValidations": [] }, { "category": "TEXT", "name": "single_line_text_field", "supportsDefinitionMigrations": true, "supportedValidations": [ { "name": "min", "type": "number_integer" }, { "name": "max", "type": "number_integer" }, { "name": "regex", "type": "single_line_text_field" }, { "name": "choices", "type": "list.single_line_text_field" } ] }, { "category": "URL", "name": "url", "supportsDefinitionMigrations": true, "supportedValidations": [ { "name": "allowed_domains", "type": "list.single_line_text_field" } ] }, { "category": "LINK", "name": "link", "supportsDefinitionMigrations": true, "supportedValidations": [ { "name": "allowed_domains", "type": "list.single_line_text_field" } ] }, { "category": "LINK", "name": "list.link", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "allowed_domains", "type": "list.single_line_text_field" }, { "name": "list.min", "type": "number_integer" }, { "name": "list.max", "type": "number_integer" } ] }, { "category": "MEASUREMENT", "name": "volume", "supportsDefinitionMigrations": true, "supportedValidations": [ { "name": "min", "type": "volume" }, { "name": "max", "type": "volume" } ] }, { "category": "MEASUREMENT", "name": "weight", "supportsDefinitionMigrations": true, "supportedValidations": [ { "name": "min", "type": "weight" }, { "name": "max", "type": "weight" } ] }, { "category": "REFERENCE", "name": "company_reference", "supportsDefinitionMigrations": false, "supportedValidations": [] }, { "category": "REFERENCE", "name": "list.company_reference", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "list.min", "type": "number_integer" }, { "name": "list.max", "type": "number_integer" } ] }, { "category": "REFERENCE", "name": "customer_reference", "supportsDefinitionMigrations": false, "supportedValidations": [] }, { "category": "REFERENCE", "name": "list.customer_reference", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "list.min", "type": "number_integer" }, { "name": "list.max", "type": "number_integer" } ] }, { "category": "REFERENCE", "name": "product_reference", "supportsDefinitionMigrations": false, "supportedValidations": [] }, { "category": "REFERENCE", "name": "list.product_reference", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "list.min", "type": "number_integer" }, { "name": "list.max", "type": "number_integer" } ] }, { "category": "REFERENCE", "name": "collection_reference", "supportsDefinitionMigrations": false, "supportedValidations": [] }, { "category": "REFERENCE", "name": "list.collection_reference", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "list.min", "type": "number_integer" }, { "name": "list.max", "type": "number_integer" } ] }, { "category": "REFERENCE", "name": "variant_reference", "supportsDefinitionMigrations": false, "supportedValidations": [] }, { "category": "REFERENCE", "name": "list.variant_reference", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "list.min", "type": "number_integer" }, { "name": "list.max", "type": "number_integer" } ] }, { "category": "REFERENCE", "name": "file_reference", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "file_type_options", "type": "list.single_line_text_field" } ] }, { "category": "REFERENCE", "name": "list.file_reference", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "file_type_options", "type": "list.single_line_text_field" }, { "name": "list.min", "type": "number_integer" }, { "name": "list.max", "type": "number_integer" } ] }, { "category": "REFERENCE", "name": "product_taxonomy_value_reference", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "product_taxonomy_attribute_handle", "type": "single_line_text_field" } ] }, { "category": "REFERENCE", "name": "list.product_taxonomy_value_reference", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "product_taxonomy_attribute_handle", "type": "single_line_text_field" }, { "name": "list.min", "type": "number_integer" }, { "name": "list.max", "type": "number_integer" } ] }, { "category": "REFERENCE", "name": "metaobject_reference", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "metaobject_definition_id", "type": "single_line_text_field" } ] }, { "category": "REFERENCE", "name": "list.metaobject_reference", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "metaobject_definition_id", "type": "single_line_text_field" }, { "name": "list.min", "type": "number_integer" }, { "name": "list.max", "type": "number_integer" } ] }, { "category": "REFERENCE", "name": "mixed_reference", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "metaobject_definition_ids", "type": "list.single_line_text_field" } ] }, { "category": "REFERENCE", "name": "list.mixed_reference", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "metaobject_definition_ids", "type": "list.single_line_text_field" }, { "name": "list.min", "type": "number_integer" }, { "name": "list.max", "type": "number_integer" } ] }, { "category": "REFERENCE", "name": "page_reference", "supportsDefinitionMigrations": false, "supportedValidations": [] }, { "category": "REFERENCE", "name": "list.page_reference", "supportsDefinitionMigrations": false, "supportedValidations": [ { "name": "list.min", "type": "number_integer" }, { "name": "list.max", "type": "number_integer" } ] }, { "category": "REFERENCE", "name": "order_reference", "supportsDefinitionMigrations": false, "supportedValidations": [] } ] } }