Skip to content

Commit

Permalink
Add missed reexports of MutationFetchPolicy and RefetchWritePolicy to…
Browse files Browse the repository at this point in the history
… @apollo/client/core (#11332)

Co-authored-by: Lenz Weber-Tronic <[email protected]>
  • Loading branch information
asvishnyakov and phryneas authored Nov 8, 2023
1 parent 9c0afcc commit 291aea5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
8 changes: 2 additions & 6 deletions .api-reports/api-report-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -1316,14 +1316,12 @@ interface MutationBaseOptions<TData = any, TVariables = OperationVariables, TCon
}

// @public (undocumented)
type MutationFetchPolicy = Extract<FetchPolicy, "network-only" | "no-cache">;
export type MutationFetchPolicy = Extract<FetchPolicy, "network-only" | "no-cache">;

// Warning: (ae-forgotten-export) The symbol "MutationBaseOptions" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
export interface MutationOptions<TData = any, TVariables = OperationVariables, TContext = DefaultContext, TCache extends ApolloCache<any> = ApolloCache<any>> extends MutationBaseOptions<TData, TVariables, TContext, TCache> {
// Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts
//
// (undocumented)
fetchPolicy?: MutationFetchPolicy;
// (undocumented)
Expand Down Expand Up @@ -1916,7 +1914,7 @@ export interface RefetchQueriesResult<TResult> extends Promise<RefetchQueriesPro
export type RefetchQueryDescriptor = string | DocumentNode;

// @public (undocumented)
type RefetchWritePolicy = "merge" | "overwrite";
export type RefetchWritePolicy = "merge" | "overwrite";

// @public (undocumented)
export type RequestHandler = (operation: Operation, forward: NextLink) => Observable<FetchResult> | null;
Expand Down Expand Up @@ -2146,8 +2144,6 @@ export interface WatchQueryOptions<TVariables extends OperationVariables = Opera
//
// (undocumented)
nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions<TVariables, TData>, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext<TData, TVariables>) => WatchQueryFetchPolicy);
// Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts
//
// (undocumented)
refetchWritePolicy?: RefetchWritePolicy;
}
Expand Down
8 changes: 2 additions & 6 deletions .api-reports/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,7 @@ export interface MutationDataOptions<TData = any, TVariables = OperationVariable
}

// @public (undocumented)
type MutationFetchPolicy = Extract<FetchPolicy, "network-only" | "no-cache">;
export type MutationFetchPolicy = Extract<FetchPolicy, "network-only" | "no-cache">;

// @public (undocumented)
export type MutationFunction<TData = any, TVariables = OperationVariables, TContext = DefaultContext, TCache extends ApolloCache<any> = ApolloCache<any>> = (options?: MutationFunctionOptions<TData, TVariables, TContext, TCache>) => Promise<FetchResult<TData>>;
Expand All @@ -1599,8 +1599,6 @@ export interface MutationHookOptions<TData = any, TVariables = OperationVariable
//
// @public (undocumented)
export interface MutationOptions<TData = any, TVariables = OperationVariables, TContext = DefaultContext, TCache extends ApolloCache<any> = ApolloCache<any>> extends MutationBaseOptions<TData, TVariables, TContext, TCache> {
// Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts
//
// (undocumented)
fetchPolicy?: MutationFetchPolicy;
// (undocumented)
Expand Down Expand Up @@ -2334,7 +2332,7 @@ export interface RefetchQueriesResult<TResult> extends Promise<RefetchQueriesPro
export type RefetchQueryDescriptor = string | DocumentNode;

// @public (undocumented)
type RefetchWritePolicy = "merge" | "overwrite";
export type RefetchWritePolicy = "merge" | "overwrite";

// @public (undocumented)
class RenderPromises {
Expand Down Expand Up @@ -2831,8 +2829,6 @@ export interface WatchQueryOptions<TVariables extends OperationVariables = Opera
//
// (undocumented)
nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions<TVariables, TData>, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext<TData, TVariables>) => WatchQueryFetchPolicy);
// Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts
//
// (undocumented)
refetchWritePolicy?: RefetchWritePolicy;
}
Expand Down
5 changes: 5 additions & 0 deletions .changeset/ninety-suits-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@apollo/client": patch
---

Add missed reexports of MutationFetchPolicy and RefetchWritePolicy to @apollo/client/core
2 changes: 2 additions & 0 deletions src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export type {
SubscriptionOptions,
FetchPolicy,
WatchQueryFetchPolicy,
MutationFetchPolicy,
RefetchWritePolicy,
ErrorPolicy,
FetchMoreQueryOptions,
SubscribeToMoreOptions,
Expand Down

0 comments on commit 291aea5

Please sign in to comment.