Skip to content

[Refactor] Consolidate handleDeprecations in GraphQL API module - #8453

Draft
gonzaloriestra wants to merge 1 commit into
mainfrom
refactor-consolidate-handle-deprecations-8733677940198614738
Draft

[Refactor] Consolidate handleDeprecations in GraphQL API module#8453
gonzaloriestra wants to merge 1 commit into
mainfrom
refactor-consolidate-handle-deprecations-8733677940198614738

Conversation

@gonzaloriestra

Copy link
Copy Markdown
Contributor

Consolidates the duplicated handleDeprecations function from app-management.ts and partners.ts into graphql.ts. Re-exports handleDeprecations from app-management.ts and partners.ts to preserve public API compatibility, and updates imports in business-platform.ts and functions.ts.


PR created automatically by Jules for task 8733677940198614738 started by @gonzaloriestra

@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 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

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/public/node/api/app-management.d.ts
@@ -1,4 +1,4 @@
-import { CacheOptions, GraphQLResponse, UnauthorizedHandler } from './graphql.js';
+import { CacheOptions, UnauthorizedHandler, handleDeprecations } from './graphql.js';
 import { RequestModeInput } from '../http.js';
 import { TypedDocumentNode } from '@graphql-typed-document-node/core';
 import { Variables } from 'graphql-request';
@@ -34,10 +34,4 @@ export interface AppManagementRequestOptions<TResult, TVariables extends Variabl
  * @returns The response of the query of generic type <T>.
  */
 export declare function appManagementRequestDoc<TResult, TVariables extends Variables>(options: AppManagementRequestOptions<TResult, TVariables>): Promise<TResult>;
-/**
- * Sets the next deprecation date from [GraphQL response extensions](https://www.apollographql.com/docs/resources/graphql-glossary/#extensions)
- * if `response.extensions.deprecations` objects contain a `supportedUntilDate` (ISO 8601-formatted string).
- *
- * @param response - The response of the query.
- */
-export declare function handleDeprecations<T>(response: GraphQLResponse<T>): void;
\ No newline at end of file
+export { handleDeprecations };
\ No newline at end of file
packages/cli-kit/dist/public/node/api/graphql.d.ts
@@ -59,4 +59,11 @@ export declare function graphqlRequest<T>(options: GraphQLRequestOptions<T>): Pr
  * @returns The response of the query of generic type <TResult>.
  */
 export declare function graphqlRequestDoc<TResult, TVariables extends Variables>(options: GraphQLRequestDocOptions<TResult, TVariables>): Promise<TResult>;
+/**
+ * Sets the next deprecation date from [GraphQL response extensions](https://www.apollographql.com/docs/resources/graphql-glossary/#extensions)
+ * if `response.extensions.deprecations` objects contain a `supportedUntilDate` (ISO 8601-formatted string).
+ *
+ * @param response - The response of the query.
+ */
+export declare function handleDeprecations<T>(response: GraphQLResponse<T>): void;
 export {};
\ No newline at end of file
packages/cli-kit/dist/public/node/api/partners.d.ts
@@ -1,4 +1,4 @@
-import { GraphQLVariables, GraphQLResponse, CacheOptions, UnauthorizedHandler } from './graphql.js';
+import { GraphQLVariables, CacheOptions, UnauthorizedHandler, handleDeprecations } from './graphql.js';
 import { RequestModeInput } from '../http.js';
 /**
  * Executes a GraphQL query against the Partners API.
@@ -12,10 +12,4 @@ import { RequestModeInput } from '../http.js';
  * @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>;
-/**
- * Sets the next deprecation date from [GraphQL response extensions](https://www.apollographql.com/docs/resources/graphql-glossary/#extensions)
- * if `response.extensions.deprecations` objects contain a `supportedUntilDate` (ISO 8601-formatted string).
- *
- * @param response - The response of the query.
- */
-export declare function handleDeprecations<T>(response: GraphQLResponse<T>): void;
\ No newline at end of file
+export { handleDeprecations };
\ No newline at end of file

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