Skip to content

Commit 3c040e5

Browse files
Revert "DEVDOCS-6453 - add resourceId filter to translation gql api examples" (#1030)
Reverts #1023 This will not be rolled out until August 21st.
1 parent ec61997 commit 3c040e5

File tree

4 files changed

+10
-277
lines changed

4 files changed

+10
-277
lines changed

docs/store-operations/translations/brands.mdx

Lines changed: 2 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,12 @@ Below are examples of GraphQL queries and mutations for retrieving and managing
1818

1919
### Query translations
2020

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

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

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

@@ -55,7 +53,7 @@ query {
5553
</Tab>
5654
<Tab>
5755

58-
```json filename="Example query: Query a list of translations" showLineNumbers copy
56+
```json filename="Example query: Query a translation" showLineNumbers copy
5957
{
6058
"data": {
6159
"store": {
@@ -109,97 +107,6 @@ query {
109107
</Tab>
110108
</Tabs>
111109

112-
#### Query a translation by resourceId
113-
114-
<Callout type='warning'>
115-
When querying a translation by resourceId, you must provide the full resourceId in the format `bc/store/brand/{brand_id}`.
116-
</Callout>
117-
118-
This query returns a translation by resourceId.
119-
120-
<Tabs items={['Request', 'Response']}>
121-
<Tab>
122-
123-
```graphql filename="Example query: Query a translation by resource id" showLineNumbers copy
124-
GRAPHQL https://api.bigcommerce.com/stores/{{store_hash}}/graphql
125-
X-Auth-Token: {{token}}
126-
127-
query {
128-
store {
129-
translations(filters: {
130-
resourceId: "bc/store/brand/24"
131-
}) {
132-
edges {
133-
node {
134-
resourceId
135-
fields {
136-
fieldName
137-
original
138-
translation
139-
}
140-
}
141-
}
142-
}
143-
}
144-
}
145-
```
146-
147-
</Tab>
148-
<Tab>
149-
150-
```json filename="Example query: Query a translation by resource id" showLineNumbers copy
151-
{
152-
"data": {
153-
"store": {
154-
"translations": {
155-
"edges": [
156-
{
157-
"node": {
158-
"resourceId": "bc/store/brand/24",
159-
"fields": [
160-
{
161-
"fieldName": "name",
162-
"original": "my channel level brands",
163-
"translation": "name (OVR) 1"
164-
},
165-
{
166-
"fieldName": "description",
167-
"original": "<p>my channel level brands description</p>",
168-
"translation": "description (OVR)"
169-
},
170-
{
171-
"fieldName": "page_title",
172-
"original": "Second Home page title",
173-
"translation": "page_title (OVR)"
174-
},
175-
{
176-
"fieldName": "meta_description",
177-
"original": "Second Meta description",
178-
"translation": "meta_description (OVR)"
179-
},
180-
{
181-
"fieldName": "meta_keywords",
182-
"original": "Second Meta Keywords",
183-
"translation": "meta keywords (OVR)"
184-
},
185-
{
186-
"fieldName": "search_keywords",
187-
"original": "Second Search keywords",
188-
"translation": "search_keywords (OVR)"
189-
}
190-
]
191-
}
192-
}
193-
]
194-
}
195-
}
196-
}
197-
}
198-
```
199-
200-
</Tab>
201-
</Tabs>
202-
203110
### Update a translation
204111

205112
This mutation updates a translation.

docs/store-operations/translations/categories.mdx

Lines changed: 2 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@ Below are examples of GraphQL queries and mutations for retrieving and managing
1919

2020
### Query translations
2121

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

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

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

@@ -56,7 +54,7 @@ query {
5654
</Tab>
5755
<Tab>
5856

59-
```json filename="Example query: Query a list of translations" showLineNumbers copy
57+
```json filename="Example query: Query a translation" showLineNumbers copy
6058
{
6159
"data": {
6260
"store": {
@@ -105,93 +103,6 @@ query {
105103
</Tab>
106104
</Tabs>
107105

108-
#### Query a translation by resourceId
109-
110-
<Callout type='warning'>
111-
When querying a translation by resourceId, you must provide the full resourceId in the format `bc/store/category/{category_id}`.
112-
</Callout>
113-
114-
This query returns a translation by resourceId.
115-
116-
<Tabs items={['Request', 'Response']}>
117-
<Tab>
118-
119-
```graphql filename="Example query: Query a translation by id" showLineNumbers copy
120-
GRAPHQL https://api.bigcommerce.com/stores/{{store_hash}}/graphql
121-
X-Auth-Token: {{token}}
122-
123-
query {
124-
store {
125-
translations(filters: {
126-
resourceId: "bc/store/category/24"
127-
}) {
128-
edges {
129-
node {
130-
resourceId
131-
fields {
132-
fieldName
133-
original
134-
translation
135-
}
136-
}
137-
}
138-
}
139-
}
140-
}
141-
```
142-
143-
</Tab>
144-
<Tab>
145-
146-
```json filename="Example query: Query a translation by id" showLineNumbers copy
147-
{
148-
"data": {
149-
"store": {
150-
"translations": {
151-
"edges": [
152-
{
153-
"node": {
154-
"resourceId": "bc/store/category/24",
155-
"fields": [
156-
{
157-
"fieldName": "name",
158-
"original": "my channel level categories",
159-
"translation": "name (OVR) 1"
160-
},
161-
{
162-
"fieldName": "description",
163-
"original": "<p>my channel level categories description</p>",
164-
"translation": "description (OVR)"
165-
},
166-
{
167-
"fieldName": "page_title",
168-
"original": "Second Home page title",
169-
"translation": "page_title (OVR)"
170-
},
171-
{
172-
"fieldName": "meta_description",
173-
"original": "Second Meta description",
174-
"translation": "meta_description (OVR)"
175-
},
176-
{
177-
"fieldName": "search_keywords",
178-
"original": "Second Search keywords",
179-
"translation": "search_keywords (OVR)"
180-
}
181-
]
182-
},
183-
}
184-
]
185-
}
186-
}
187-
}
188-
}
189-
```
190-
191-
</Tab>
192-
</Tabs>
193-
194-
195106
### Update a translation
196107

197108
This mutation updates a translation.

docs/store-operations/translations/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The Translations Admin GraphQL API is currently available on Catalyst storefront
55

66
With a single storefront setup, the shopper's experience remains consistent, but the content is displayed in their preferred language. This use case is particularly common in multilingual countries like Canada and for customers selling cross-border, where the same storefront serves shoppers in multiple languages without altering the overall user experience.
77

8-
The API currently supports translations for the following resource types, and more are expected in the future:
8+
The API currently supports translations for the following components, and more are expected in the future:
99

1010
* Categories
1111
* Brands

docs/store-operations/translations/locations.mdx

Lines changed: 5 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,12 @@ Below are examples of GraphQL queries and mutations for retrieving and managing
2323

2424
### Query translations
2525

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

3028
<Tabs items={['Request', 'Response']}>
3129
<Tab>
32-
```json filename="Example query: Query a list of translations" showLineNumbers copy
33-
GRAPHQL https://api.bigcommerce.com/stores/{{store_hash}}/graphql
30+
```json filename="Example mutation: Query a translation" showLineNumbers copy
31+
GRAPHQL {{host}}/stores/{{store_hash}}/graphql
3432
X-Auth-Token: {{token}}
3533

3634
query {
@@ -57,7 +55,7 @@ This query returns a paginated list of translations by resourceType, channel, an
5755
```
5856
</Tab>
5957
<Tab>
60-
```json filename="Example query: Query a list of translations" showLineNumbers copy
58+
```json filename="Example query: Query a translation" showLineNumbers copy
6159
{
6260
"data": {
6361
"store": {
@@ -105,97 +103,14 @@ This query returns a paginated list of translations by resourceType, channel, an
105103
</Tab>
106104
</Tabs>
107105

108-
#### Query a translation by resourceId
109-
110-
<Callout type='warning'>
111-
When querying a translation by resourceId, you must provide the full resourceId in the format `bc/store/inventoryLocation/{location_id}`.
112-
</Callout>
113-
114-
This query returns a translation by resourceId.
115-
116-
<Tabs items={['Request', 'Response']}>
117-
<Tab>
118-
```json filename="Example query: Query a translation by resource id" showLineNumbers copy
119-
GRAPHQL https://api.bigcommerce.com/stores/{{store_hash}}/graphql
120-
X-Auth-Token: {{token}}
121-
122-
query {
123-
store {
124-
translations(filters: {
125-
resourceId: "bc/store/inventoryLocation/1"
126-
}) {
127-
edges {
128-
node {
129-
resourceId
130-
fields {
131-
fieldName
132-
original
133-
translation
134-
}
135-
}
136-
}
137-
}
138-
}
139-
}
140-
```
141-
</Tab>
142-
<Tab>
143-
```json filename="Example query: Query a translation by resource id" showLineNumbers copy
144-
{
145-
"data": {
146-
"store": {
147-
"translations": {
148-
"edges": [
149-
{
150-
"node": {
151-
"resourceId": "bc/store/inventoryLocation/1",
152-
"fields": [
153-
{
154-
"fieldName": "city",
155-
"original": "AUSTIN",
156-
"translation": "Ville (OVR) TEST EN"
157-
},
158-
{
159-
"fieldName": "state",
160-
"original": "TX",
161-
"translation": "État (OVR) TEST EN"
162-
},
163-
{
164-
"fieldName": "description",
165-
"original": "",
166-
"translation": null
167-
},
168-
{
169-
"fieldName": "label",
170-
"original": "LOCATION 1",
171-
"translation": null
172-
},
173-
{
174-
"fieldName": "address2",
175-
"original": "apt 111",
176-
"translation": null
177-
}
178-
]
179-
}
180-
}
181-
]
182-
}
183-
}
184-
}
185-
}
186-
```
187-
</Tab>
188-
</Tabs>
189-
190-
191106
### Update a translation
192107

193108
This mutation updates a translation.
194109

195110
<Tabs items={['Request', 'Response']}>
196111
<Tab>
197112
```json filename="Example mutation: Update a translation" showLineNumbers copy
198-
GRAPHQL https://api.bigcommerce.com/stores/{{store_hash}}/graphql
113+
GRAPHQL {{host}}/stores/{{store_hash}}/graphql
199114
X-Auth-Token: {{token}}
200115

201116
mutation {
@@ -268,7 +183,7 @@ The following mutation deletes a translation.
268183
<Tabs items={['Request', 'Response']}>
269184
<Tab>
270185
```json filename="Example mutation: Delete a translation" showLineNumbers copy
271-
GRAPHQL https://api.bigcommerce.com/stores/{{store_hash}}/graphql
186+
GRAPHQL {{host}}/stores/{{store_hash}}/graphql
272187
X-Auth-Token: {{token}}
273188

274189
mutation {

0 commit comments

Comments
 (0)