Skip to main content

app execute

Executes an Admin API GraphQL query or mutation on the specified store. Mutations are only allowed on dev stores.

For operations that process large amounts of data, use bulk execute instead.

The following flags are available for the app execute command:

Anchor to --client-id <value>
--client-id <value>
string
env: SHOPIFY_FLAG_CLIENT_ID

The Client ID of your app.

Anchor to --no-color
--no-color
env: SHOPIFY_FLAG_NO_COLOR

Disable color output.

Anchor to --output-file <value>
--output-file <value>
string
env: SHOPIFY_FLAG_OUTPUT_FILE

The file name where results should be written, instead of STDOUT.

Anchor to --path <value>
--path <value>
string
env: SHOPIFY_FLAG_PATH

The path to your app directory.

Anchor to --query-file <value>
--query-file <value>
string
env: SHOPIFY_FLAG_QUERY_FILE

Path to a file containing the GraphQL query or mutation. Can't be used with --query.

Anchor to --reset
--reset
env: SHOPIFY_FLAG_RESET

Reset all your settings.

Anchor to --variable-file <value>
--variable-file <value>
string
env: SHOPIFY_FLAG_VARIABLE_FILE

Path to a file containing GraphQL variables in JSON format. Can't be used with --variables.

Anchor to --verbose
--verbose
env: SHOPIFY_FLAG_VERBOSE

Increase the verbosity of the output.

Anchor to --version <value>
--version <value>
string
env: SHOPIFY_FLAG_VERSION

The API version to use for the query or mutation. Defaults to the latest stable version.

Anchor to -c, --config <value>
-c, --config <value>
string
env: SHOPIFY_FLAG_APP_CONFIG

The name of the app configuration.

Anchor to -q, --query <value>
-q, --query <value>
string
env: SHOPIFY_FLAG_QUERY

The GraphQL query or mutation, as a string.

Anchor to -s, --store <value>
-s, --store <value>
string
env: SHOPIFY_FLAG_STORE

The myshopify.com domain of the store to execute against. The app must be installed on the store. If not specified, you will be prompted to select a store.

Anchor to -v, --variables <value>
-v, --variables <value>
string
env: SHOPIFY_FLAG_VARIABLES

The values for any GraphQL variables in your query or mutation, in JSON format.

Examples

app execute

shopify app execute [flags]
Was this page helpful?