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 inventoryProperties { inventoryProperties { quantityNames { belongsTo comprises displayName isInUse name } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query inventoryProperties {\n inventoryProperties {\n quantityNames {\n belongsTo\n comprises\n displayName\n isInUse\n name\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 inventoryProperties {\n inventoryProperties {\n quantityNames {\n belongsTo\n comprises\n displayName\n isInUse\n name\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 inventoryProperties {\n inventoryProperties {\n quantityNames {\n belongsTo\n comprises\n displayName\n isInUse\n name\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query inventoryProperties {\n inventoryProperties {\n quantityNames {\n belongsTo\n comprises\n displayName\n isInUse\n name\n }\n }\n}"
input: null
response: { "data": { "inventoryProperties": { "quantityNames": [ { "belongsTo": [ "on_hand" ], "comprises": [], "displayName": "Available", "isInUse": true, "name": "available" }, { "belongsTo": [ "on_hand" ], "comprises": [], "displayName": "Committed", "isInUse": true, "name": "committed" }, { "belongsTo": [ "on_hand" ], "comprises": [], "displayName": "Damaged", "isInUse": false, "name": "damaged" }, { "belongsTo": [], "comprises": [], "displayName": "Incoming", "isInUse": true, "name": "incoming" }, { "belongsTo": [], "comprises": [ "available", "committed", "damaged", "quality_control", "reserved", "safety_stock" ], "displayName": "On hand", "isInUse": true, "name": "on_hand" }, { "belongsTo": [ "on_hand" ], "comprises": [], "displayName": "Quality control", "isInUse": false, "name": "quality_control" }, { "belongsTo": [ "on_hand" ], "comprises": [], "displayName": "Reserved", "isInUse": true, "name": "reserved" }, { "belongsTo": [ "on_hand" ], "comprises": [], "displayName": "Safety stock", "isInUse": false, "name": "safety_stock" } ] } } }
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 inventoryProperties { inventoryProperties { quantityNames { name isInUse } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query inventoryProperties {\n inventoryProperties {\n quantityNames {\n name\n isInUse\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 inventoryProperties {\n inventoryProperties {\n quantityNames {\n name\n isInUse\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 inventoryProperties {\n inventoryProperties {\n quantityNames {\n name\n isInUse\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query inventoryProperties {\n inventoryProperties {\n quantityNames {\n name\n isInUse\n }\n }\n}"
input: null
response: { "data": { "inventoryProperties": { "quantityNames": [ { "name": "available", "isInUse": true }, { "name": "committed", "isInUse": true }, { "name": "damaged", "isInUse": false }, { "name": "incoming", "isInUse": true }, { "name": "on_hand", "isInUse": true }, { "name": "quality_control", "isInUse": false }, { "name": "reserved", "isInUse": true }, { "name": "safety_stock", "isInUse": false } ] } } }