Add dedicated app and store GraphiQL commands#7382
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
/snapit |
This comment was marked as outdated.
This comment was marked as outdated.
685bb7c to
5297f10
Compare
271d8f9 to
df61d13
Compare
5297f10 to
5abfc13
Compare
df61d13 to
cabbecf
Compare
5abfc13 to
672ec51
Compare
|
/snapit |
This comment was marked as outdated.
This comment was marked as outdated.
e92bf42 to
56fdf9d
Compare
|
/snapit |
|
🫰✨ 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-20260424091951Caution After installing, validate the version by running |
|
This PR seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. |
56fdf9d to
7fbebc7
Compare
672ec51 to
6a5262f
Compare
7fbebc7 to
94aa4c9
Compare
87ea94f to
bb8a029
Compare
027b836 to
1c44740
Compare
1c44740 to
d2e323e
Compare
bb8a029 to
1d74b3b
Compare
a4bfe70 to
d629bbb
Compare
1d74b3b to
573f91b
Compare
d629bbb to
976c80a
Compare
976c80a to
7748424
Compare
|
/snapit |
|
🫰✨ 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-20260612141153Caution After installing, validate the version by running |
|
/snapit |
|
🫰✨ 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-20260703101206Caution After installing, validate the version by running |
7989ba6 to
f8d49f6
Compare
Differences in type declarationsWe 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:
New type declarationspackages/cli-kit/dist/public/node/graphiql/session.d.tsimport { 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 declarationsWe found no diffs with existing type declarations |
isaacroldan
left a comment
There was a problem hiding this comment.
Tophatted and working as expected 👌

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 byshopify store auth.How to test your changes?
shopify app graphiql --store shop.myshopify.com--> opens app-backed GraphiQLshopify app graphiql --store shop.myshopify.com --port 9123--> opens app-backed GraphiQL on the requested local portshopify app devstill allows to open graphiql by pressinggshopify store auth --store shop.myshopify.com --scopes read_products,write_productsshopify store graphiql --store shop.myshopify.com--> opens store-auth GraphiQL with mutations blockedshopify store graphiql --store shop.myshopify.com --allow-mutations--> opens store-auth GraphiQL allowing mutationsPost-release steps
Merge documentation PR
Checklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset add