@apollo/client 4.3.0-alpha.7 → 4.3.0-alpha.8
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 +12 -0
- package/__cjs/cache/core/cache.cjs +25 -1
- package/__cjs/cache/core/cache.cjs.map +1 -1
- package/__cjs/cache/core/cache.d.cts +19 -1
- package/__cjs/cache/inmemory/entityStore.cjs +3 -3
- package/__cjs/cache/inmemory/inMemoryCache.cjs +10 -0
- package/__cjs/cache/inmemory/inMemoryCache.cjs.map +1 -1
- package/__cjs/cache/inmemory/inMemoryCache.d.cts +5 -1
- package/__cjs/cache/inmemory/key-extractor.cjs +1 -1
- package/__cjs/cache/inmemory/policies.cjs +5 -5
- package/__cjs/cache/inmemory/readFromStore.cjs +3 -3
- package/__cjs/cache/inmemory/writeToStore.cjs +4 -4
- package/__cjs/core/ApolloClient.cjs +14 -14
- package/__cjs/core/ObservableQuery.cjs +8 -8
- package/__cjs/core/QueryInfo.cjs +1 -1
- package/__cjs/core/QueryManager.cjs +23 -13
- package/__cjs/core/QueryManager.cjs.map +1 -1
- package/__cjs/core/RefetchEventManager.cjs +3 -3
- package/__cjs/incremental/handlers/graphql17Alpha9.cjs +1 -1
- package/__cjs/incremental/handlers/notImplemented.cjs +1 -1
- package/__cjs/invariantErrorCodes.cjs +122 -116
- package/__cjs/link/core/ApolloLink.cjs +3 -3
- package/__cjs/link/http/checkFetcher.cjs +1 -1
- package/__cjs/link/http/parseAndCheckHttpResponse.cjs +2 -2
- package/__cjs/link/http/parseAndCheckHttpResponse.cjs.map +1 -1
- package/__cjs/link/persisted-queries/index.cjs +2 -2
- package/__cjs/link/ws/index.cjs +1 -1
- package/__cjs/local-state/LocalState.cjs +11 -11
- package/__cjs/masking/maskDefinition.cjs +2 -2
- package/__cjs/masking/maskFragment.cjs +2 -2
- package/__cjs/masking/maskOperation.cjs +1 -1
- package/__cjs/masking/utils.cjs +3 -3
- package/__cjs/react/context/ApolloContext.cjs +1 -1
- package/__cjs/react/context/ApolloProvider.cjs +1 -1
- package/__cjs/react/hooks/internal/validateSuspenseHookOptions.cjs +2 -2
- package/__cjs/react/hooks/useApolloClient.cjs +1 -1
- package/__cjs/react/hooks/useLazyQuery.cjs +2 -2
- package/__cjs/react/hooks/useLoadableQuery.cjs +2 -2
- package/__cjs/react/hooks/useSubscription.cjs +1 -1
- package/__cjs/react/hooks/useSyncExternalStore.cjs +1 -1
- package/__cjs/react/internal/cache/QueryReference.cjs +1 -1
- package/__cjs/react/ssr/prerenderStatic.cjs +2 -2
- package/__cjs/testing/core/mocking/mockLink.cjs +4 -4
- package/__cjs/utilities/graphql/DocumentTransform.cjs +1 -1
- package/__cjs/utilities/internal/capitalize.cjs +12 -0
- package/__cjs/utilities/internal/capitalize.cjs.map +1 -0
- package/__cjs/utilities/internal/capitalize.d.cts +7 -0
- package/__cjs/utilities/internal/coerceScalarFieldsToParsed.cjs +69 -0
- package/__cjs/utilities/internal/coerceScalarFieldsToParsed.cjs.map +1 -0
- package/__cjs/utilities/internal/coerceScalarFieldsToParsed.d.cts +9 -0
- package/__cjs/utilities/internal/getFragmentDefinition.cjs +3 -3
- package/__cjs/utilities/internal/getFragmentFromSelection.cjs +1 -1
- package/__cjs/utilities/internal/getFragmentFromSelection.cjs.map +1 -1
- package/__cjs/utilities/internal/getFragmentQueryDocument.cjs +2 -2
- package/__cjs/utilities/internal/getMainDefinition.cjs +1 -1
- package/__cjs/utilities/internal/getQueryDefinition.cjs +1 -1
- package/__cjs/utilities/internal/index.cjs +6 -2
- package/__cjs/utilities/internal/index.cjs.map +1 -1
- package/__cjs/utilities/internal/index.d.cts +2 -0
- package/__cjs/utilities/internal/removeDirectivesFromDocument.cjs +1 -1
- package/__cjs/utilities/internal/shouldInclude.cjs +4 -4
- package/__cjs/utilities/internal/valueToObjectRepresentation.cjs +1 -1
- package/__cjs/version.cjs +1 -1
- package/cache/core/cache.d.ts +19 -1
- package/cache/core/cache.js +26 -2
- package/cache/core/cache.js.map +1 -1
- package/cache/inmemory/entityStore.js +3 -3
- package/cache/inmemory/inMemoryCache.d.ts +5 -1
- package/cache/inmemory/inMemoryCache.js +10 -0
- package/cache/inmemory/inMemoryCache.js.map +1 -1
- package/cache/inmemory/key-extractor.js +1 -1
- package/cache/inmemory/policies.js +5 -5
- package/cache/inmemory/readFromStore.js +3 -3
- package/cache/inmemory/writeToStore.js +4 -4
- package/core/ApolloClient.js +14 -14
- package/core/ObservableQuery.js +8 -8
- package/core/QueryInfo.js +1 -1
- package/core/QueryManager.js +24 -14
- package/core/QueryManager.js.map +1 -1
- package/core/RefetchEventManager.js +3 -3
- package/incremental/handlers/graphql17Alpha9.js +1 -1
- package/incremental/handlers/notImplemented.js +1 -1
- package/invariantErrorCodes.js +122 -116
- package/link/core/ApolloLink.js +3 -3
- package/link/http/checkFetcher.js +1 -1
- package/link/http/parseAndCheckHttpResponse.js +2 -2
- package/link/http/parseAndCheckHttpResponse.js.map +1 -1
- package/link/persisted-queries/index.js +2 -2
- package/link/ws/index.js +1 -1
- package/local-state/LocalState.js +11 -11
- package/masking/maskDefinition.js +2 -2
- package/masking/maskFragment.js +2 -2
- package/masking/maskOperation.js +1 -1
- package/masking/utils.js +3 -3
- package/package.json +1 -1
- package/react/context/ApolloContext.js +1 -1
- package/react/context/ApolloProvider.js +1 -1
- package/react/hooks/internal/validateSuspenseHookOptions.js +2 -2
- package/react/hooks/useApolloClient.js +1 -1
- package/react/hooks/useLazyQuery.js +2 -2
- package/react/hooks/useLoadableQuery.js +2 -2
- package/react/hooks/useSubscription.js +1 -1
- package/react/hooks/useSyncExternalStore.js +1 -1
- package/react/hooks-compiled/internal/validateSuspenseHookOptions.js +2 -2
- package/react/hooks-compiled/useApolloClient.js +1 -1
- package/react/hooks-compiled/useLazyQuery.js +2 -2
- package/react/hooks-compiled/useLoadableQuery.js +2 -2
- package/react/hooks-compiled/useSubscription.js +1 -1
- package/react/hooks-compiled/useSyncExternalStore.js +1 -1
- package/react/internal/cache/QueryReference.js +1 -1
- package/react/ssr/prerenderStatic.js +2 -2
- package/testing/core/mocking/mockLink.js +4 -4
- package/utilities/graphql/DocumentTransform.js +1 -1
- package/utilities/internal/capitalize.d.ts +7 -0
- package/utilities/internal/capitalize.js +9 -0
- package/utilities/internal/capitalize.js.map +1 -0
- package/utilities/internal/coerceScalarFieldsToParsed.d.ts +9 -0
- package/utilities/internal/coerceScalarFieldsToParsed.js +66 -0
- package/utilities/internal/coerceScalarFieldsToParsed.js.map +1 -0
- package/utilities/internal/getFragmentDefinition.js +3 -3
- package/utilities/internal/getFragmentFromSelection.js +1 -1
- package/utilities/internal/getFragmentFromSelection.js.map +1 -1
- package/utilities/internal/getFragmentQueryDocument.js +2 -2
- package/utilities/internal/getMainDefinition.js +1 -1
- package/utilities/internal/getQueryDefinition.js +1 -1
- package/utilities/internal/index.d.ts +2 -0
- package/utilities/internal/index.js +2 -0
- package/utilities/internal/index.js.map +1 -1
- package/utilities/internal/removeDirectivesFromDocument.js +1 -1
- package/utilities/internal/shouldInclude.js +4 -4
- package/utilities/internal/valueToObjectRepresentation.js +1 -1
- package/version.js +1 -1
|
@@ -34,7 +34,7 @@ class RefetchEventManager {
|
|
|
34
34
|
}
|
|
35
35
|
if (this.client) {
|
|
36
36
|
if (environment_1.__DEV__) {
|
|
37
|
-
__DEV__ && invariant_1.invariant.warn(
|
|
37
|
+
__DEV__ && invariant_1.invariant.warn(104);
|
|
38
38
|
}
|
|
39
39
|
this.disconnect();
|
|
40
40
|
}
|
|
@@ -103,13 +103,13 @@ class RefetchEventManager {
|
|
|
103
103
|
const [payload] = args;
|
|
104
104
|
if (!this.client) {
|
|
105
105
|
if (environment_1.__DEV__) {
|
|
106
|
-
__DEV__ && invariant_1.invariant.warn(
|
|
106
|
+
__DEV__ && invariant_1.invariant.warn(105, source);
|
|
107
107
|
}
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
110
|
if (!this.hasSource(source)) {
|
|
111
111
|
if (environment_1.__DEV__) {
|
|
112
|
-
__DEV__ && invariant_1.invariant.warn(
|
|
112
|
+
__DEV__ && invariant_1.invariant.warn(106, source);
|
|
113
113
|
}
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
@@ -70,7 +70,7 @@ class IncrementalRequest {
|
|
|
70
70
|
if (hasIncrementalChunks(chunk)) {
|
|
71
71
|
for (const incremental of chunk.incremental) {
|
|
72
72
|
const pending = this.pendingMap.get(incremental.id);
|
|
73
|
-
(0, invariant_1.invariant)(pending,
|
|
73
|
+
(0, invariant_1.invariant)(pending, 67);
|
|
74
74
|
const path = pending.path.concat(incremental.subPath ?? []);
|
|
75
75
|
let data;
|
|
76
76
|
if ("items" in incremental) {
|
|
@@ -8,7 +8,7 @@ class NotImplementedHandler {
|
|
|
8
8
|
return false;
|
|
9
9
|
}
|
|
10
10
|
prepareRequest(request) {
|
|
11
|
-
(0, invariant_1.invariant)(!(0, internal_1.hasDirectives)(["defer", "stream"], request.query),
|
|
11
|
+
(0, invariant_1.invariant)(!(0, internal_1.hasDirectives)(["defer", "stream"], request.query), 68);
|
|
12
12
|
return request;
|
|
13
13
|
}
|
|
14
14
|
extractErrors() { }
|