@apollo/client 4.2.7 → 4.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -982,6 +982,10 @@ export class QueryManager {
982
982
  return of({
983
983
  kind: "N",
984
984
  value: toResult(data),
985
+ // Always attach the variables used for this fetch so @export
986
+ // resolution can update ObservableQuery.options.variables and
987
+ // resubscribe the cache watch under the correct variable set.
988
+ resolvedVariables: variables,
985
989
  source: "cache",
986
990
  });
987
991
  };
@@ -1007,6 +1011,10 @@ export class QueryManager {
1007
1011
  }).then((resolved) => ({
1008
1012
  kind: "N",
1009
1013
  value: toResult(resolved.data || void 0),
1014
+ // Always attach the variables used for this fetch so @export
1015
+ // resolution can update ObservableQuery.options.variables and
1016
+ // resubscribe the cache watch under the correct variable set.
1017
+ resolvedVariables: variables,
1010
1018
  source: "cache",
1011
1019
  })));
1012
1020
  }
@@ -1034,6 +1042,10 @@ export class QueryManager {
1034
1042
  exposeExtensions,
1035
1043
  }).pipe(validateDidEmitValue(), materialize(), map((result) => ({
1036
1044
  ...result,
1045
+ // Always attach the variables used for this fetch so @export
1046
+ // resolution can update ObservableQuery.options.variables and
1047
+ // resubscribe the cache watch under the correct variable set.
1048
+ resolvedVariables: variables,
1037
1049
  source: "network",
1038
1050
  })));
1039
1051
  switch (fetchPolicy) {