@apollo/client 4.2.8 → 4.2.10
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.
- package/CHANGELOG.md +20 -0
- package/README.md +3 -7
- package/__cjs/cache/inmemory/readFromStore.cjs +1 -4
- package/__cjs/cache/inmemory/readFromStore.cjs.map +1 -1
- package/__cjs/core/ApolloClient.cjs.map +1 -1
- package/__cjs/core/ApolloClient.d.cts +44 -10
- package/__cjs/core/ObservableQuery.cjs +42 -4
- package/__cjs/core/ObservableQuery.cjs.map +1 -1
- package/__cjs/core/ObservableQuery.d.cts +12 -1
- package/__cjs/core/QueryManager.cjs +12 -0
- package/__cjs/core/QueryManager.cjs.map +1 -1
- package/__cjs/core/types.d.cts +2 -0
- package/__cjs/react/hooks/useBackgroundQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useBackgroundQuery.d.cts +92 -47
- package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useLazyQuery.d.cts +26 -20
- package/__cjs/react/hooks/useLoadableQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useLoadableQuery.d.cts +23 -15
- package/__cjs/react/hooks/useMutation.cjs.map +1 -1
- package/__cjs/react/hooks/useMutation.d.cts +10 -7
- package/__cjs/react/hooks/useQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useQuery.d.cts +66 -32
- package/__cjs/react/hooks/useQueryRefHandlers.cjs.map +1 -1
- package/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useSuspenseQuery.d.cts +75 -34
- package/__cjs/react/internal/cache/QueryReference.cjs.map +1 -1
- package/__cjs/react/internal/types.d.cts +14 -3
- package/__cjs/react/query-preloader/createQueryPreloader.cjs.map +1 -1
- package/__cjs/react/query-preloader/createQueryPreloader.d.cts +20 -5
- package/__cjs/version.cjs +1 -1
- package/__cjs/version.cjs.map +1 -1
- package/cache/inmemory/readFromStore.js +2 -5
- package/cache/inmemory/readFromStore.js.map +1 -1
- package/core/ApolloClient.d.ts +44 -10
- package/core/ApolloClient.js.map +1 -1
- package/core/ObservableQuery.d.ts +12 -1
- package/core/ObservableQuery.js +42 -4
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryManager.js +12 -0
- package/core/QueryManager.js.map +1 -1
- package/core/types.d.ts +2 -0
- package/core/types.js.map +1 -1
- package/package.json +1 -1
- package/react/hooks/useBackgroundQuery.d.ts +92 -47
- package/react/hooks/useBackgroundQuery.js.map +1 -1
- package/react/hooks/useLazyQuery.d.ts +26 -20
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/react/hooks/useLoadableQuery.d.ts +23 -15
- package/react/hooks/useLoadableQuery.js.map +1 -1
- package/react/hooks/useMutation.d.ts +10 -7
- package/react/hooks/useMutation.js.map +1 -1
- package/react/hooks/useQuery.d.ts +66 -32
- package/react/hooks/useQuery.js.map +1 -1
- package/react/hooks/useQueryRefHandlers.js.map +1 -1
- package/react/hooks/useSuspenseQuery.d.ts +75 -34
- package/react/hooks/useSuspenseQuery.js.map +1 -1
- package/react/hooks-compiled/useBackgroundQuery.d.ts +92 -47
- package/react/hooks-compiled/useBackgroundQuery.js.map +1 -1
- package/react/hooks-compiled/useLazyQuery.d.ts +26 -20
- package/react/hooks-compiled/useLazyQuery.js.map +1 -1
- package/react/hooks-compiled/useLoadableQuery.d.ts +23 -15
- package/react/hooks-compiled/useLoadableQuery.js.map +1 -1
- package/react/hooks-compiled/useMutation.d.ts +10 -7
- package/react/hooks-compiled/useMutation.js.map +1 -1
- package/react/hooks-compiled/useQuery.d.ts +66 -32
- package/react/hooks-compiled/useQuery.js.map +1 -1
- package/react/hooks-compiled/useQueryRefHandlers.js.map +1 -1
- package/react/hooks-compiled/useSuspenseQuery.d.ts +75 -34
- package/react/hooks-compiled/useSuspenseQuery.js.map +1 -1
- package/react/internal/cache/QueryReference.js.map +1 -1
- package/react/internal/types.d.ts +15 -4
- package/react/internal/types.js.map +1 -1
- package/react/query-preloader/createQueryPreloader.d.ts +20 -5
- package/react/query-preloader/createQueryPreloader.js.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
package/core/QueryManager.js
CHANGED
|
@@ -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) {
|