{
  "slug": "shopify-store-auth-and-execute-run-store-scoped-admin-api-graphql-7519fe0db2bf",
  "title": "shopify store auth and execute run store-scoped Admin API GraphQL",
  "tools": [
    "shopify"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-04-02T16:09:20.000Z",
  "announced_at": "2026-04-02T16:09:20.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "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.",
    "examples": [
      "shopify store auth --store <store.myshopify.com> --scopes <comma-separated-scopes>",
      "shopify store execute --store <store.myshopify.com> --query '<GraphQL query or mutation>'"
    ],
    "gotchas": [
      "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`."
    ]
  },
  "why_it_matters": "Run a store-scoped Admin API GraphQL query or mutation from a repository that does not contain a local Shopify app project.",
  "sources": [
    "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"
  ],
  "rank": 0.98051,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2a-20261017",
    "verdict_id": "wave2a-20261017:wave2a-20261017-cdfd5540a3039993-2:gate",
    "evidence_hash": "371fcbd8ee31c7919fbf7d234c61ec77f6fa96f5a5eeeb318b61b04b6498f41e"
  },
  "review": {
    "draft_hash": "b1c69e1959a8d2e039eb55d9d256e0883b37307a8174ab592abccce23b762fcd",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2a-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.98 >= 0.9; 2 needed) and Jev gave 0.82 (>= 0.6 needed)."
  }
}
