Skip to content

Add dedicated app and store GraphiQL commands#7382

Merged
gonzaloriestra merged 3 commits into
mainfrom
graphiql-store/open-from-store-execute
Jul 3, 2026
Merged

Add dedicated app and store GraphiQL commands#7382
gonzaloriestra merged 3 commits into
mainfrom
graphiql-store/open-from-store-execute

Conversation

@gonzaloriestra

@gonzaloriestra gonzaloriestra commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Developers should be able to open an authenticated local GraphiQL session directly from the CLI to work against a store or app.

WHAT is this pull request doing?

Adds two dedicated commands:

  • shopify app graphiql: opens Admin API GraphiQL for the linked app and selected store using the app client-credentials flow.
  • shopify store graphiql: opens Admin API GraphiQL for a store using authentication created by shopify store auth.

How to test your changes?

  • shopify app graphiql --store shop.myshopify.com --> opens app-backed GraphiQL
  • shopify app graphiql --store shop.myshopify.com --port 9123 --> opens app-backed GraphiQL on the requested local port
  • shopify app devstill allows to open graphiql by pressing g
  • shopify store auth --store shop.myshopify.com --scopes read_products,write_products
  • shopify store graphiql --store shop.myshopify.com --> opens store-auth GraphiQL with mutations blocked
  • shopify store graphiql --store shop.myshopify.com --allow-mutations --> opens store-auth GraphiQL allowing mutations

Post-release steps

Merge documentation PR

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing — I've identified the correct bump type (patch for bug fixes · minor for new features · major for breaking changes) and added a changeset with pnpm changeset add

gonzaloriestra commented Apr 23, 2026

Copy link
Copy Markdown
Contributor Author

@gonzaloriestra gonzaloriestra changed the title feat(store): open GraphiQL when 'shopify store execute' has no query Open GraphiQL on store execute without query Apr 23, 2026
@gonzaloriestra

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

This comment was marked as outdated.

@gonzaloriestra gonzaloriestra force-pushed the graphiql-store/cleanup-app-deps branch from 685bb7c to 5297f10 Compare April 23, 2026 12:23
@gonzaloriestra gonzaloriestra force-pushed the graphiql-store/open-from-store-execute branch 3 times, most recently from 271d8f9 to df61d13 Compare April 24, 2026 07:57
@gonzaloriestra gonzaloriestra force-pushed the graphiql-store/cleanup-app-deps branch from 5297f10 to 5abfc13 Compare April 24, 2026 07:57
@gonzaloriestra gonzaloriestra force-pushed the graphiql-store/open-from-store-execute branch from df61d13 to cabbecf Compare April 24, 2026 08:00
@gonzaloriestra gonzaloriestra force-pushed the graphiql-store/cleanup-app-deps branch from 5abfc13 to 672ec51 Compare April 24, 2026 08:00
@gonzaloriestra

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

This comment was marked as outdated.

@gonzaloriestra gonzaloriestra force-pushed the graphiql-store/open-from-store-execute branch 2 times, most recently from e92bf42 to 56fdf9d Compare April 24, 2026 09:17
@gonzaloriestra

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

Copy link
Copy Markdown
Contributor

🫰✨ Thanks @gonzaloriestra! Your snapshot has been published to npm.

Test the snapshot by installing your package globally:

pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260424091951

Caution

After installing, validate the version by running shopify version in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@github-actions

Copy link
Copy Markdown
Contributor

This PR seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action.
→ If there's no activity within a week, then a bot will automatically close this.
Thanks for helping to improve Shopify's dev tooling and experience.

