shopify store auth and execute run store-scoped Admin API GraphQL
Introduced 2026-04-02 · score 0.98
HOW TO USE IT
When a repository has no local Shopify app project, authenticate the store with the required Admin API scopes, then execute the GraphQL query using that stored auth. Add `--allow-mutations` for write operations.
shopify store auth --store <store.myshopify.com> --scopes <comma-separated-scopes>shopify store execute --store <store.myshopify.com> --query '<GraphQL query or mutation>'WHY THIS HELPS
Run a store-scoped Admin API GraphQL query or mutation from a repository that does not contain a local Shopify app project.
REQUIREMENTS AND LIMITATIONS
- Version: 3.93.0
- `store auth --store` (required): The store’s myshopify.com domain.
- `store auth --scopes` (required): Comma-separated Admin API scopes to request for the app.
- `store execute --store` (required): The store’s myshopify.com domain.
- `store execute --query` / `-q`: GraphQL query or mutation as a string. Mutually exclusive with `--query-file`.
- `store execute --query-file`: Path to a file containing the GraphQL query or mutation. Mutually exclusive with `--query`.
- `store execute --variables` / `-v`: GraphQL variable values in JSON format. Mutually exclusive with `--variable-file`.
- `store execute --variable-file`: Path to a JSON file containing GraphQL variables. Mutually exclusive with `--variables`.
- `store execute --allow-mutations`: Allows GraphQL mutations to run against the store; required for write operations.
- Prerequisite: Run `shopify store auth` first to create stored authentication. Re-run it if the token is missing, expired, or lacks required scopes.
- Prerequisite: Request the Admin API scopes needed by the operation during authentication.
- Authentication uses a PKCE OAuth flow and stores online per-user auth for later store commands.
- Re-run `shopify store auth` if the stored token is missing, expires, or no longer has the required scopes.
- Write operations require `--allow-mutations`.
FIRST-PARTY EVIDENCE
- https://github.com/Shopify/cli/releases/tag/3.93.0
- https://github.com/Shopify/cli/pull/7122
- https://shopify.dev/docs/api/shopify-cli/store/store-auth
- https://shopify.dev/docs/api/shopify-cli/store/store-execute
Check the installed version and the source before using it. Entry JSON