Skip to content

Commit b65982b

Browse files
committed
adjust options
1 parent 6db44e8 commit b65982b

2 files changed

Lines changed: 16 additions & 11 deletions

File tree

src/core/ObservableQuery.ts

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,6 @@ Did you mean to call refetch(variables) instead of refetch({ variables })?`,
713713
variables,
714714
context,
715715
errorPolicy,
716-
fetchPolicy,
717716
updateQuery,
718717
}: FetchMoreQueryOptions<TFetchVars, TFetchData> & {
719718
updateQuery?: (
@@ -725,13 +724,22 @@ Did you mean to call refetch(variables) instead of refetch({ variables })?`,
725724
) => Unmasked<TData>;
726725
}): Promise<QueryResult<TFetchData>> {
727726
const combinedOptions = {
728-
...compact(this.options, {
729-
query,
730-
variables,
731-
context,
732-
errorPolicy,
733-
fetchPolicy,
734-
}),
727+
...compact(
728+
this.options,
729+
{ errorPolicy: "none" },
730+
{
731+
query,
732+
context,
733+
errorPolicy,
734+
}
735+
),
736+
variables:
737+
query ? variables : (
738+
{
739+
...this.variables,
740+
...variables,
741+
}
742+
),
735743
// The fetchMore request goes immediately to the network and does
736744
// not automatically write its result to the cache (hence no-cache
737745
// instead of network-only), because we allow the caller of

src/core/watchQueryOptions.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,6 @@ export type FetchMoreQueryOptions<
148148

149149
/** {@inheritDoc @apollo/client!QueryOptionsDocumentation#context:member} */
150150
context?: DefaultContext;
151-
152-
/** {@inheritDoc @apollo/client!QueryOptionsDocumentation#fetchPolicy:member} */
153-
fetchPolicy?: FetchPolicy;
154151
} & VariablesOption<NoInfer<TVariables>>;
155152

156153
export type UpdateQueryOptions<TData, TVariables> = {

0 commit comments

Comments
 (0)