shop Locale Disablemutation
mutation
2024-10latest
Requires write
access scope.
Deletes a locale for a shop. This also deletes all translations of this locale.
Arguments
ISO code of the locale to delete.
Was this section helpful?
ShopLocaleDisablePayload returns
ISO code of the locale that was deleted.
The list of errors that occurred from executing the mutation.
Was this section helpful?
Code examples for MUTATION: shopLocaleDisable
Query Reference for MUTATION: shopLocaleDisable
"mutation shopLocaleDisable($locale: String!) {\n shopLocaleDisable(locale: $locale) {\n locale\n userErrors {\n field\n message\n }\n }\n}"
Input Reference for MUTATION: shopLocaleDisable
"{\n \"locale\": \"<your-locale>\"\n}"
Schema Reference for MUTATION: shopLocaleDisable
""
Display Examples for MUTATION: shopLocaleDisable
[ { "example": { "type_name": "shoplocaledisable", "title": "Delete the Korean locale from a shop", "description": "Deleting a locale also permanently deletes all of its translations.", "query_string": "mutation disableLocale($locale: String!) {\n shopLocaleDisable(locale: $locale) {\n userErrors {\n message\n field\n }\n locale\n }\n}", "query_arguments": { "locale": "$locale" }, "variables": { "locale": "ko" }, "response": { "data": { "shopLocaleDisable": { "userErrors": [], "locale": "ko" } } }, "api_name": "admin", "minimum_api_version": "2023-10", "maximum_api_version": "unstable", "location": "/components/markets/store_localization/test/unit/graph_api/admin/mutations/shop_locale_disable_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\": \"mutation disableLocale($locale: String!) { shopLocaleDisable(locale: $locale) { userErrors { message field } locale } }\",\n \"variables\": {\n \"locale\": \"ko\"\n }\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation disableLocale($locale: String!) {\n shopLocaleDisable(locale: $locale) {\n userErrors {\n message\n field\n }\n locale\n }\n }`,\n {\n variables: {\n \"locale\": \"ko\"\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 mutation disableLocale($locale: String!) {\n shopLocaleDisable(locale: $locale) {\n userErrors {\n message\n field\n }\n locale\n }\n }\nQUERY\n\nvariables = {\n \"locale\": \"ko\"\n}\n\nresponse = client.query(query: query, variables: variables)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation disableLocale($locale: String!) {\n shopLocaleDisable(locale: $locale) {\n userErrors {\n message\n field\n }\n locale\n }\n }`,\n \"variables\": {\n \"locale\": \"ko\"\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 mutation disableLocale($locale: String!) {\n shopLocaleDisable(locale: $locale) {\n userErrors {\n message\n field\n }\n locale\n }\n }\nQUERY;\n\n$variables = [\n \"locale\" => \"ko\",\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" }, "titleStringKey": "variables", "inputVariableEntries": [ { "arg": { "name": "locale", "description": "ISO code of the locale to delete.", "type": { "kind": "SCALAR", "name": "String", "list": false, "non_null": true }, "defaultValue": null, "typeSignature": "String!", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "locale", "argValue": " \"ko\"", "typeKind": "MUTATION" } ] } ]