Skip to content

Remove vestigial account-info and Partners codegen plumbing#8115

Open
isaacroldan wants to merge 1 commit into
partners-cleanup/03-shrink-partners-clientfrom
partners-cleanup/06-drop-vestigial-account-info
Open

Remove vestigial account-info and Partners codegen plumbing#8115
isaacroldan wants to merge 1 commit into
partners-cleanup/03-shrink-partners-clientfrom
partners-cleanup/06-drop-vestigial-account-info

Conversation

@isaacroldan

@isaacroldan isaacroldan commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

PartnersClient cleanup — 3 of 3.

WHY are these changes introduced?

Final sweep of vestigial Partners / account-info plumbing left behind once PartnersClient was reduced to the migration surface. Includes one small user-facing fix.

WHAT is this pull request doing?

  • currentAccountInfo was a Partners-era interface method. AppManagementClient implemented it as a throwing stub, and its only caller (fetchOrganizations, via fetchCurrentAccountInformation) swallowed the throw and fell back to "an unknown account" in the No Organization found error. Switch that caller to session.accountInfo — which App Management already populates and which the sibling fetchOrgFromId already used — so the error now names the real account. Then remove currentAccountInfo from the interface, the AppManagement stub, and the test double, and delete the orphaned partner-account-info service and its generated current-account-info document.
  • Delete app-conf-store.ts (and its test): its account-info cache had no remaining callers once partner-account-info was gone.
  • Remove partnersRequestDoc from cli-kit (no remaining callers) and the imports it exclusively pulled in.
  • Remove the now-empty Partners GraphQL codegen: the partners project in graphql.config.ts, its nx targets in project.json, the orphaned generated types, and the Partners schema entry in bin/get-graphql-schemas.js.

How to test your changes?

pnpm nx type-check app cli-kit + lint pass. Behavior check: hitting No Organization found (an account with zero organizations) now names the signed-in account instead of "an unknown account". Everything else is dead-code removal.

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

isaacroldan commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions Bot added the Area: @shopify/app @shopify/app package issues label Jul 16, 2026
@isaacroldan
isaacroldan force-pushed the partners-cleanup/06-drop-vestigial-account-info branch from b01ff7b to 5f5c49d Compare July 16, 2026 15:11
@github-actions github-actions Bot added no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. and removed Area: @shopify/app @shopify/app package issues labels Jul 16, 2026
Follow-up cleanup now that PartnersClient is reduced to the migration surface.

currentAccountInfo was a Partners-era method. AppManagement implements it as a throwing stub, and its only caller (fetchOrganizations, via fetchCurrentAccountInformation) swallowed the throw and fell back to an "unknown account" in the "No Organization found" error. Switch that caller to session.accountInfo -- which AppManagement already populates and which the sibling fetchOrgFromId already uses -- so the error now names the real account. Then drop currentAccountInfo from the interface, the AppManagement stub, and the test double, and delete the orphaned partner-account-info service plus its generated current-account-info document.

With partner-account-info gone, its account-info cache in app-conf-store had no remaining callers, so delete that file and its test.

partnersRequestDoc had no remaining callers after PartnersClient stopped using it; remove the dead cli-kit export and the imports it exclusively pulled in.

The Partners typed-document codegen no longer has any operations: remove the partners project from graphql.config.ts and its nx targets, delete the orphaned generated types, and drop the Partners schema from the fetch script.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@isaacroldan
isaacroldan force-pushed the partners-cleanup/06-drop-vestigial-account-info branch from 5f5c49d to a520fee Compare July 16, 2026 15:36
@github-actions

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

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/public/node/api/partners.d.ts
@@ -1,7 +1,5 @@
 import { GraphQLVariables, GraphQLResponse, CacheOptions, UnauthorizedHandler } from './graphql.js';
 import { RequestModeInput } from '../http.js';
-import { Variables } from 'graphql-request';
-import { TypedDocumentNode } from '@graphql-typed-document-node/core';
 /**
  * Executes a GraphQL query against the Partners API.
  *
@@ -14,21 +12,6 @@ import { TypedDocumentNode } from '@graphql-typed-document-node/core';
  * @returns The response of the query of generic type <T>.
  */
 export declare function partnersRequest<T>(query: string, token: string, variables?: GraphQLVariables, cacheOptions?: CacheOptions, preferredBehaviour?: RequestModeInput, unauthorizedHandler?: UnauthorizedHandler): Promise<T>;
-export declare const generateFetchAppLogUrl: (cursor?: string, filters?: {
-    status?: string;
-    source?: string;
-}) => Promise<string>;
-/**
- * Executes a GraphQL query against the Partners API. Uses typed documents.
- *
- * @param query - GraphQL query to execute.
- * @param token - Partners token.
- * @param variables - GraphQL variables to pass to the query.
- * @param preferredBehaviour - Preferred behaviour for the request.
- * @param unauthorizedHandler - Optional handler for unauthorized requests.
- * @returns The response of the query of generic type <TResult>.
- */
-export declare function partnersRequestDoc<TResult, TVariables extends Variables>(query: TypedDocumentNode<TResult, TVariables>, token: string, variables?: TVariables, preferredBehaviour?: RequestModeInput, unauthorizedHandler?: UnauthorizedHandler): Promise<TResult>;
 /**
  * Sets the next deprecation date from [GraphQL response extensions](https://www.apollographql.com/docs/resources/graphql-glossary/#extensions)
  * if  objects contain a  (ISO 8601-formatted string).

@isaacroldan isaacroldan changed the title Remove the vestigial currentAccountInfo path and dead partnersRequestDoc Remove vestigial account-info and Partners codegen plumbing Jul 16, 2026
@isaacroldan
isaacroldan marked this pull request as ready for review July 16, 2026 15:53
@isaacroldan
isaacroldan requested a review from a team as a code owner July 16, 2026 15:53
@isaacroldan
isaacroldan changed the base branch from partners-cleanup/05-trim-dead-graphql-consts to graphite-base/8115 July 16, 2026 16:08
@isaacroldan
isaacroldan changed the base branch from graphite-base/8115 to partners-cleanup/03-shrink-partners-client July 16, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant