[Refactor] Consolidate handleDeprecations in GraphQL API module - #8453
[Refactor] Consolidate handleDeprecations in GraphQL API module#8453gonzaloriestra wants to merge 1 commit into
Conversation
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
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/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
|
Consolidates the duplicated
handleDeprecationsfunction fromapp-management.tsandpartners.tsintographql.ts. Re-exportshandleDeprecationsfromapp-management.tsandpartners.tsto preserve public API compatibility, and updates imports inbusiness-platform.tsandfunctions.ts.PR created automatically by Jules for task 8733677940198614738 started by @gonzaloriestra