diff --git a/packages/app/src/cli/commands/app/bulk/execute.ts b/packages/app/src/cli/commands/app/bulk/execute.ts index d54f2d287d..e76b6f8822 100644 --- a/packages/app/src/cli/commands/app/bulk/execute.ts +++ b/packages/app/src/cli/commands/app/bulk/execute.ts @@ -7,10 +7,13 @@ import {globalFlags} from '@shopify/cli-kit/node/cli' export default class BulkExecute extends AppLinkedCommand { static summary = 'Execute bulk operations.' - static description = - 'Executes an Admin API GraphQL query or mutation on the specified dev store, as a bulk operation.' + static descriptionWithMarkdown = `Executes an Admin API GraphQL query or mutation on the specified dev store, as a bulk operation. - static hidden = true + 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). + + Use [\`bulk status\`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-status) to check the status of your bulk operations.` + + static description = this.descriptionWithoutMarkdown() static flags = { ...globalFlags, diff --git a/packages/app/src/cli/commands/app/bulk/status.ts b/packages/app/src/cli/commands/app/bulk/status.ts index fd3ee4fb72..1e9e8b84f0 100644 --- a/packages/app/src/cli/commands/app/bulk/status.ts +++ b/packages/app/src/cli/commands/app/bulk/status.ts @@ -9,10 +9,13 @@ import {normalizeStoreFqdn} from '@shopify/cli-kit/node/context/fqdn' export default class BulkStatus extends AppLinkedCommand { static summary = 'Check the status of bulk operations.' - static description = - 'Check the status of a specific bulk operation by ID, or list all bulk operations in the last 7 days.' + static descriptionWithMarkdown = `Check the status of a specific bulk operation by ID, or list all bulk operations in the last 7 days. - static hidden = true + 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). + + Use [\`bulk execute\`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) to start a new bulk operation.` + + static description = this.descriptionWithoutMarkdown() static flags = { ...globalFlags, diff --git a/packages/app/src/cli/commands/app/execute.ts b/packages/app/src/cli/commands/app/execute.ts index 37fb1ffcd8..0a5fb51dbf 100644 --- a/packages/app/src/cli/commands/app/execute.ts +++ b/packages/app/src/cli/commands/app/execute.ts @@ -7,7 +7,11 @@ import {globalFlags} from '@shopify/cli-kit/node/cli' export default class Execute extends AppLinkedCommand { static summary = 'Execute GraphQL queries and mutations.' - static description = 'Executes an Admin API GraphQL query or mutation on the specified dev store.' + static descriptionWithMarkdown = `Executes an Admin API GraphQL query or mutation on the specified dev store. + + For operations that process large amounts of data, use [\`bulk execute\`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) instead.` + + static description = this.descriptionWithoutMarkdown() static flags = { ...globalFlags, diff --git a/packages/cli/README.md b/packages/cli/README.md index e3724c7aca..95b09bc336 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -1,6 +1,8 @@ # Commands * [`shopify app build`](#shopify-app-build) +* [`shopify app bulk execute`](#shopify-app-bulk-execute) +* [`shopify app bulk status`](#shopify-app-bulk-status) * [`shopify app config link`](#shopify-app-config-link) * [`shopify app config pull`](#shopify-app-config-pull) * [`shopify app config use [config] [flags]`](#shopify-app-config-use-config-flags) @@ -118,6 +120,80 @@ DESCRIPTION extension to ensure that it's valid. ``` +## `shopify app bulk execute` + +Execute bulk operations. + +``` +USAGE + $ shopify app bulk execute [--client-id | -c ] [--no-color] [--output-file --watch] [--path + ] [-q ] [--reset | ] [-s ] [--variable-file | -v ...] [--verbose] [--version + ] + +FLAGS + -c, --config= The name of the app configuration. + -q, --query= The GraphQL query or mutation to run as a bulk operation. If omitted, reads from standard + input. + -s, --store= The store domain. Must be an existing dev store. + -v, --variables=... The values for any GraphQL variables in your mutation, in JSON format. Can be specified + multiple times. + --client-id= The Client ID of your app. + --no-color Disable color output. + --output-file= The file path where results should be written if --watch is specified. If not specified, + results will be written to STDOUT. + --path= The path to your app directory. + --reset Reset all your settings. + --variable-file= Path to a file containing GraphQL variables in JSONL format (one JSON object per line). + Can't be used with --variables. + --verbose Increase the verbosity of the output. + --version= The API version to use for the bulk operation. If not specified, uses the latest stable + version. + --watch Wait for bulk operation results before exiting. Defaults to false. + +DESCRIPTION + Execute bulk operations. + + Executes an Admin API GraphQL query or mutation on the specified dev store, as a bulk operation. + + 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). + + Use "`bulk status`" (https://shopify.dev/docs/api/shopify-cli/app/app-bulk-status) to check the status of your bulk + operations. +``` + +## `shopify app bulk status` + +Check the status of bulk operations. + +``` +USAGE + $ shopify app bulk status [--client-id | -c ] [--id ] [--no-color] [--path ] [--reset + | ] [-s ] [--verbose] + +FLAGS + -c, --config= The name of the app configuration. + -s, --store= The store domain. Must be an existing dev store. + --client-id= The Client ID of your app. + --id= The bulk operation ID. If not provided, lists all bulk operations in the last 7 days. + --no-color Disable color output. + --path= The path to your app directory. + --reset Reset all your settings. + --verbose Increase the verbosity of the output. + +DESCRIPTION + Check the status of bulk operations. + + Check the status of a specific bulk operation by ID, or list all bulk operations in the last 7 days. + + 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). + + Use "`bulk execute`" (https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) to start a new bulk operation. +``` + ## `shopify app config link` Fetch your app configuration from the Developer Dashboard. @@ -379,6 +455,9 @@ DESCRIPTION Execute GraphQL queries and mutations. Executes an Admin API GraphQL query or mutation on the specified dev store. + + For operations that process large amounts of data, use "`bulk execute`" + (https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) instead. ``` ## `shopify app function build` diff --git a/packages/cli/oclif.manifest.json b/packages/cli/oclif.manifest.json index 160ddd015c..e079835085 100644 --- a/packages/cli/oclif.manifest.json +++ b/packages/cli/oclif.manifest.json @@ -92,7 +92,8 @@ "args": { }, "customPluginName": "@shopify/app", - "description": "Executes an Admin API GraphQL query or mutation on the specified dev store, as a bulk operation.", + "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.", + "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.", "flags": { "client-id": { "description": "The Client ID of your app.", @@ -222,7 +223,6 @@ } }, "hasDynamicHelp": false, - "hidden": true, "hiddenAliases": [ ], "id": "app:bulk:execute", @@ -238,7 +238,8 @@ "args": { }, "customPluginName": "@shopify/app", - "description": "Check the status of a specific bulk operation by ID, or list all bulk operations in the last 7 days.", + "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.", + "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.", "flags": { "client-id": { "description": "The Client ID of your app.", @@ -317,7 +318,6 @@ } }, "hasDynamicHelp": false, - "hidden": true, "hiddenAliases": [ ], "id": "app:bulk:status", @@ -1133,7 +1133,8 @@ "args": { }, "customPluginName": "@shopify/app", - "description": "Executes an Admin API GraphQL query or mutation on the specified dev store.", + "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.", + "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.", "flags": { "client-id": { "description": "The Client ID of your app.",