Skip to content

Commit 0528d48

Browse files
[WIP] Release bulk operations CLI commands
Still need tocreate docs pages at: - https://shopify.dev/docs/api/shopify-cli/app/app-execute - https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute - https://shopify.dev/docs/api/shopify-cli/app/app-bulk-status then fix up this commit and merge.
1 parent e794f12 commit 0528d48

5 files changed

Lines changed: 102 additions & 12 deletions

File tree

packages/app/src/cli/commands/app/bulk/execute.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ import {globalFlags} from '@shopify/cli-kit/node/cli'
77
export default class BulkExecute extends AppLinkedCommand {
88
static summary = 'Execute bulk operations.'
99

10-
static description =
11-
'Executes an Admin API GraphQL query or mutation on the specified dev store, as a bulk operation.'
10+
static descriptionWithMarkdown = `Executes an Admin API GraphQL query or mutation on the specified dev store, as a bulk operation.
1211
13-
static hidden = true
12+
Bulk operations allow you to process large amounts of data asynchronously. Learn more about [bulk query operations](https://shopify.dev/docs/api/usage/bulk-operations/queries) and [bulk mutation operations](https://shopify.dev/docs/api/usage/bulk-operations/imports).
13+
14+
Use [\`bulk status\`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-status) to check the status of your bulk operations.`
15+
16+
static description = this.descriptionWithoutMarkdown()
1417

1518
static flags = {
1619
...globalFlags,

packages/app/src/cli/commands/app/bulk/status.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ import {normalizeStoreFqdn} from '@shopify/cli-kit/node/context/fqdn'
99
export default class BulkStatus extends AppLinkedCommand {
1010
static summary = 'Check the status of bulk operations.'
1111

12-
static description =
13-
'Check the status of a specific bulk operation by ID, or list all bulk operations in the last 7 days.'
12+
static descriptionWithMarkdown = `Check the status of a specific bulk operation by ID, or list all bulk operations in the last 7 days.
1413
15-
static hidden = true
14+
Bulk operations allow you to process large amounts of data asynchronously. Learn more about [bulk query operations](https://shopify.dev/docs/api/usage/bulk-operations/queries) and [bulk mutation operations](https://shopify.dev/docs/api/usage/bulk-operations/imports).
15+
16+
Use [\`bulk execute\`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) to start a new bulk operation.`
17+
18+
static description = this.descriptionWithoutMarkdown()
1619

1720
static flags = {
1821
...globalFlags,

packages/app/src/cli/commands/app/execute.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ import {globalFlags} from '@shopify/cli-kit/node/cli'
77
export default class Execute extends AppLinkedCommand {
88
static summary = 'Execute GraphQL queries and mutations.'
99

10-
static description = 'Executes an Admin API GraphQL query or mutation on the specified dev store.'
10+
static descriptionWithMarkdown = `Executes an Admin API GraphQL query or mutation on the specified dev store.
11+
12+
For operations that process large amounts of data, use [\`bulk execute\`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) instead.`
13+
14+
static description = this.descriptionWithoutMarkdown()
1115

1216
static flags = {
1317
...globalFlags,

packages/cli/README.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Commands
22
<!-- commands -->
33
* [`shopify app build`](#shopify-app-build)
4+
* [`shopify app bulk execute`](#shopify-app-bulk-execute)
5+
* [`shopify app bulk status`](#shopify-app-bulk-status)
46
* [`shopify app config link`](#shopify-app-config-link)
57
* [`shopify app config pull`](#shopify-app-config-pull)
68
* [`shopify app config use [config] [flags]`](#shopify-app-config-use-config-flags)
@@ -118,6 +120,80 @@ DESCRIPTION
118120
extension to ensure that it's valid.
119121
```
120122

123+
## `shopify app bulk execute`
124+
125+
Execute bulk operations.
126+
127+
```
128+
USAGE
129+
$ shopify app bulk execute [--client-id <value> | -c <value>] [--no-color] [--output-file <value> --watch] [--path
130+
<value>] [-q <value>] [--reset | ] [-s <value>] [--variable-file <value> | -v <value>...] [--verbose] [--version
131+
<value>]
132+
133+
FLAGS
134+
-c, --config=<value> The name of the app configuration.
135+
-q, --query=<value> The GraphQL query or mutation to run as a bulk operation. If omitted, reads from standard
136+
input.
137+
-s, --store=<value> The store domain. Must be an existing dev store.
138+
-v, --variables=<value>... The values for any GraphQL variables in your mutation, in JSON format. Can be specified
139+
multiple times.
140+
--client-id=<value> The Client ID of your app.
141+
--no-color Disable color output.
142+
--output-file=<value> The file path where results should be written if --watch is specified. If not specified,
143+
results will be written to STDOUT.
144+
--path=<value> The path to your app directory.
145+
--reset Reset all your settings.
146+
--variable-file=<value> Path to a file containing GraphQL variables in JSONL format (one JSON object per line).
147+
Can't be used with --variables.
148+
--verbose Increase the verbosity of the output.
149+
--version=<value> The API version to use for the bulk operation. If not specified, uses the latest stable
150+
version.
151+
--watch Wait for bulk operation results before exiting. Defaults to false.
152+
153+
DESCRIPTION
154+
Execute bulk operations.
155+
156+
Executes an Admin API GraphQL query or mutation on the specified dev store, as a bulk operation.
157+
158+
Bulk operations allow you to process large amounts of data asynchronously. Learn more about "bulk query operations"
159+
(https://shopify.dev/docs/api/usage/bulk-operations/queries) and "bulk mutation operations"
160+
(https://shopify.dev/docs/api/usage/bulk-operations/imports).
161+
162+
Use "`bulk status`" (https://shopify.dev/docs/api/shopify-cli/app/app-bulk-status) to check the status of your bulk
163+
operations.
164+
```
165+
166+
## `shopify app bulk status`
167+
168+
Check the status of bulk operations.
169+
170+
```
171+
USAGE
172+
$ shopify app bulk status [--client-id <value> | -c <value>] [--id <value>] [--no-color] [--path <value>] [--reset
173+
| ] [-s <value>] [--verbose]
174+
175+
FLAGS
176+
-c, --config=<value> The name of the app configuration.
177+
-s, --store=<value> The store domain. Must be an existing dev store.
178+
--client-id=<value> The Client ID of your app.
179+
--id=<value> The bulk operation ID. If not provided, lists all bulk operations in the last 7 days.
180+
--no-color Disable color output.
181+
--path=<value> The path to your app directory.
182+
--reset Reset all your settings.
183+
--verbose Increase the verbosity of the output.
184+
185+
DESCRIPTION
186+
Check the status of bulk operations.
187+
188+
Check the status of a specific bulk operation by ID, or list all bulk operations in the last 7 days.
189+
190+
Bulk operations allow you to process large amounts of data asynchronously. Learn more about "bulk query operations"
191+
(https://shopify.dev/docs/api/usage/bulk-operations/queries) and "bulk mutation operations"
192+
(https://shopify.dev/docs/api/usage/bulk-operations/imports).
193+
194+
Use "`bulk execute`" (https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) to start a new bulk operation.
195+
```
196+
121197
## `shopify app config link`
122198

123199
Fetch your app configuration from the Developer Dashboard.
@@ -379,6 +455,9 @@ DESCRIPTION
379455
Execute GraphQL queries and mutations.
380456
381457
Executes an Admin API GraphQL query or mutation on the specified dev store.
458+
459+
For operations that process large amounts of data, use "`bulk execute`"
460+
(https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) instead.
382461
```
383462

384463
## `shopify app function build`

packages/cli/oclif.manifest.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@
9292
"args": {
9393
},
9494
"customPluginName": "@shopify/app",
95-
"description": "Executes an Admin API GraphQL query or mutation on the specified dev store, as a bulk operation.",
95+
"description": "Executes an Admin API GraphQL query or mutation on the specified dev store, as a bulk operation.\n\n Bulk operations allow you to process large amounts of data asynchronously. Learn more about \"bulk query operations\" (https://shopify.dev/docs/api/usage/bulk-operations/queries) and \"bulk mutation operations\" (https://shopify.dev/docs/api/usage/bulk-operations/imports).\n\n Use \"`bulk status`\" (https://shopify.dev/docs/api/shopify-cli/app/app-bulk-status) to check the status of your bulk operations.",
96+
"descriptionWithMarkdown": "Executes an Admin API GraphQL query or mutation on the specified dev store, as a bulk operation.\n\n Bulk operations allow you to process large amounts of data asynchronously. Learn more about [bulk query operations](https://shopify.dev/docs/api/usage/bulk-operations/queries) and [bulk mutation operations](https://shopify.dev/docs/api/usage/bulk-operations/imports).\n\n Use [`bulk status`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-status) to check the status of your bulk operations.",
9697
"flags": {
9798
"client-id": {
9899
"description": "The Client ID of your app.",
@@ -222,7 +223,6 @@
222223
}
223224
},
224225
"hasDynamicHelp": false,
225-
"hidden": true,
226226
"hiddenAliases": [
227227
],
228228
"id": "app:bulk:execute",
@@ -238,7 +238,8 @@
238238
"args": {
239239
},
240240
"customPluginName": "@shopify/app",
241-
"description": "Check the status of a specific bulk operation by ID, or list all bulk operations in the last 7 days.",
241+
"description": "Check the status of a specific bulk operation by ID, or list all bulk operations in the last 7 days.\n\n Bulk operations allow you to process large amounts of data asynchronously. Learn more about \"bulk query operations\" (https://shopify.dev/docs/api/usage/bulk-operations/queries) and \"bulk mutation operations\" (https://shopify.dev/docs/api/usage/bulk-operations/imports).\n\n Use \"`bulk execute`\" (https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) to start a new bulk operation.",
242+
"descriptionWithMarkdown": "Check the status of a specific bulk operation by ID, or list all bulk operations in the last 7 days.\n\n Bulk operations allow you to process large amounts of data asynchronously. Learn more about [bulk query operations](https://shopify.dev/docs/api/usage/bulk-operations/queries) and [bulk mutation operations](https://shopify.dev/docs/api/usage/bulk-operations/imports).\n\n Use [`bulk execute`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) to start a new bulk operation.",
242243
"flags": {
243244
"client-id": {
244245
"description": "The Client ID of your app.",
@@ -317,7 +318,6 @@
317318
}
318319
},
319320
"hasDynamicHelp": false,
320-
"hidden": true,
321321
"hiddenAliases": [
322322
],
323323
"id": "app:bulk:status",
@@ -1133,7 +1133,8 @@
11331133
"args": {
11341134
},
11351135
"customPluginName": "@shopify/app",
1136-
"description": "Executes an Admin API GraphQL query or mutation on the specified dev store.",
1136+
"description": "Executes an Admin API GraphQL query or mutation on the specified dev store.\n\n For operations that process large amounts of data, use \"`bulk execute`\" (https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) instead.",
1137+
"descriptionWithMarkdown": "Executes an Admin API GraphQL query or mutation on the specified dev store.\n\n For operations that process large amounts of data, use [`bulk execute`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) instead.",
11371138
"flags": {
11381139
"client-id": {
11391140
"description": "The Client ID of your app.",

0 commit comments

Comments
 (0)