Version: 2025-01
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { translatableResource(resourceId: \\\"gid://shopify/Collection/1007901140\\\") { resourceId translations(locale: \\\"fr\\\") { key value } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n resourceId\n translations(locale: \"fr\") {\n key\n value\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 {\n translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n resourceId\n translations(locale: \"fr\") {\n key\n value\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\n query {\n translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n resourceId\n translations(locale: \"fr\") {\n key\n value\n }\n }\n }\nQUERY;\n\n$response = $client->query([\"query\" => $query]);\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n resourceId\n translations(locale: \"fr\") {\n key\n value\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query {\n translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n resourceId\n translations(locale: \"fr\") {\n key\n value\n }\n }\n}"
input: null
response: { "data": { "translatableResource": { "resourceId": "gid://shopify/Collection/1007901140", "translations": [ { "key": "title", "value": "la collection" } ] } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { translatableResource(resourceId: \\\"gid://shopify/Collection/1007901140\\\") { resourceId translations(locale: \\\"fr\\\", marketId: \\\"gid://shopify/Market/128989799\\\") { key value market { id name } } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n resourceId\n translations(locale: \"fr\", marketId: \"gid://shopify/Market/128989799\") {\n key\n value\n market {\n id\n name\n }\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 {\n translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n resourceId\n translations(locale: \"fr\", marketId: \"gid://shopify/Market/128989799\") {\n key\n value\n market {\n id\n name\n }\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\n query {\n translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n resourceId\n translations(locale: \"fr\", marketId: \"gid://shopify/Market/128989799\") {\n key\n value\n market {\n id\n name\n }\n }\n }\n }\nQUERY;\n\n$response = $client->query([\"query\" => $query]);\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n resourceId\n translations(locale: \"fr\", marketId: \"gid://shopify/Market/128989799\") {\n key\n value\n market {\n id\n name\n }\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query {\n translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n resourceId\n translations(locale: \"fr\", marketId: \"gid://shopify/Market/128989799\") {\n key\n value\n market {\n id\n name\n }\n }\n }\n}"
input: null
response: { "data": { "translatableResource": { "resourceId": "gid://shopify/Collection/1007901140", "translations": [ { "key": "title", "value": "la collection canadienne", "market": { "id": "gid://shopify/Market/128989799", "name": "Canada" } } ] } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { translatableResource(resourceId: \\\"gid://shopify/Collection/1007901140\\\") { resourceId translatableContent { key value digest locale } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n resourceId\n translatableContent {\n key\n value\n digest\n locale\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 {\n translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n resourceId\n translatableContent {\n key\n value\n digest\n locale\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\n query {\n translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n resourceId\n translatableContent {\n key\n value\n digest\n locale\n }\n }\n }\nQUERY;\n\n$response = $client->query([\"query\" => $query]);\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n resourceId\n translatableContent {\n key\n value\n digest\n locale\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query {\n translatableResource(resourceId: \"gid://shopify/Collection/1007901140\") {\n resourceId\n translatableContent {\n key\n value\n digest\n locale\n }\n }\n}"
input: null
response: { "data": { "translatableResource": { "resourceId": "gid://shopify/Collection/1007901140", "translatableContent": [ { "key": "title", "value": "Featured items", "digest": "a18b34037fda5b1afd720d4b85b86a8a75b5e389452f84f5b6d2b8e210869fd7", "locale": "en" }, { "key": "body_html", "value": "Collection description", "digest": "e3fbf5a945f94e5ddbb6bef20f5e5e3a923b34bdf1eb170f770a8aa0fd163bfa", "locale": "en" }, { "key": "handle", "value": "featured", "digest": "d562318e9c2d7e6d9c70de511fbf5d3081fae3d6699eed31c3a87c5a0bc6ca51", "locale": "en" } ] } } }