@apollo/client 4.3.0-alpha.9 → 4.3.0-rc.1
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 +170 -0
- package/__cjs/cache/core/Scalar.cjs.map +1 -1
- package/__cjs/cache/core/Scalar.d.cts +0 -1
- package/__cjs/cache/core/cache.cjs +3 -3
- package/__cjs/cache/core/cache.cjs.map +1 -1
- package/__cjs/cache/core/cache.d.cts +53 -8
- package/__cjs/cache/index.cjs.map +1 -1
- package/__cjs/cache/index.d.cts +1 -1
- package/__cjs/cache/inmemory/entityStore.cjs +25 -10
- package/__cjs/cache/inmemory/entityStore.cjs.map +1 -1
- package/__cjs/cache/inmemory/helpers.cjs +12 -0
- package/__cjs/cache/inmemory/helpers.cjs.map +1 -1
- package/__cjs/cache/inmemory/helpers.d.cts +2 -1
- package/__cjs/cache/inmemory/inMemoryCache.cjs +34 -22
- package/__cjs/cache/inmemory/inMemoryCache.cjs.map +1 -1
- package/__cjs/cache/inmemory/inMemoryCache.d.cts +4 -4
- package/__cjs/cache/inmemory/key-extractor.cjs +1 -1
- package/__cjs/cache/inmemory/policies.cjs +7 -8
- package/__cjs/cache/inmemory/policies.cjs.map +1 -1
- package/__cjs/cache/inmemory/policies.d.cts +3 -4
- package/__cjs/cache/inmemory/readFromStore.cjs +3 -3
- package/__cjs/cache/inmemory/types.d.cts +3 -1
- 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 +12 -12
- package/__cjs/core/RefetchEventManager.cjs +3 -3
- package/__cjs/core/index.cjs.map +1 -1
- package/__cjs/core/index.d.cts +3 -2
- package/__cjs/core/types.d.cts +9 -4
- package/__cjs/incremental/handlers/graphql17Alpha9.cjs +1 -1
- package/__cjs/incremental/handlers/notImplemented.cjs +1 -1
- package/__cjs/invariantErrorCodes.cjs +131 -116
- package/__cjs/link/core/ApolloLink.cjs +3 -3
- package/__cjs/link/http/checkFetcher.cjs +1 -1
- package/__cjs/link/http/parseAndCheckHttpResponse.cjs +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/local-state/LocalState.cjs.map +1 -1
- package/__cjs/local-state/LocalState.d.cts +1 -1
- 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/useBackgroundQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useBackgroundQuery.d.cts +1 -1
- package/__cjs/react/hooks/useFragment.cjs.map +1 -1
- package/__cjs/react/hooks/useFragment.d.cts +0 -1
- package/__cjs/react/hooks/useLazyQuery.cjs +2 -2
- package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useLazyQuery.d.cts +1 -1
- package/__cjs/react/hooks/useLoadableQuery.cjs +2 -2
- package/__cjs/react/hooks/useMutation.cjs.map +1 -1
- package/__cjs/react/hooks/useMutation.d.cts +1 -1
- package/__cjs/react/hooks/useQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useQuery.d.cts +1 -1
- package/__cjs/react/hooks/useSubscription.cjs +7 -3
- package/__cjs/react/hooks/useSubscription.cjs.map +1 -1
- package/__cjs/react/hooks/useSubscription.d.cts +7 -4
- package/__cjs/react/hooks/useSuspenseFragment.cjs.map +1 -1
- package/__cjs/react/hooks/useSuspenseFragment.d.cts +1 -1
- package/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useSuspenseQuery.d.cts +1 -1
- package/__cjs/react/hooks/useSyncExternalStore.cjs +1 -1
- package/__cjs/react/internal/cache/QueryReference.cjs +1 -1
- package/__cjs/react/query-preloader/createQueryPreloader.cjs.map +1 -1
- package/__cjs/react/query-preloader/createQueryPreloader.d.cts +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/coerceScalarFieldsToParsed.cjs +45 -12
- package/__cjs/utilities/internal/coerceScalarFieldsToParsed.cjs.map +1 -1
- package/__cjs/utilities/internal/getFragmentDefinition.cjs +3 -3
- package/__cjs/utilities/internal/getFragmentDefinition.cjs.map +1 -1
- package/__cjs/utilities/internal/getFragmentFromSelection.cjs +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 -4
- package/__cjs/utilities/internal/index.cjs.map +1 -1
- package/__cjs/utilities/internal/index.d.cts +2 -2
- package/__cjs/utilities/internal/matchScalarList.cjs +12 -0
- package/__cjs/utilities/internal/matchScalarList.cjs.map +1 -0
- package/__cjs/utilities/internal/matchScalarList.d.cts +8 -0
- package/__cjs/utilities/internal/removeDirectivesFromDocument.cjs +1 -1
- package/__cjs/utilities/internal/shouldInclude.cjs +4 -4
- package/__cjs/utilities/internal/unwrapScalarType.cjs +12 -0
- package/__cjs/utilities/internal/unwrapScalarType.cjs.map +1 -0
- package/__cjs/utilities/internal/unwrapScalarType.d.cts +10 -0
- package/__cjs/utilities/internal/valueToObjectRepresentation.cjs +1 -1
- package/__cjs/version.cjs +1 -1
- package/__cjs/version.cjs.map +1 -1
- package/cache/core/Scalar.d.ts +0 -1
- package/cache/core/Scalar.js.map +1 -1
- package/cache/core/cache.d.ts +53 -8
- package/cache/core/cache.js +3 -3
- package/cache/core/cache.js.map +1 -1
- package/cache/index.d.ts +1 -1
- package/cache/index.js.map +1 -1
- package/cache/inmemory/entityStore.js +26 -11
- package/cache/inmemory/entityStore.js.map +1 -1
- package/cache/inmemory/helpers.d.ts +2 -1
- package/cache/inmemory/helpers.js +11 -0
- package/cache/inmemory/helpers.js.map +1 -1
- package/cache/inmemory/inMemoryCache.d.ts +4 -4
- package/cache/inmemory/inMemoryCache.js +36 -24
- package/cache/inmemory/inMemoryCache.js.map +1 -1
- package/cache/inmemory/key-extractor.js +1 -1
- package/cache/inmemory/policies.d.ts +3 -4
- package/cache/inmemory/policies.js +7 -8
- package/cache/inmemory/policies.js.map +1 -1
- package/cache/inmemory/readFromStore.js +3 -3
- package/cache/inmemory/types.d.ts +3 -1
- package/cache/inmemory/types.js.map +1 -1
- 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 +12 -12
- package/core/RefetchEventManager.js +3 -3
- package/core/index.d.ts +3 -2
- package/core/index.js.map +1 -1
- package/core/types.d.ts +9 -4
- package/core/types.js.map +1 -1
- package/incremental/handlers/graphql17Alpha9.js +1 -1
- package/incremental/handlers/notImplemented.js +1 -1
- package/invariantErrorCodes.js +131 -116
- package/link/core/ApolloLink.js +3 -3
- package/link/http/checkFetcher.js +1 -1
- package/link/http/parseAndCheckHttpResponse.js +1 -1
- package/link/persisted-queries/index.js +2 -2
- package/link/ws/index.js +1 -1
- package/local-state/LocalState.d.ts +1 -1
- package/local-state/LocalState.js +11 -11
- package/local-state/LocalState.js.map +1 -1
- 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/useBackgroundQuery.d.ts +1 -1
- package/react/hooks/useBackgroundQuery.js.map +1 -1
- package/react/hooks/useFragment.d.ts +0 -1
- package/react/hooks/useFragment.js.map +1 -1
- package/react/hooks/useLazyQuery.d.ts +1 -1
- package/react/hooks/useLazyQuery.js +2 -2
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/react/hooks/useLoadableQuery.js +2 -2
- package/react/hooks/useMutation.d.ts +1 -1
- package/react/hooks/useMutation.js.map +1 -1
- package/react/hooks/useQuery.d.ts +1 -1
- package/react/hooks/useQuery.js.map +1 -1
- package/react/hooks/useSubscription.d.ts +7 -4
- package/react/hooks/useSubscription.js +7 -3
- package/react/hooks/useSubscription.js.map +1 -1
- package/react/hooks/useSuspenseFragment.d.ts +1 -1
- package/react/hooks/useSuspenseFragment.js.map +1 -1
- package/react/hooks/useSuspenseQuery.d.ts +1 -1
- package/react/hooks/useSuspenseQuery.js.map +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/useBackgroundQuery.d.ts +1 -1
- package/react/hooks-compiled/useBackgroundQuery.js.map +1 -1
- package/react/hooks-compiled/useFragment.d.ts +0 -1
- package/react/hooks-compiled/useFragment.js.map +1 -1
- package/react/hooks-compiled/useLazyQuery.d.ts +1 -1
- package/react/hooks-compiled/useLazyQuery.js +2 -2
- package/react/hooks-compiled/useLazyQuery.js.map +1 -1
- package/react/hooks-compiled/useLoadableQuery.js +2 -2
- package/react/hooks-compiled/useMutation.d.ts +1 -1
- package/react/hooks-compiled/useMutation.js.map +1 -1
- package/react/hooks-compiled/useQuery.d.ts +1 -1
- package/react/hooks-compiled/useQuery.js.map +1 -1
- package/react/hooks-compiled/useSubscription.d.ts +7 -4
- package/react/hooks-compiled/useSubscription.js +107 -93
- package/react/hooks-compiled/useSubscription.js.map +1 -1
- package/react/hooks-compiled/useSuspenseFragment.d.ts +1 -1
- package/react/hooks-compiled/useSuspenseFragment.js.map +1 -1
- package/react/hooks-compiled/useSuspenseQuery.d.ts +1 -1
- package/react/hooks-compiled/useSuspenseQuery.js.map +1 -1
- package/react/hooks-compiled/useSyncExternalStore.js +1 -1
- package/react/internal/cache/QueryReference.js +1 -1
- package/react/query-preloader/createQueryPreloader.d.ts +1 -1
- package/react/query-preloader/createQueryPreloader.js.map +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/coerceScalarFieldsToParsed.js +40 -11
- package/utilities/internal/coerceScalarFieldsToParsed.js.map +1 -1
- package/utilities/internal/getFragmentDefinition.js +3 -3
- package/utilities/internal/getFragmentDefinition.js.map +1 -1
- package/utilities/internal/getFragmentFromSelection.js +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 -2
- package/utilities/internal/index.js +2 -1
- package/utilities/internal/index.js.map +1 -1
- package/utilities/internal/matchScalarList.d.ts +8 -0
- package/utilities/internal/matchScalarList.js +9 -0
- package/utilities/internal/matchScalarList.js.map +1 -0
- package/utilities/internal/removeDirectivesFromDocument.js +1 -1
- package/utilities/internal/shouldInclude.js +4 -4
- package/utilities/internal/unwrapScalarType.d.ts +10 -0
- package/utilities/internal/unwrapScalarType.js +9 -0
- package/utilities/internal/unwrapScalarType.js.map +1 -0
- package/utilities/internal/valueToObjectRepresentation.js +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/__cjs/utilities/internal/getUnwrappedType.cjs +0 -20
- package/__cjs/utilities/internal/getUnwrappedType.cjs.map +0 -1
- package/__cjs/utilities/internal/getUnwrappedType.d.cts +0 -8
- package/__cjs/utilities/internal/types/NoInfer.cjs +0 -3
- package/__cjs/utilities/internal/types/NoInfer.cjs.map +0 -1
- package/__cjs/utilities/internal/types/NoInfer.d.cts +0 -35
- package/utilities/internal/getUnwrappedType.d.ts +0 -8
- package/utilities/internal/getUnwrappedType.js +0 -17
- package/utilities/internal/getUnwrappedType.js.map +0 -1
- package/utilities/internal/types/NoInfer.d.ts +0 -35
- package/utilities/internal/types/NoInfer.js +0 -2
- package/utilities/internal/types/NoInfer.js.map +0 -1
package/link/core/ApolloLink.js
CHANGED
|
@@ -100,7 +100,7 @@ export class ApolloLink {
|
|
|
100
100
|
const result = test(operation);
|
|
101
101
|
if (__DEV__) {
|
|
102
102
|
if (typeof result !== "boolean") {
|
|
103
|
-
__DEV__ && invariant.warn(
|
|
103
|
+
__DEV__ && invariant.warn(65, result);
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
return result ?
|
|
@@ -142,7 +142,7 @@ export class ApolloLink {
|
|
|
142
142
|
static execute(link, request, context) {
|
|
143
143
|
return link.request(createOperation(request, context), () => {
|
|
144
144
|
if (__DEV__) {
|
|
145
|
-
__DEV__ && invariant.warn(
|
|
145
|
+
__DEV__ && invariant.warn(66);
|
|
146
146
|
}
|
|
147
147
|
return EMPTY;
|
|
148
148
|
});
|
|
@@ -246,7 +246,7 @@ export class ApolloLink {
|
|
|
246
246
|
* > request instead.
|
|
247
247
|
*/
|
|
248
248
|
request(operation, forward) {
|
|
249
|
-
throw newInvariantError(
|
|
249
|
+
throw newInvariantError(67);
|
|
250
250
|
}
|
|
251
251
|
/**
|
|
252
252
|
* @internal
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { invariant } from "@apollo/client/utilities/invariant";
|
|
2
2
|
export const checkFetcher = (fetcher) => {
|
|
3
|
-
invariant(fetcher || typeof fetch !== "undefined",
|
|
3
|
+
invariant(fetcher || typeof fetch !== "undefined", 63);
|
|
4
4
|
};
|
|
5
5
|
//# sourceMappingURL=checkFetcher.js.map
|
|
@@ -33,7 +33,7 @@ async function* consumeMultipartBody(response) {
|
|
|
33
33
|
/;\s*boundary=(?:'([^']+)'|"([^"]+)"|([^"'].+?))\s*(?:;|$)/i);
|
|
34
34
|
const boundary = "\r\n--" + (match ? match[1] ?? match[2] ?? match[3] ?? "-" : "-");
|
|
35
35
|
let buffer = "";
|
|
36
|
-
invariant(response.body && typeof response.body.getReader === "function",
|
|
36
|
+
invariant(response.body && typeof response.body.getReader === "function", 64);
|
|
37
37
|
const stream = response.body;
|
|
38
38
|
const reader = stream.getReader();
|
|
39
39
|
let done = false;
|
|
@@ -66,7 +66,7 @@ export class PersistedQueryLink extends ApolloLink {
|
|
|
66
66
|
// hashing with something other than SHA-256.
|
|
67
67
|
invariant(options &&
|
|
68
68
|
(typeof options.sha256 === "function" ||
|
|
69
|
-
typeof options.generateHash === "function"),
|
|
69
|
+
typeof options.generateHash === "function"), 61);
|
|
70
70
|
const { sha256,
|
|
71
71
|
// If both a `sha256` and `generateHash` option are provided, the
|
|
72
72
|
// `sha256` option will be ignored. Developers can configure and
|
|
@@ -92,7 +92,7 @@ export class PersistedQueryLink extends ApolloLink {
|
|
|
92
92
|
return hash;
|
|
93
93
|
}
|
|
94
94
|
super((operation, forward) => {
|
|
95
|
-
invariant(forward,
|
|
95
|
+
invariant(forward, 62);
|
|
96
96
|
const { query } = operation;
|
|
97
97
|
return new Observable((observer) => {
|
|
98
98
|
let subscription;
|
package/link/ws/index.js
CHANGED
|
@@ -33,7 +33,7 @@ export class WebSocketLink extends ApolloLink {
|
|
|
33
33
|
constructor(paramsOrClient) {
|
|
34
34
|
super();
|
|
35
35
|
if (__DEV__) {
|
|
36
|
-
__DEV__ && invariant.warn(
|
|
36
|
+
__DEV__ && invariant.warn(60);
|
|
37
37
|
}
|
|
38
38
|
if (paramsOrClient instanceof SubscriptionClient) {
|
|
39
39
|
this.subscriptionClient = paramsOrClient;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DocumentNode, FieldNode, FormattedExecutionResult } from "graphql";
|
|
2
2
|
import type { ApolloClient, DefaultContext, OperationVariables, TypedDocumentNode, WatchQueryFetchPolicy } from "@apollo/client";
|
|
3
|
-
import type { FragmentMap,
|
|
3
|
+
import type { FragmentMap, RemoveIndexSignature } from "@apollo/client/utilities/internal";
|
|
4
4
|
type InferContextValueFromResolvers<TResolvers> = TResolvers extends {
|
|
5
5
|
[typename: string]: infer TFieldResolvers;
|
|
6
6
|
} ? TFieldResolvers extends ({
|
|
@@ -66,7 +66,7 @@ export class LocalState {
|
|
|
66
66
|
}
|
|
67
67
|
async execute({ document, client, context, remoteResult, variables = {}, onlyRunForcedResolvers = false, returnPartialData = false, fetchPolicy, }) {
|
|
68
68
|
if (__DEV__) {
|
|
69
|
-
invariant(hasDirectives(["client"], document),
|
|
69
|
+
invariant(hasDirectives(["client"], document), 49);
|
|
70
70
|
validateCacheImplementation(client.cache);
|
|
71
71
|
}
|
|
72
72
|
// note: if `remoteResult` is `undefined`, we will execute resolvers since
|
|
@@ -122,7 +122,7 @@ export class LocalState {
|
|
|
122
122
|
}
|
|
123
123
|
async getExportedVariables({ document, client, context, variables, }) {
|
|
124
124
|
if (__DEV__) {
|
|
125
|
-
invariant(hasDirectives(["client"], document),
|
|
125
|
+
invariant(hasDirectives(["client"], document), 50);
|
|
126
126
|
validateCacheImplementation(client.cache);
|
|
127
127
|
}
|
|
128
128
|
const { exportsToResolve, exportedVariableDefs, fragmentMap, operationDefinition, } = this.collectQueryDetail(document);
|
|
@@ -204,7 +204,7 @@ export class LocalState {
|
|
|
204
204
|
}
|
|
205
205
|
if (selection.kind === Kind.FRAGMENT_SPREAD) {
|
|
206
206
|
const fragment = fragmentMap[selection.name.value];
|
|
207
|
-
invariant(fragment,
|
|
207
|
+
invariant(fragment, 51, selection.name.value);
|
|
208
208
|
const typename = rootValue?.__typename;
|
|
209
209
|
const typeCondition = fragment.typeCondition.name.value;
|
|
210
210
|
const matches = typename === typeCondition ||
|
|
@@ -269,7 +269,7 @@ export class LocalState {
|
|
|
269
269
|
}
|
|
270
270
|
if (client.cache.resolvesClientField?.(typename, fieldName)) {
|
|
271
271
|
if (fetchPolicy === "no-cache") {
|
|
272
|
-
__DEV__ && invariant.warn(
|
|
272
|
+
__DEV__ && invariant.warn(52, resolverName);
|
|
273
273
|
return null;
|
|
274
274
|
}
|
|
275
275
|
// assume the cache will handle returning the correct value
|
|
@@ -277,7 +277,7 @@ export class LocalState {
|
|
|
277
277
|
return;
|
|
278
278
|
}
|
|
279
279
|
if (!returnPartialData) {
|
|
280
|
-
__DEV__ && invariant.warn(
|
|
280
|
+
__DEV__ && invariant.warn(53, resolverName);
|
|
281
281
|
return null;
|
|
282
282
|
}
|
|
283
283
|
});
|
|
@@ -343,13 +343,13 @@ export class LocalState {
|
|
|
343
343
|
if (result === undefined && !returnPartialData) {
|
|
344
344
|
if (__DEV__ && phase === "resolve") {
|
|
345
345
|
if (resolver && !onlyRunForcedResolvers) {
|
|
346
|
-
__DEV__ && invariant.warn(
|
|
346
|
+
__DEV__ && invariant.warn(54, resolverName);
|
|
347
347
|
}
|
|
348
348
|
else if (onlyRunForcedResolvers) {
|
|
349
|
-
__DEV__ && invariant.warn(
|
|
349
|
+
__DEV__ && invariant.warn(55, resolverName);
|
|
350
350
|
}
|
|
351
351
|
else {
|
|
352
|
-
__DEV__ && invariant.warn(
|
|
352
|
+
__DEV__ && invariant.warn(56, fieldName, rootValue);
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
355
|
result = null;
|
|
@@ -361,7 +361,7 @@ export class LocalState {
|
|
|
361
361
|
return this.resolveSubSelectedArray(field, true, result, execContext, path);
|
|
362
362
|
}
|
|
363
363
|
if (phase === "resolve" && !result.__typename) {
|
|
364
|
-
this.addError(newInvariantError(
|
|
364
|
+
this.addError(newInvariantError(57, result, resolverName), path, execContext, { resolver: resolverName });
|
|
365
365
|
return null;
|
|
366
366
|
}
|
|
367
367
|
return this.resolveSelectionSet(field.selectionSet, true, result, execContext, path);
|
|
@@ -472,7 +472,7 @@ export class LocalState {
|
|
|
472
472
|
},
|
|
473
473
|
FragmentSpread(spread, _, __, ___, ancestors) {
|
|
474
474
|
const fragment = fragmentMap[spread.name.value];
|
|
475
|
-
invariant(fragment,
|
|
475
|
+
invariant(fragment, 58, spread.name.value);
|
|
476
476
|
const { selectionsToResolve: fragmentSelections } = traverse(fragment);
|
|
477
477
|
if (fragmentSelections.size > 0) {
|
|
478
478
|
// Fragment for this spread contains @client directive (either directly or transitively)
|
|
@@ -531,7 +531,7 @@ function getExportedVariableName(directive) {
|
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
function validateCacheImplementation(cache) {
|
|
534
|
-
invariant(cache.fragmentMatches,
|
|
534
|
+
invariant(cache.fragmentMatches, 59);
|
|
535
535
|
}
|
|
536
536
|
function getCacheResultAtPath(diff, path) {
|
|
537
537
|
if (diff.result === null) {
|