@github-actions github-actions Bot closed this Jun 1, 2026
@gonzaloriestra gonzaloriestra reopened this Jun 1, 2026
@gonzaloriestra gonzaloriestra added stale-exempt If added, the PR/issue won't be closed by stale-bot and removed no-pr-activity labels Jun 1, 2026
@gonzaloriestra gonzaloriestra force-pushed the graphiql-store/open-from-store-execute branch from 56fdf9d to 7fbebc7 Compare June 1, 2026 10:38
@gonzaloriestra gonzaloriestra force-pushed the graphiql-store/cleanup-app-deps branch from 672ec51 to 6a5262f Compare June 1, 2026 10:38
@github-actions github-actions Bot added the Area: @shopify/cli @shopify/cli package issues label Jun 1, 2026
@gonzaloriestra gonzaloriestra force-pushed the graphiql-store/open-from-store-execute branch from 7fbebc7 to 94aa4c9 Compare June 1, 2026 10:53
@gonzaloriestra gonzaloriestra marked this pull request as ready for review June 4, 2026 14:07
@gonzaloriestra gonzaloriestra requested review from a team as code owners June 4, 2026 14:07
Comment thread packages/store/src/cli/commands/store/execute.ts Outdated
@gonzaloriestra gonzaloriestra force-pushed the graphiql-store/auth-agnostic-server branch from 87ea94f to bb8a029 Compare June 5, 2026 08:47
@gonzaloriestra gonzaloriestra force-pushed the graphiql-store/open-from-store-execute branch from 027b836 to 1c44740 Compare June 5, 2026 08:47
@gonzaloriestra gonzaloriestra force-pushed the graphiql-store/open-from-store-execute branch from 1c44740 to d2e323e Compare June 12, 2026 12:26
@gonzaloriestra gonzaloriestra force-pushed the graphiql-store/auth-agnostic-server branch from bb8a029 to 1d74b3b Compare June 12, 2026 12:26
@gonzaloriestra gonzaloriestra force-pushed the graphiql-store/open-from-store-execute branch 2 times, most recently from a4bfe70 to d629bbb Compare June 12, 2026 13:51
@gonzaloriestra gonzaloriestra force-pushed the graphiql-store/auth-agnostic-server branch from 1d74b3b to 573f91b Compare June 12, 2026 13:51
@gonzaloriestra gonzaloriestra force-pushed the graphiql-store/open-from-store-execute branch from d629bbb to 976c80a Compare June 12, 2026 14:03
@gonzaloriestra gonzaloriestra changed the title Open GraphiQL on store execute with --graphiql Add dedicated app and store GraphiQL commands Jun 12, 2026
@gonzaloriestra gonzaloriestra force-pushed the graphiql-store/open-from-store-execute branch from 976c80a to 7748424 Compare June 12, 2026 14:04

Copy link
Copy Markdown
Contributor Author

/snapit

Base automatically changed from graphiql-store/auth-agnostic-server to main June 12, 2026 14:11
@github-actions

Copy link
Copy Markdown
Contributor

🫰✨ Thanks @gonzaloriestra! Your snapshot has been published to npm.

Test the snapshot by installing your package globally:

pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260612141153

Caution

After installing, validate the version by running shopify version in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@gonzaloriestra

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

🫰✨ Thanks @gonzaloriestra! Your snapshot has been published to npm.

Test the snapshot by installing your package globally:

pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260703101206

Caution

After installing, validate the version by running shopify version in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@gonzaloriestra gonzaloriestra force-pushed the graphiql-store/open-from-store-execute branch from 7989ba6 to f8d49f6 Compare July 3, 2026 10:49
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

packages/cli-kit/dist/public/node/graphiql/session.d.ts
import { GraphiQLAppContext, TokenProvider } from './server.js';
import { AbortSignal } from '../abort.js';
import { OutputMessage } from '../output.js';
import { Writable } from 'stream';
export interface BuildGraphiQLUrlOptions {
    port: number;
    key: string;
    query?: string;
    variables?: string;
    apiVersion?: string;
}
export interface RunGraphiQLSessionOptions {
    storeFqdn: string;
    tokenProvider: TokenProvider;
    key: string;
    port?: number;
    query?: string;
    variables?: string;
    apiVersion?: string;
    appContext?: GraphiQLAppContext;
    protectMutations?: boolean;
    additionalReadyMessages?: OutputMessage[];
    abortSignal?: AbortSignal;
    stdout?: Writable;
}
/**
 * Generates a random key suitable for authenticating a single local GraphiQL session.
 *
 * @returns A 64-character hex string.
 */
export declare function generateRandomGraphiQLKey(): string;
/**
 * Builds the browser URL for a local GraphiQL session.
 *
 * @param options - The local port, key, and optional query string fields to prefill.
 * @returns The fully-qualified local GraphiQL URL.
 */
export declare function buildGraphiQLUrl(options: BuildGraphiQLUrlOptions): string;
/**
 * Runs a local GraphiQL session until the user interrupts it or the supplied abort signal fires.
 *
 * @param options - The server, authentication, URL prefill, and output options for the session.
 */
export declare function runGraphiQLSession(options: RunGraphiQLSessionOptions): Promise<void>;
/**
 * Resolves when the process receives SIGINT or when the supplied abort signal fires.
 *
 * @param externalSignal - Optional signal used by tests or callers to stop the session.
 */
export declare function waitForGraphiQLAbort(externalSignal?: AbortSignal): Promise<void>;

Existing type declarations

We found no diffs with existing type declarations

@isaacroldan isaacroldan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tophatted and working as expected 👌

@gonzaloriestra gonzaloriestra added the includes-post-release-steps PRs including this label require additional steps after releasing label Jul 3, 2026
@gonzaloriestra gonzaloriestra added this pull request to the merge queue Jul 3, 2026
Merged via the queue into main with commit 2dc6f91 Jul 3, 2026
30 checks passed
@gonzaloriestra gonzaloriestra deleted the graphiql-store/open-from-store-execute branch July 3, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: @shopify/cli @shopify/cli package issues includes-post-release-steps PRs including this label require additional steps after releasing stale-exempt If added, the PR/issue won't be closed by stale-bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants