Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missed reexports of MutationFetchPolicy and RefetchWritePolicy to @apollo/client/core #11332

Merged
merged 5 commits into from Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 2 additions & 6 deletions .api-reports/api-report-core.md
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
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
@@ -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
Expand Up @@ -14,6 +14,8 @@ export type {
SubscriptionOptions,
FetchPolicy,
WatchQueryFetchPolicy,
MutationFetchPolicy,
RefetchWritePolicy,
ErrorPolicy,
FetchMoreQueryOptions,
SubscribeToMoreOptions,
Expand Down