Shrink PartnersClient and remove the GraphQL it exclusively used#8111
Open
isaacroldan wants to merge 3 commits into
Open
Conversation
4 tasks
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.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
4 tasks
This was referenced Jul 16, 2026
Third step of the PartnersClient cleanup, and the keystone. PartnersClient is only ever instantiated to run the three legacy extension migrations, so it now implements just MigrationDeveloperPlatformClient. Delete the dead methods and every import they exclusively pulled in, keeping the migrate mutations plus the session/token/request infrastructure they depend on. Trim the test to the surviving behavior. The migration path only reads the session token, so session() no longer makes a Partners currentAccountInfo round-trip; the App Management client already resolves account info independently. No behavior change on the live migration path. The partners-era GraphQL documents these methods used (create_app, find_app, find_org, etc.) are now unreferenced and will be deleted in follow-up PRs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fourth step of the PartnersClient cleanup. These GraphQL documents were only used by the PartnersClient methods removed in the previous step, so nothing imports them anymore. Delete the 12 hand-written query/mutation files, the two generated partners operations (all-orgs, dev-stores-by-org) with their .graphql sources, and their no-inline-graphql allowlist entries. Retype the app-logs subscribe test fixture to the generated document type. No behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Final step of the PartnersClient cleanup. The PartnersClient methods removed earlier in the stack were the only users of these GraphQL query/mutation constants and of the generateFetchAppLogUrl cli-kit helper. Drop the dead constants from the shared query files (keeping the schema/variables types still used by AppManagementClient and other live code), remove generateFetchAppLogUrl, and prune the now-inert no-inline-graphql allowlist entries. No behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
isaacroldan
force-pushed
the
partners-cleanup/03-shrink-partners-client
branch
from
July 16, 2026 14:45
da9696c to
dda8750
Compare
isaacroldan
force-pushed
the
partners-cleanup/02-narrow-live-consumers
branch
from
July 16, 2026 14:45
ff7062f to
a30cffa
Compare
4 tasks
isaacroldan
changed the base branch from
partners-cleanup/02-narrow-live-consumers
to
graphite-base/8111
July 16, 2026 15:11
isaacroldan
changed the base branch from
graphite-base/8111
to
partners-cleanup/01-extract-migration-interface
July 16, 2026 15:11
isaacroldan
marked this pull request as ready for review
July 16, 2026 15:52
Contributor
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 declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/public/node/api/partners.d.ts@@ -14,10 +14,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.
*
|
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

WHY are these changes introduced?
PartnersClientis only ever instantiated to run the three legacy extension migrations, yet it implements the fullDeveloperPlatformClient. Reducing it to a migration-only client lets us delete the large surface of code — methods, GraphQL documents, and shared query consts — that only it used.The shrink and the deletions are one PR on purpose: flipping
PartnersClienttoimplements MigrationDeveloperPlatformClientorphans all of that code at once, and the Knip (unused-code) check runs per-PR, so the removal has to land in the same PR that orphans it.WHAT is this pull request doing?
Three commits:
PartnersClientto the migration surface — implement onlyMigrationDeveloperPlatformClient; delete the dead methods and every import they exclusively pulled in, keeping the migrate mutations plus the session/token/request infrastructure.session()no longer makes a redundant PartnerscurrentAccountInforound-trip (the migration path only reads the token). Test trimmed to the surviving behavior.app_active_version,app_version_by_tag,create_app,find_app,find_org,find_org_basic,find_store_by_domain,generate_signed_upload_url,subscribe_to_app_logs,template_specifications, the twofunctions/*_schema_definition, and thepartners/{all-orgs,dev-stores-by-org}query + generated pairs) plus theirno-inline-graphqlallowlist entries and the matchingapp.test-data.tsstubs.PartnersClient-only query/mutation consts from shared GraphQL files (app_deploy,app_release,app_versions_diff,get_versions_list,update_urls,all_app_extension_registrations,extension_specifications, and the webhookrequest-*services), keeping the schema/variable types the App Management client still uses; removegenerateFetchAppLogUrlfrom cli-kit; drop the corresponding allowlist entries.Net ~1,830 lines removed.
How to test your changes?
pnpm nx type-check app cli-kit, lint, and Knip pass. Migration commands still work — only dead code and a redundant network round-trip were removed.Checklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset add