Skip to content

DEVDOCS-6453 - add resourceId to translation gql docs #1035

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Aug 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
266 changes: 202 additions & 64 deletions docs/store-operations/translations/brands.mdx
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
# Translations for Brands (Beta)

<Callout type="info">
The Translations Admin GraphQL API is currently available on Catalyst storefronts only.
<Callout type='info'>
The Translations Admin GraphQL API is currently available on Catalyst
storefronts only.
</Callout>

The brands translatable fields are:

* Name
* Page Title
* Meta Keywords
* Meta Description
* Search Keywords
- Name
- Page Title
- Meta Keywords
- Meta Description
- Search Keywords

## Examples

Below are examples of GraphQL queries and mutations for retrieving and managing translation settings for brands.

### Query translations

This query returns a paginated list of translations by resourceType, channel and locale with a maximum of 50 results per request.
#### Query a list of translations

This query returns a paginated list of translations by resourceType, channel and locale with a maximum of 50 results per request.

<Tabs items={['Request', 'Response']}>
<Tab>

```graphql filename="Example mutation: Query a translation" showLineNumbers copy
```graphql filename="Example query: Query a list of translations" showLineNumbers copy
GRAPHQL https://api.bigcommerce.com/stores/{{store_hash}}/graphql
X-Auth-Token: {{token}}

Expand Down Expand Up @@ -53,54 +56,189 @@ query {
</Tab>
<Tab>

```json filename="Example query: Query a translation" showLineNumbers copy
```json filename="Example query: Query a list of translations" showLineNumbers copy
{
"data": {
"store": {
"translations": {
"edges": [
{
"node": {
"resourceId": "bc/store/brand/24",
"fields": [
{
"fieldName": "name",
"original": "my channel level brands",
"translation": "name (OVR) 1"
},
{
"fieldName": "description",
"original": "<p>my channel level brands description</p>",
"translation": "description (OVR)"
},
{
"fieldName": "page_title",
"original": "Second Home page title",
"translation": "page_title (OVR)"
},
{
"fieldName": "meta_description",
"original": "Second Meta description",
"translation": "meta_description (OVR)"
},
{
"fieldName": "meta_keywords",
"original": "Second Meta Keywords",
"translation": "meta keywords (OVR)"
},
{
"fieldName": "search_keywords",
"original": "Second Search keywords",
"translation": "search_keywords (OVR)"
}
]
},
"cursor": "eyJpZCI6MjR9"
}
]
}
"data": {
"store": {
"translations": {
"edges": [
{
"node": {
"resourceId": "bc/store/brand/24",
"fields": [
{
"fieldName": "name",
"original": "my channel level brands",
"translation": "name (OVR) 1"
},
{
"fieldName": "description",
"original": "<p>my channel level brands description</p>",
"translation": "description (OVR)"
},
{
"fieldName": "page_title",
"original": "Second Home page title",
"translation": "page_title (OVR)"
},
{
"fieldName": "meta_description",
"original": "Second Meta description",
"translation": "meta_description (OVR)"
},
{
"fieldName": "meta_keywords",
"original": "Second Meta Keywords",
"translation": "meta keywords (OVR)"
},
{
"fieldName": "search_keywords",
"original": "Second Search keywords",
"translation": "search_keywords (OVR)"
}
]
},
"cursor": "eyJpZCI6MjR9"
}
]
}
}
}
}
```

</Tab>
</Tabs>

#### Query a translation by resourceId

<Callout type='warning'>
When querying a translation by resourceId, you must provide the full
resourceId in the format `bc/store/brand/{brand_id}`.
</Callout>

This query returns a translation by resourceId.

<Tabs items={['Request', 'Response']}>
<Tab>

```graphql filename="Example query: Query a translation by resource id" showLineNumbers copy
GRAPHQL https://api.bigcommerce.com/stores/{{store_hash}}/graphql
X-Auth-Token: {{token}}

query {
store {
translations(filters: {
resourceType: BRANDS,
channelId: "bc/store/channel/2",
localeId: "bc/store/locale/it",
resourceIds: ["bc/store/brand/1", "bc/store/brand/2"]
}) {
edges {
node {
resourceId
fields {
fieldName
original
translation
}
}
cursor
}
}
}
}
}
```

</Tab>
<Tab>

```json filename="Example query: Query a translation by resource id" showLineNumbers copy
{
"data": {
"store": {
"translations": {
"edges": [
{
"node": {
"resourceId": "bc/store/brand/1",
"fields": [
{
"fieldName": "name",
"original": "my channel level brands",
"translation": "name (OVR) 1"
},
{
"fieldName": "description",
"original": "<p>my channel level brands description</p>",
"translation": "description (OVR)"
},
{
"fieldName": "page_title",
"original": "Second Home page title",
"translation": "page_title (OVR)"
},
{
"fieldName": "meta_description",
"original": "Second Meta description",
"translation": "meta_description (OVR)"
},
{
"fieldName": "meta_keywords",
"original": "Second Meta Keywords",
"translation": "meta keywords (OVR)"
},
{
"fieldName": "search_keywords",
"original": "Second Search keywords",
"translation": "search_keywords (OVR)"
}
]
},
"cursor": "eyJpZCI6MjR9"
},
{
"node": {
"resourceId": "bc/store/brand/2",
"fields": [
{
"fieldName": "name",
"original": "my channel level brands",
"translation": "name (OVR) 1"
},
{
"fieldName": "description",
"original": "<p>my channel level brands description</p>",
"translation": "description (OVR)"
},
{
"fieldName": "page_title",
"original": "Second Home page title",
"translation": "page_title (OVR)"
},
{
"fieldName": "meta_description",
"original": "Second Meta description",
"translation": "meta_description (OVR)"
},
{
"fieldName": "meta_keywords",
"original": "Second Meta Keywords",
"translation": "meta keywords (OVR)"
},
{
"fieldName": "search_keywords",
"original": "Second Search keywords",
"translation": "search_keywords (OVR)"
}
]
},
"cursor": "eyJpZCI6MjJ7"
}
]
}
}
}
}
```

Expand Down Expand Up @@ -177,7 +315,7 @@ mutation {
}
}
}
```
````

</Tab>
</Tabs>
Expand Down Expand Up @@ -223,14 +361,14 @@ mutation {

```json filename="Example mutation: Delete a translation" showLineNumbers copy
{
"data": {
"translation": {
"deleteTranslations": {
"__typename": "DeleteTranslationsResult",
"errors": []
}
}
}
"data": {
"translation": {
"deleteTranslations": {
"__typename": "DeleteTranslationsResult",
"errors": []
}
}
}
}
```

Expand Down
Loading