translatable Resourcesquery
Requires read
access scope.
Resources that can have localized values for different languages.
TranslatableResourceConnection argumentsTranslatableResourceConnection!
The elements that come after the specified cursor.
Anchor to beforebeforeThe elements that come before the specified cursor.
Anchor to firstfirstThe first
n
elements from the paginated list.The last
n
elements from the paginated list.Return only resources of a type.
Reverse the order of the underlying list.
TranslatableResourceConnection possible returns
The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
A list of nodes that are contained in TranslatableResourceEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
An object that’s used to retrieve cursor information about the current page.
Code examples for QUERY: translatableResources
Query Reference for QUERY: translatableResources
"{\n translatableResources(resourceType) {\n # TranslatableResourceConnection fields\n }\n}"
Input Reference for QUERY: translatableResources
Schema Reference for QUERY: translatableResources
Display Examples for QUERY: translatableResources
[ { "example": { "type_name": "translatableresources", "title": "Retrieve translatable content for the first 5 products", "description": "Use this query as part of preparing to register translations. The `digest` value is required as an input argument when registering a translation.", "query_string": "query {\n translatableResources(first: 5, resourceType: PRODUCT) {\n edges {\n node {\n resourceId\n translatableContent {\n key\n value\n digest\n locale\n }\n }\n }\n }\n}", "query_arguments": { "first": 5, "resourceType": "PRODUCT" }, "response": { "data": { "translatableResources": { "edges": [ { "node": { "resourceId": "gid://shopify/Product/20995642", "translatableContent": [ { "key": "title", "value": "Element", "digest": "4e5b548d6d61f0006840aca106f7464a4b59e5a854317d5b57861b8423901bf6", "locale": "en" }, { "key": "body_html", "value": "<p>bad board</p>", "digest": "60cd8aaeeec8e14d9da0dd1ed4cff31c0bb8f9c64255adad9dc1d2140c472f3b", "locale": "en" }, { "key": "handle", "value": "element", "digest": "445929267209c034d1e324834c17e0c8305df3dcb21d1710a639ac6ca08c648b", "locale": "en" }, { "key": "product_type", "value": "Snowboards", "digest": "3c752b33c3546064f02d47978a3883019e5bef320ddbc48875318b8d76c6154b", "locale": "en" } ] } }, { "node": { "resourceId": "gid://shopify/Product/108828309", "translatableContent": [ { "key": "title", "value": "Draft", "digest": "ebf12ef47cf575b3ba9a3cc019c5310146fdac88f6d1be6618d6e91158c2f174", "locale": "en" }, { "key": "body_html", "value": "<p>good board</p>", "digest": "6e634d476ca1dde2a0992fd6f57fc48b5979c8a4ee19117044a054f9f601ae56", "locale": "en" }, { "key": "handle", "value": "draft", "digest": "7743ce348d9284d677a185f33295b92266cc435a5b5f775029b300066d26693a", "locale": "en" }, { "key": "product_type", "value": "Snowboards", "digest": "3c752b33c3546064f02d47978a3883019e5bef320ddbc48875318b8d76c6154b", "locale": "en" } ] } }, { "node": { "resourceId": "gid://shopify/Product/121709582", "translatableContent": [ { "key": "title", "value": "Boots", "digest": "929433e4be1dbd23ffc6b076da2e6f3854ccc5fe606a1e59419110b71fe0a833", "locale": "en" }, { "key": "body_html", "value": "<p>some boots</p>", "digest": "8e6907bdb64ea435ccc2874160eaa35db63c95bb5804d93ea460c3a72a68c00c", "locale": "en" }, { "key": "handle", "value": "boots", "digest": "40cafc18e93464f86d5d304e726df74311237955bcf7d99909bcef3f0bcb90bb", "locale": "en" }, { "key": "product_type", "value": "Boots", "digest": "929433e4be1dbd23ffc6b076da2e6f3854ccc5fe606a1e59419110b71fe0a833", "locale": "en" } ] } }, { "node": { "resourceId": "gid://shopify/Product/440089423", "translatableContent": [ { "key": "title", "value": "IPod Nano - 8GB", "digest": "4ce3c71c164cd0ddc7c95e7d554d9b028e6a6ed4abff8a71ad714c6f2f1a7e4a", "locale": "en" }, { "key": "body_html", "value": "<p>It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.</p>", "digest": "d3378109cc15e6d88148c52661e687203c692141fe837dbe983fd02e9b095803", "locale": "en" }, { "key": "handle", "value": "ipod-nano", "digest": "226259c06fdbf95cd3b681de6db73d0346c7dae4d381f0472c0e405b73cf57e0", "locale": "en" }, { "key": "product_type", "value": "Cult Products", "digest": "be736be3f50f1755fdc2f5bc96b10251d56cd1888a51889321cb96d605078c42", "locale": "en" } ] } }, { "node": { "resourceId": "gid://shopify/Product/558169081", "translatableContent": [ { "key": "title", "value": "Unpublished Boots", "digest": "1654ceb776b32b1bf3298e88ce86829478d3be20669887faebc98daf88ebabc0", "locale": "en" }, { "key": "body_html", "value": "<p>some boots</p>", "digest": "8e6907bdb64ea435ccc2874160eaa35db63c95bb5804d93ea460c3a72a68c00c", "locale": "en" }, { "key": "handle", "value": "unpublished_boots", "digest": "8fa116cf72ed66775134127295e199c727b3756c676b13699b2060db2f19d78c", "locale": "en" }, { "key": "product_type", "value": "Boots", "digest": "929433e4be1dbd23ffc6b076da2e6f3854ccc5fe606a1e59419110b71fe0a833", "locale": "en" } ] } } ] } } }, "api_name": "admin", "minimum_api_version": "2023-10", "maximum_api_version": "unstable", "location": "/components/markets/store_localization/test/unit/graph_api/admin/translatable_resource_test.rb", "curl_example": "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { translatableResources(first: 5, resourceType: PRODUCT) { edges { node { resourceId translatableContent { key value digest locale } } } } }\"\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n translatableResources(first: 5, resourceType: PRODUCT) {\n edges {\n node {\n resourceId\n translatableContent {\n key\n value\n digest\n locale\n }\n }\n }\n }\n }`,\n);\n\nconst data = await response.json();\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 translatableResources(first: 5, resourceType: PRODUCT) {\n edges {\n node {\n resourceId\n translatableContent {\n key\n value\n digest\n locale\n }\n }\n }\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n translatableResources(first: 5, resourceType: PRODUCT) {\n edges {\n node {\n resourceId\n translatableContent {\n key\n value\n digest\n locale\n }\n }\n }\n }\n }`,\n});\n", "php_example": "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n query {\n translatableResources(first: 5, resourceType: PRODUCT) {\n edges {\n node {\n resourceId\n translatableContent {\n key\n value\n digest\n locale\n }\n }\n }\n }\n }\nQUERY;\n\n$response = $client->query([\"query\" => $query]);\n" }, "titleStringKey": "arguments", "inputVariableEntries": [ { "arg": { "name": "first", "description": "The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).", "type": { "kind": "SCALAR", "name": "Int", "list": false, "non_null": false }, "defaultValue": null, "typeSignature": "Int", "isDeprecated": false, "deprecationReason": null }, "key": "first", "argValue": " 5", "typeKind": "QUERY" }, { "arg": { "name": "resourceType", "description": "Return only resources of a type.", "type": { "kind": "ENUM", "name": "TranslatableResourceType", "list": false, "non_null": true }, "defaultValue": null, "typeSignature": "TranslatableResourceType!", "isDeprecated": false, "deprecationReason": null }, "key": "resourceType", "argValue": " \"PRODUCT\"", "typeKind": "QUERY" } ] } ]