@apollo/client 4.0.11 → 4.0.12-beta.0
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 +204 -0
- package/__cjs/cache/core/cache.cjs +216 -52
- package/__cjs/cache/core/cache.cjs.map +1 -1
- package/__cjs/cache/core/cache.d.cts +141 -25
- package/__cjs/cache/core/types/Cache.d.cts +77 -17
- package/__cjs/cache/index.cjs.map +1 -1
- package/__cjs/cache/index.d.cts +1 -1
- package/__cjs/cache/inmemory/entityStore.cjs +6 -4
- package/__cjs/cache/inmemory/entityStore.cjs.map +1 -1
- package/__cjs/cache/inmemory/helpers.d.cts +1 -1
- package/__cjs/cache/inmemory/inMemoryCache.cjs +62 -1
- package/__cjs/cache/inmemory/inMemoryCache.cjs.map +1 -1
- package/__cjs/cache/inmemory/inMemoryCache.d.cts +48 -0
- package/__cjs/cache/inmemory/key-extractor.cjs +1 -1
- package/__cjs/cache/inmemory/key-extractor.cjs.map +1 -1
- package/__cjs/cache/inmemory/policies.cjs +56 -17
- package/__cjs/cache/inmemory/policies.cjs.map +1 -1
- package/__cjs/cache/inmemory/policies.d.cts +30 -6
- package/__cjs/cache/inmemory/readFromStore.cjs +3 -3
- package/__cjs/cache/inmemory/readFromStore.cjs.map +1 -1
- package/__cjs/cache/inmemory/types.d.cts +2 -0
- package/__cjs/cache/inmemory/writeToStore.cjs +24 -10
- package/__cjs/cache/inmemory/writeToStore.cjs.map +1 -1
- package/__cjs/cache/inmemory/writeToStore.d.cts +2 -1
- package/__cjs/core/ApolloClient.cjs +31 -49
- package/__cjs/core/ApolloClient.cjs.map +1 -1
- package/__cjs/core/ApolloClient.d.cts +143 -17
- package/__cjs/core/ObservableQuery.cjs +162 -128
- package/__cjs/core/ObservableQuery.cjs.map +1 -1
- package/__cjs/core/ObservableQuery.d.cts +1 -0
- package/__cjs/core/QueryInfo.cjs +9 -1
- package/__cjs/core/QueryInfo.cjs.map +1 -1
- package/__cjs/core/QueryInfo.d.cts +2 -1
- package/__cjs/core/QueryManager.cjs +46 -24
- package/__cjs/core/QueryManager.cjs.map +1 -1
- package/__cjs/core/QueryManager.d.cts +18 -2
- package/__cjs/incremental/handlers/defer20220824.cjs +44 -19
- package/__cjs/incremental/handlers/defer20220824.cjs.map +1 -1
- package/__cjs/incremental/handlers/defer20220824.d.cts +15 -7
- package/__cjs/incremental/handlers/graphql17Alpha9.cjs +222 -0
- package/__cjs/incremental/handlers/graphql17Alpha9.cjs.map +1 -0
- package/__cjs/incremental/handlers/graphql17Alpha9.d.cts +98 -0
- package/__cjs/incremental/handlers/notImplemented.cjs +1 -1
- package/__cjs/incremental/handlers/notImplemented.cjs.map +1 -1
- package/__cjs/incremental/index.cjs +3 -1
- package/__cjs/incremental/index.cjs.map +1 -1
- package/__cjs/incremental/index.d.cts +1 -0
- package/__cjs/incremental/types.d.cts +9 -0
- package/__cjs/invariantErrorCodes.cjs +78 -62
- package/__cjs/link/client-awareness/ClientAwarenessLink.cjs +13 -1
- package/__cjs/link/client-awareness/ClientAwarenessLink.cjs.map +1 -1
- package/__cjs/link/client-awareness/ClientAwarenessLink.d.cts +1 -1
- package/__cjs/link/core/ApolloLink.cjs +3 -3
- package/__cjs/link/error/index.cjs +1 -1
- package/__cjs/link/error/index.cjs.map +1 -1
- package/__cjs/link/error/index.d.cts +1 -1
- 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 +28 -14
- package/__cjs/local-state/LocalState.cjs.map +1 -1
- package/__cjs/local-state/LocalState.d.cts +3 -2
- package/__cjs/masking/types.d.cts +2 -1
- package/__cjs/react/hooks/internal/useDeepMemo.cjs +2 -0
- package/__cjs/react/hooks/internal/useDeepMemo.cjs.map +1 -1
- package/__cjs/react/hooks/useBackgroundQuery.cjs +1 -3
- package/__cjs/react/hooks/useBackgroundQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useFragment.cjs +38 -87
- package/__cjs/react/hooks/useFragment.cjs.map +1 -1
- package/__cjs/react/hooks/useFragment.d.cts +65 -6
- package/__cjs/react/hooks/useLazyQuery.cjs +2 -0
- package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useMutation.cjs +7 -1
- package/__cjs/react/hooks/useMutation.cjs.map +1 -1
- package/__cjs/react/hooks/useMutation.d.cts +13 -1
- package/__cjs/react/hooks/useQuery.cjs +1 -4
- package/__cjs/react/hooks/useQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useQuery.d.cts +1 -1
- package/__cjs/react/hooks/useQueryRefHandlers.cjs +1 -3
- package/__cjs/react/hooks/useQueryRefHandlers.cjs.map +1 -1
- package/__cjs/react/hooks/useReadQuery.cjs +1 -3
- package/__cjs/react/hooks/useReadQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useSubscription.cjs +1 -1
- package/__cjs/react/hooks/useSubscription.cjs.map +1 -1
- package/__cjs/react/hooks/useSuspenseFragment.cjs +16 -16
- package/__cjs/react/hooks/useSuspenseFragment.cjs.map +1 -1
- package/__cjs/react/hooks/useSuspenseFragment.d.cts +33 -7
- package/__cjs/react/hooks/useSuspenseQuery.cjs +4 -4
- package/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
- package/__cjs/react/internal/cache/FragmentReference.cjs +3 -22
- package/__cjs/react/internal/cache/FragmentReference.cjs.map +1 -1
- package/__cjs/react/internal/cache/FragmentReference.d.cts +2 -4
- package/__cjs/react/internal/cache/QueryReference.cjs +16 -0
- package/__cjs/react/internal/cache/QueryReference.cjs.map +1 -1
- package/__cjs/react/internal/cache/QueryReference.d.cts +5 -0
- package/__cjs/react/internal/cache/SuspenseCache.cjs.map +1 -1
- package/__cjs/react/internal/cache/SuspenseCache.d.cts +1 -1
- package/__cjs/react/internal/cache/types.d.cts +2 -2
- package/__cjs/react/query-preloader/createQueryPreloader.cjs +41 -1
- package/__cjs/react/query-preloader/createQueryPreloader.cjs.map +1 -1
- package/__cjs/react/ssr/useSSRQuery.cjs +1 -0
- package/__cjs/react/ssr/useSSRQuery.cjs.map +1 -1
- package/__cjs/utilities/DeepPartial.cjs.map +1 -1
- package/__cjs/utilities/DeepPartial.d.cts +1 -1
- package/__cjs/utilities/internal/DeepMerger.cjs +36 -4
- package/__cjs/utilities/internal/DeepMerger.cjs.map +1 -1
- package/__cjs/utilities/internal/DeepMerger.d.cts +20 -4
- package/__cjs/utilities/internal/combineLatestBatched.cjs +71 -0
- package/__cjs/utilities/internal/combineLatestBatched.cjs.map +1 -0
- package/__cjs/utilities/internal/combineLatestBatched.d.cts +14 -0
- package/__cjs/utilities/internal/constants.cjs +17 -1
- package/__cjs/utilities/internal/constants.cjs.map +1 -1
- package/__cjs/utilities/internal/constants.d.cts +16 -0
- package/__cjs/utilities/internal/getStoreKeyName.cjs +1 -0
- package/__cjs/utilities/internal/getStoreKeyName.cjs.map +1 -1
- package/__cjs/utilities/internal/index.cjs +8 -2
- package/__cjs/utilities/internal/index.cjs.map +1 -1
- package/__cjs/utilities/internal/index.d.cts +4 -1
- package/__cjs/utilities/internal/mapObservableFragment.cjs +27 -0
- package/__cjs/utilities/internal/mapObservableFragment.cjs.map +1 -0
- package/__cjs/utilities/internal/mapObservableFragment.d.cts +3 -0
- package/__cjs/utilities/internal/memoize.cjs +2 -2
- package/__cjs/utilities/internal/memoize.cjs.map +1 -1
- package/__cjs/utilities/internal/memoize.d.cts +2 -1
- package/__cjs/utilities/internal/ponyfills/FinalizationRegistry.cjs +61 -0
- package/__cjs/utilities/internal/ponyfills/FinalizationRegistry.cjs.map +1 -0
- package/__cjs/utilities/internal/ponyfills/FinalizationRegistry.d.cts +11 -0
- package/__cjs/utilities/internal/ponyfills/index.cjs +6 -0
- package/__cjs/utilities/internal/ponyfills/index.cjs.map +1 -0
- package/__cjs/utilities/internal/ponyfills/index.d.cts +3 -0
- package/__cjs/utilities/internal/ponyfills/index.react-native.cjs +6 -0
- package/__cjs/utilities/internal/ponyfills/index.react-native.cjs.map +1 -0
- package/__cjs/utilities/internal/ponyfills/index.react-native.d.cts +2 -0
- package/__cjs/utilities/internal/types/ExtensionsWithStreamDetails.cjs +3 -0
- package/__cjs/utilities/internal/types/ExtensionsWithStreamDetails.cjs.map +1 -0
- package/__cjs/utilities/internal/types/ExtensionsWithStreamDetails.d.cts +24 -0
- package/__cjs/version.cjs +1 -1
- package/__cjs/version.cjs.map +1 -1
- package/cache/core/cache.d.ts +141 -25
- package/cache/core/cache.js +219 -55
- package/cache/core/cache.js.map +1 -1
- package/cache/core/types/Cache.d.ts +77 -17
- package/cache/core/types/Cache.js.map +1 -1
- package/cache/index.d.ts +1 -1
- package/cache/index.js.map +1 -1
- package/cache/inmemory/entityStore.js +6 -4
- package/cache/inmemory/entityStore.js.map +1 -1
- package/cache/inmemory/helpers.d.ts +1 -1
- package/cache/inmemory/inMemoryCache.d.ts +48 -0
- package/cache/inmemory/inMemoryCache.js +62 -1
- package/cache/inmemory/inMemoryCache.js.map +1 -1
- package/cache/inmemory/key-extractor.js +1 -1
- package/cache/inmemory/key-extractor.js.map +1 -1
- package/cache/inmemory/policies.d.ts +30 -6
- package/cache/inmemory/policies.js +45 -7
- package/cache/inmemory/policies.js.map +1 -1
- package/cache/inmemory/readFromStore.js +3 -3
- package/cache/inmemory/readFromStore.js.map +1 -1
- package/cache/inmemory/types.d.ts +2 -0
- package/cache/inmemory/types.js.map +1 -1
- package/cache/inmemory/writeToStore.d.ts +2 -1
- package/cache/inmemory/writeToStore.js +26 -12
- package/cache/inmemory/writeToStore.js.map +1 -1
- package/core/ApolloClient.d.ts +143 -17
- package/core/ApolloClient.js +32 -50
- package/core/ApolloClient.js.map +1 -1
- package/core/ObservableQuery.d.ts +1 -0
- package/core/ObservableQuery.js +165 -131
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryInfo.d.ts +2 -1
- package/core/QueryInfo.js +10 -2
- package/core/QueryInfo.js.map +1 -1
- package/core/QueryManager.d.ts +18 -2
- package/core/QueryManager.js +47 -25
- package/core/QueryManager.js.map +1 -1
- package/incremental/handlers/defer20220824.d.ts +15 -7
- package/incremental/handlers/defer20220824.js +44 -19
- package/incremental/handlers/defer20220824.js.map +1 -1
- package/incremental/handlers/graphql17Alpha9.d.ts +98 -0
- package/incremental/handlers/graphql17Alpha9.js +218 -0
- package/incremental/handlers/graphql17Alpha9.js.map +1 -0
- package/incremental/handlers/notImplemented.js +1 -1
- package/incremental/handlers/notImplemented.js.map +1 -1
- package/incremental/index.d.ts +1 -0
- package/incremental/index.js +3 -2
- package/incremental/index.js.map +1 -1
- package/incremental/types.d.ts +9 -0
- package/incremental/types.js.map +1 -1
- package/invariantErrorCodes.js +78 -62
- package/legacyEntryPoints/utilities/internal/ponyfills/index.d.ts +1 -0
- package/legacyEntryPoints/utilities/internal/ponyfills/index.js +1 -0
- package/legacyEntryPoints/utilities/internal/ponyfills/ponyfills.cjs +1 -0
- package/legacyEntryPoints/utilities/internal/ponyfills/ponyfills.d.cts +1 -0
- package/link/client-awareness/ClientAwarenessLink.d.ts +1 -1
- package/link/client-awareness/ClientAwarenessLink.js +13 -1
- package/link/client-awareness/ClientAwarenessLink.js.map +1 -1
- package/link/core/ApolloLink.js +3 -3
- package/link/error/index.d.ts +1 -1
- package/link/error/index.js +1 -1
- package/link/error/index.js.map +1 -1
- 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 +3 -2
- package/local-state/LocalState.js +28 -14
- package/local-state/LocalState.js.map +1 -1
- package/masking/types.d.ts +2 -1
- package/masking/types.js.map +1 -1
- package/package.json +15 -1
- package/react/hooks/internal/useDeepMemo.js +2 -0
- package/react/hooks/internal/useDeepMemo.js.map +1 -1
- package/react/hooks/useBackgroundQuery.js +1 -3
- package/react/hooks/useBackgroundQuery.js.map +1 -1
- package/react/hooks/useFragment.d.ts +65 -6
- package/react/hooks/useFragment.js +38 -87
- package/react/hooks/useFragment.js.map +1 -1
- package/react/hooks/useLazyQuery.js +2 -0
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/react/hooks/useMutation.d.ts +13 -1
- package/react/hooks/useMutation.js +7 -1
- package/react/hooks/useMutation.js.map +1 -1
- package/react/hooks/useQuery.js +1 -4
- package/react/hooks/useQuery.js.map +1 -1
- package/react/hooks/useQueryRefHandlers.js +1 -3
- package/react/hooks/useQueryRefHandlers.js.map +1 -1
- package/react/hooks/useReadQuery.js +1 -3
- package/react/hooks/useReadQuery.js.map +1 -1
- package/react/hooks/useSubscription.js +1 -1
- package/react/hooks/useSubscription.js.map +1 -1
- package/react/hooks/useSuspenseFragment.d.ts +33 -7
- package/react/hooks/useSuspenseFragment.js +17 -17
- package/react/hooks/useSuspenseFragment.js.map +1 -1
- package/react/hooks/useSuspenseQuery.js +4 -4
- package/react/hooks/useSuspenseQuery.js.map +1 -1
- package/react/hooks-compiled/internal/useDeepMemo.js +2 -0
- package/react/hooks-compiled/internal/useDeepMemo.js.map +1 -1
- package/react/hooks-compiled/internal/useSuspenseHookCacheKey.js +0 -2
- package/react/hooks-compiled/internal/useSuspenseHookCacheKey.js.map +1 -1
- package/react/hooks-compiled/useBackgroundQuery.js +1 -3
- package/react/hooks-compiled/useBackgroundQuery.js.map +1 -1
- package/react/hooks-compiled/useFragment.d.ts +65 -6
- package/react/hooks-compiled/useFragment.js +110 -88
- package/react/hooks-compiled/useFragment.js.map +1 -1
- package/react/hooks-compiled/useLazyQuery.js +2 -0
- package/react/hooks-compiled/useLazyQuery.js.map +1 -1
- package/react/hooks-compiled/useLoadableQuery.js +69 -75
- package/react/hooks-compiled/useMutation.d.ts +13 -1
- package/react/hooks-compiled/useMutation.js +5 -13
- package/react/hooks-compiled/useMutation.js.map +1 -1
- package/react/hooks-compiled/useQuery.js +44 -56
- package/react/hooks-compiled/useQuery.js.map +1 -1
- package/react/hooks-compiled/useQueryRefHandlers.js +1 -5
- package/react/hooks-compiled/useQueryRefHandlers.js.map +1 -1
- package/react/hooks-compiled/useReadQuery.js +77 -14
- package/react/hooks-compiled/useReadQuery.js.map +1 -1
- package/react/hooks-compiled/useSubscription.js +237 -93
- package/react/hooks-compiled/useSubscription.js.map +1 -1
- package/react/hooks-compiled/useSuspenseFragment.d.ts +33 -7
- package/react/hooks-compiled/useSuspenseFragment.js +17 -17
- package/react/hooks-compiled/useSuspenseFragment.js.map +1 -1
- package/react/hooks-compiled/useSuspenseQuery.js +4 -8
- package/react/hooks-compiled/useSuspenseQuery.js.map +1 -1
- package/react/index.compiled.d.ts +1 -1
- package/react/index.compiled.js +1 -1
- package/react/index.compiled.js.map +1 -1
- package/react/internal/cache/FragmentReference.d.ts +2 -4
- package/react/internal/cache/FragmentReference.js +3 -22
- package/react/internal/cache/FragmentReference.js.map +1 -1
- package/react/internal/cache/QueryReference.d.ts +5 -0
- package/react/internal/cache/QueryReference.js +16 -0
- package/react/internal/cache/QueryReference.js.map +1 -1
- package/react/internal/cache/SuspenseCache.d.ts +1 -1
- package/react/internal/cache/SuspenseCache.js.map +1 -1
- package/react/internal/cache/types.d.ts +2 -2
- package/react/internal/cache/types.js.map +1 -1
- package/react/query-preloader/createQueryPreloader.js +41 -1
- package/react/query-preloader/createQueryPreloader.js.map +1 -1
- package/react/ssr/useSSRQuery.js +1 -0
- package/react/ssr/useSSRQuery.js.map +1 -1
- package/utilities/DeepPartial.d.ts +1 -1
- package/utilities/DeepPartial.js.map +1 -1
- package/utilities/internal/DeepMerger.d.ts +20 -4
- package/utilities/internal/DeepMerger.js +36 -4
- package/utilities/internal/DeepMerger.js.map +1 -1
- package/utilities/internal/combineLatestBatched.d.ts +14 -0
- package/utilities/internal/combineLatestBatched.js +68 -0
- package/utilities/internal/combineLatestBatched.js.map +1 -0
- package/utilities/internal/constants.d.ts +16 -0
- package/utilities/internal/constants.js +16 -0
- package/utilities/internal/constants.js.map +1 -1
- package/utilities/internal/getStoreKeyName.js +1 -0
- package/utilities/internal/getStoreKeyName.js.map +1 -1
- package/utilities/internal/index.d.ts +4 -1
- package/utilities/internal/index.js +3 -1
- package/utilities/internal/index.js.map +1 -1
- package/utilities/internal/mapObservableFragment.d.ts +3 -0
- package/utilities/internal/mapObservableFragment.js +24 -0
- package/utilities/internal/mapObservableFragment.js.map +1 -0
- package/utilities/internal/memoize.d.ts +2 -1
- package/utilities/internal/memoize.js +2 -2
- package/utilities/internal/memoize.js.map +1 -1
- package/utilities/internal/ponyfills/FinalizationRegistry.d.ts +11 -0
- package/utilities/internal/ponyfills/FinalizationRegistry.js +57 -0
- package/utilities/internal/ponyfills/FinalizationRegistry.js.map +1 -0
- package/utilities/internal/ponyfills/index.d.ts +3 -0
- package/utilities/internal/ponyfills/index.js +3 -0
- package/utilities/internal/ponyfills/index.js.map +1 -0
- package/utilities/internal/ponyfills/index.react-native.d.ts +2 -0
- package/utilities/internal/ponyfills/index.react-native.js +2 -0
- package/utilities/internal/ponyfills/index.react-native.js.map +1 -0
- package/utilities/internal/types/ExtensionsWithStreamDetails.d.ts +24 -0
- package/utilities/internal/types/ExtensionsWithStreamDetails.js +2 -0
- package/utilities/internal/types/ExtensionsWithStreamDetails.js.map +1 -0
- package/version.js +1 -1
- package/version.js.map +1 -1
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { DocumentNode, FormattedExecutionResult, GraphQLFormattedError } from "graphql";
|
|
2
|
+
import type { ApolloLink } from "@apollo/client/link";
|
|
3
|
+
import type { DeepPartial, HKT } from "@apollo/client/utilities";
|
|
4
|
+
import type { Incremental } from "../types.cjs";
|
|
5
|
+
export declare namespace GraphQL17Alpha9Handler {
|
|
6
|
+
interface GraphQL17Alpha9Result extends HKT {
|
|
7
|
+
arg1: unknown;
|
|
8
|
+
arg2: unknown;
|
|
9
|
+
return: GraphQL17Alpha9Handler.Chunk<Record<string, unknown>>;
|
|
10
|
+
}
|
|
11
|
+
interface TypeOverrides {
|
|
12
|
+
AdditionalApolloLinkResultTypes: GraphQL17Alpha9Result;
|
|
13
|
+
}
|
|
14
|
+
type InitialResult<TData = Record<string, unknown>> = {
|
|
15
|
+
data: TData;
|
|
16
|
+
errors?: ReadonlyArray<GraphQLFormattedError>;
|
|
17
|
+
pending: ReadonlyArray<PendingResult>;
|
|
18
|
+
hasNext: boolean;
|
|
19
|
+
extensions?: Record<string, unknown>;
|
|
20
|
+
};
|
|
21
|
+
type SubsequentResult<TData = unknown> = {
|
|
22
|
+
hasNext: boolean;
|
|
23
|
+
pending?: ReadonlyArray<PendingResult>;
|
|
24
|
+
incremental?: ReadonlyArray<IncrementalResult<TData>>;
|
|
25
|
+
completed?: ReadonlyArray<CompletedResult>;
|
|
26
|
+
extensions?: Record<string, unknown>;
|
|
27
|
+
};
|
|
28
|
+
interface PendingResult {
|
|
29
|
+
id: string;
|
|
30
|
+
path: Incremental.Path;
|
|
31
|
+
label?: string;
|
|
32
|
+
}
|
|
33
|
+
interface CompletedResult {
|
|
34
|
+
id: string;
|
|
35
|
+
errors?: ReadonlyArray<GraphQLFormattedError>;
|
|
36
|
+
}
|
|
37
|
+
interface IncrementalDeferResult<TData = Record<string, unknown>> {
|
|
38
|
+
errors?: ReadonlyArray<GraphQLFormattedError>;
|
|
39
|
+
data: TData;
|
|
40
|
+
id: string;
|
|
41
|
+
subPath?: Incremental.Path;
|
|
42
|
+
extensions?: Record<string, unknown>;
|
|
43
|
+
}
|
|
44
|
+
interface IncrementalStreamResult<TData = ReadonlyArray<unknown>> {
|
|
45
|
+
errors?: ReadonlyArray<GraphQLFormattedError>;
|
|
46
|
+
items: TData;
|
|
47
|
+
id: string;
|
|
48
|
+
subPath?: Incremental.Path;
|
|
49
|
+
extensions?: Record<string, unknown>;
|
|
50
|
+
}
|
|
51
|
+
type IncrementalResult<TData = unknown> = IncrementalDeferResult<TData> | IncrementalStreamResult<TData>;
|
|
52
|
+
type Chunk<TData> = InitialResult<TData> | SubsequentResult<TData>;
|
|
53
|
+
}
|
|
54
|
+
declare class IncrementalRequest<TData> implements Incremental.IncrementalRequest<GraphQL17Alpha9Handler.Chunk<TData>, TData> {
|
|
55
|
+
hasNext: boolean;
|
|
56
|
+
private data;
|
|
57
|
+
private errors;
|
|
58
|
+
private extensions;
|
|
59
|
+
private pending;
|
|
60
|
+
private streamDetails;
|
|
61
|
+
private streamPositions;
|
|
62
|
+
handle(cacheData: TData | DeepPartial<TData> | null | undefined, chunk: GraphQL17Alpha9Handler.Chunk<TData>): FormattedExecutionResult<TData>;
|
|
63
|
+
private merge;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Provides handling for the incremental delivery specification implemented by
|
|
67
|
+
* graphql.js version `17.0.0-alpha.9`.
|
|
68
|
+
*/
|
|
69
|
+
export declare class GraphQL17Alpha9Handler implements Incremental.Handler<GraphQL17Alpha9Handler.Chunk<any>> {
|
|
70
|
+
/**
|
|
71
|
+
* @internal
|
|
72
|
+
*
|
|
73
|
+
* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.
|
|
74
|
+
*/
|
|
75
|
+
isIncrementalResult(result: ApolloLink.Result<any>): result is GraphQL17Alpha9Handler.InitialResult | GraphQL17Alpha9Handler.SubsequentResult;
|
|
76
|
+
/**
|
|
77
|
+
* @internal
|
|
78
|
+
*
|
|
79
|
+
* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.
|
|
80
|
+
*/
|
|
81
|
+
prepareRequest(request: ApolloLink.Request): ApolloLink.Request;
|
|
82
|
+
/**
|
|
83
|
+
* @internal
|
|
84
|
+
*
|
|
85
|
+
* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.
|
|
86
|
+
*/
|
|
87
|
+
extractErrors(result: ApolloLink.Result<any>): GraphQLFormattedError[] | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* @internal
|
|
90
|
+
*
|
|
91
|
+
* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.
|
|
92
|
+
*/
|
|
93
|
+
startRequest<TData>(_: {
|
|
94
|
+
query: DocumentNode;
|
|
95
|
+
}): IncrementalRequest<TData>;
|
|
96
|
+
}
|
|
97
|
+
export {};
|
|
98
|
+
//# sourceMappingURL=graphql17Alpha9.d.cts.map
|
|
@@ -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"], request.query),
|
|
11
|
+
(0, invariant_1.invariant)(!(0, internal_1.hasDirectives)(["defer", "stream"], request.query), 67);
|
|
12
12
|
return request;
|
|
13
13
|
}
|
|
14
14
|
extractErrors() { }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notImplemented.cjs","sources":["../../../../src/incremental/handlers/notImplemented.ts"],"sourcesContent":["import type { ApolloLink } from \"@apollo/client/link\";\nimport type { HKT } from \"@apollo/client/utilities\";\nimport { hasDirectives } from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\n\nimport type { Incremental } from \"../types.js\";\n\nexport declare namespace NotImplementedHandler {\n interface NotImplementedResult extends HKT {\n arg1: unknown; // TData\n arg2: unknown; // TExtensions\n return: never;\n }\n export interface TypeOverrides {\n AdditionalApolloLinkResultTypes: NotImplementedResult;\n }\n}\n\nexport class NotImplementedHandler implements Incremental.Handler<never> {\n isIncrementalResult(_: any): _ is never {\n return false;\n }\n prepareRequest(request: ApolloLink.Request) {\n invariant(\n !hasDirectives([\"defer\"], request.query),\n \"`@defer`
|
|
1
|
+
{"version":3,"file":"notImplemented.cjs","sources":["../../../../src/incremental/handlers/notImplemented.ts"],"sourcesContent":["import type { ApolloLink } from \"@apollo/client/link\";\nimport type { HKT } from \"@apollo/client/utilities\";\nimport { hasDirectives } from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\n\nimport type { Incremental } from \"../types.js\";\n\nexport declare namespace NotImplementedHandler {\n interface NotImplementedResult extends HKT {\n arg1: unknown; // TData\n arg2: unknown; // TExtensions\n return: never;\n }\n export interface TypeOverrides {\n AdditionalApolloLinkResultTypes: NotImplementedResult;\n }\n}\n\nexport class NotImplementedHandler implements Incremental.Handler<never> {\n isIncrementalResult(_: any): _ is never {\n return false;\n }\n prepareRequest(request: ApolloLink.Request) {\n invariant(\n !hasDirectives([\"defer\", \"stream\"], request.query),\n \"`@defer` and `@stream` are not supported without specifying an incremental handler. Please pass a handler as the `incrementalHandler` option to the `ApolloClient` constructor.\"\n );\n\n return request;\n }\n extractErrors() {}\n // This code path can never be reached, so we won't implement it.\n startRequest = undefined as any;\n}\n"],"names":[],"mappings":";;;AAEA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAeA,CAAA,CAAA,CAAA,CAAA,EAAa,CAAb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,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA;IACE,CAAF,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAiB,CAAjB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiC;AACjC;AAfA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GraphQL17Alpha2Handler = exports.Defer20220824Handler = exports.NotImplementedHandler = void 0;
|
|
3
|
+
exports.GraphQL17Alpha9Handler = exports.GraphQL17Alpha2Handler = exports.Defer20220824Handler = exports.NotImplementedHandler = void 0;
|
|
4
4
|
var notImplemented_js_1 = require("./handlers/notImplemented.cjs");
|
|
5
5
|
Object.defineProperty(exports, "NotImplementedHandler", { enumerable: true, get: function () { return notImplemented_js_1.NotImplementedHandler; } });
|
|
6
6
|
var defer20220824_js_1 = require("./handlers/defer20220824.cjs");
|
|
7
7
|
Object.defineProperty(exports, "Defer20220824Handler", { enumerable: true, get: function () { return defer20220824_js_1.Defer20220824Handler; } });
|
|
8
8
|
Object.defineProperty(exports, "GraphQL17Alpha2Handler", { enumerable: true, get: function () { return defer20220824_js_1.Defer20220824Handler; } });
|
|
9
|
+
var graphql17Alpha9_js_1 = require("./handlers/graphql17Alpha9.cjs");
|
|
10
|
+
Object.defineProperty(exports, "GraphQL17Alpha9Handler", { enumerable: true, get: function () { return graphql17Alpha9_js_1.GraphQL17Alpha9Handler; } });
|
|
9
11
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/incremental/index.ts"],"sourcesContent":["export type { Incremental } from \"./types.js\";\nexport { NotImplementedHandler } from \"./handlers/notImplemented.js\";\nexport {\n Defer20220824Handler,\n Defer20220824Handler as GraphQL17Alpha2Handler,\n} from \"./handlers/defer20220824.js\";\n"],"names":[],"mappings":";;;AACA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,gCAAA,CAAA;AAAS,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,C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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAsB,EAAtB,EAAA,CAAA,CAAA;AACE,CAAF,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAF,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAsB,EAAtB,EAAA,CAAA,CAAA;"}
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/incremental/index.ts"],"sourcesContent":["export type { Incremental } from \"./types.js\";\nexport { NotImplementedHandler } from \"./handlers/notImplemented.js\";\nexport {\n Defer20220824Handler,\n Defer20220824Handler as GraphQL17Alpha2Handler,\n} from \"./handlers/defer20220824.js\";\nexport { GraphQL17Alpha9Handler } from \"./handlers/graphql17Alpha9.js\";\n"],"names":[],"mappings":";;;AAC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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA+B,EAA/B,EAAA,CAAA,CAAA;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { Incremental } from "./types.cjs";
|
|
2
2
|
export { NotImplementedHandler } from "./handlers/notImplemented.cjs";
|
|
3
3
|
export { Defer20220824Handler, Defer20220824Handler as GraphQL17Alpha2Handler, } from "./handlers/defer20220824.cjs";
|
|
4
|
+
export { GraphQL17Alpha9Handler } from "./handlers/graphql17Alpha9.cjs";
|
|
4
5
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -20,5 +20,14 @@ export declare namespace Incremental {
|
|
|
20
20
|
hasNext: boolean;
|
|
21
21
|
handle: (cacheData: TData | DeepPartial<TData> | undefined | null, chunk: Chunk) => FormattedExecutionResult<TData>;
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
*
|
|
26
|
+
* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.
|
|
27
|
+
*/
|
|
28
|
+
interface StreamFieldInfo {
|
|
29
|
+
isFirstChunk: boolean;
|
|
30
|
+
isLastChunk: boolean;
|
|
31
|
+
}
|
|
23
32
|
}
|
|
24
33
|
//# sourceMappingURL=types.d.cts.map
|
|
@@ -278,24 +278,24 @@ you have an infinite render loop in your application.`
|
|
|
278
278
|
message: "No fragment named %s"
|
|
279
279
|
},
|
|
280
280
|
|
|
281
|
-
|
|
281
|
+
55: {
|
|
282
282
|
file: "@apollo/client/__cjs/local-state/LocalState.cjs",
|
|
283
283
|
message: "Could not resolve __typename on object %o returned from resolver '%s'. '__typename' needs to be returned to properly resolve child fields."
|
|
284
284
|
},
|
|
285
285
|
|
|
286
|
-
|
|
286
|
+
56: {
|
|
287
287
|
file: "@apollo/client/__cjs/local-state/LocalState.cjs",
|
|
288
288
|
condition: "fragment",
|
|
289
289
|
message: `No fragment named %s`
|
|
290
290
|
},
|
|
291
291
|
|
|
292
|
-
|
|
292
|
+
57: {
|
|
293
293
|
file: "@apollo/client/__cjs/local-state/LocalState.cjs",
|
|
294
294
|
condition: "cache.fragmentMatches",
|
|
295
295
|
message: "The configured cache does not support fragment matching which will lead to incorrect results when executing local resolvers. Please use a cache that implements `fragmetMatches`."
|
|
296
296
|
},
|
|
297
297
|
|
|
298
|
-
|
|
298
|
+
59: {
|
|
299
299
|
file: "@apollo/client/__cjs/link/persisted-queries/index.cjs",
|
|
300
300
|
condition: "options &&\n (typeof options.sha256 === \"function\" ||\n typeof options.generateHash === \"function\")",
|
|
301
301
|
|
|
@@ -304,13 +304,13 @@ you have an infinite render loop in your application.`
|
|
|
304
304
|
"parameter."
|
|
305
305
|
},
|
|
306
306
|
|
|
307
|
-
|
|
307
|
+
60: {
|
|
308
308
|
file: "@apollo/client/__cjs/link/persisted-queries/index.cjs",
|
|
309
309
|
condition: "forward",
|
|
310
310
|
message: "PersistedQueryLink cannot be the last link in the chain."
|
|
311
311
|
},
|
|
312
312
|
|
|
313
|
-
|
|
313
|
+
61: {
|
|
314
314
|
file: "@apollo/client/__cjs/link/http/checkFetcher.cjs",
|
|
315
315
|
condition: "fetcher || typeof fetch !== \"undefined\"",
|
|
316
316
|
|
|
@@ -328,24 +328,30 @@ const client = new ApolloClient({
|
|
|
328
328
|
`
|
|
329
329
|
},
|
|
330
330
|
|
|
331
|
-
|
|
331
|
+
62: {
|
|
332
332
|
file: "@apollo/client/__cjs/link/http/parseAndCheckHttpResponse.cjs",
|
|
333
333
|
condition: "response.body && typeof response.body.getReader === \"function\"",
|
|
334
334
|
message: "Unknown type for `response.body`. Please use a `fetch` implementation that is WhatWG-compliant and that uses WhatWG ReadableStreams for `body`."
|
|
335
335
|
},
|
|
336
336
|
|
|
337
|
-
|
|
337
|
+
65: {
|
|
338
338
|
file: "@apollo/client/__cjs/link/core/ApolloLink.cjs",
|
|
339
339
|
message: "request is not implemented"
|
|
340
340
|
},
|
|
341
341
|
|
|
342
|
-
|
|
342
|
+
66: {
|
|
343
|
+
file: "@apollo/client/__cjs/incremental/handlers/graphql17Alpha9.cjs",
|
|
344
|
+
condition: "pending",
|
|
345
|
+
message: "Could not find pending chunk for incremental value. Please file an issue for the Apollo Client team to investigate."
|
|
346
|
+
},
|
|
347
|
+
|
|
348
|
+
67: {
|
|
343
349
|
file: "@apollo/client/__cjs/incremental/handlers/notImplemented.cjs",
|
|
344
|
-
condition: "!(0, internal_1.hasDirectives)([\"defer\"], request.query)",
|
|
345
|
-
message: "`@defer`
|
|
350
|
+
condition: "!(0, internal_1.hasDirectives)([\"defer\", \"stream\"], request.query)",
|
|
351
|
+
message: "`@defer` and `@stream` are not supported without specifying an incremental handler. Please pass a handler as the `incrementalHandler` option to the `ApolloClient` constructor."
|
|
346
352
|
},
|
|
347
353
|
|
|
348
|
-
|
|
354
|
+
68: {
|
|
349
355
|
file: "@apollo/client/__cjs/core/ApolloClient.cjs",
|
|
350
356
|
condition: "options.cache",
|
|
351
357
|
|
|
@@ -354,7 +360,7 @@ const client = new ApolloClient({
|
|
|
354
360
|
"For more information, please visit: https://go.apollo.dev/c/docs"
|
|
355
361
|
},
|
|
356
362
|
|
|
357
|
-
|
|
363
|
+
69: {
|
|
358
364
|
file: "@apollo/client/__cjs/core/ApolloClient.cjs",
|
|
359
365
|
condition: "options.link",
|
|
360
366
|
|
|
@@ -363,7 +369,7 @@ const client = new ApolloClient({
|
|
|
363
369
|
"For more information, please visit: https://go.apollo.dev/c/docs"
|
|
364
370
|
},
|
|
365
371
|
|
|
366
|
-
|
|
372
|
+
70: {
|
|
367
373
|
file: "@apollo/client/__cjs/core/ApolloClient.cjs",
|
|
368
374
|
condition: "options.fetchPolicy !== \"cache-and-network\"",
|
|
369
375
|
|
|
@@ -373,7 +379,7 @@ const client = new ApolloClient({
|
|
|
373
379
|
"using a different fetchPolicy, such as cache-first or network-only."
|
|
374
380
|
},
|
|
375
381
|
|
|
376
|
-
|
|
382
|
+
71: {
|
|
377
383
|
file: "@apollo/client/__cjs/core/ApolloClient.cjs",
|
|
378
384
|
condition: "options.fetchPolicy !== \"standby\"",
|
|
379
385
|
|
|
@@ -382,7 +388,7 @@ const client = new ApolloClient({
|
|
|
382
388
|
"as cache-first or network-only."
|
|
383
389
|
},
|
|
384
390
|
|
|
385
|
-
|
|
391
|
+
72: {
|
|
386
392
|
file: "@apollo/client/__cjs/core/ApolloClient.cjs",
|
|
387
393
|
condition: "options.query",
|
|
388
394
|
|
|
@@ -390,164 +396,164 @@ const client = new ApolloClient({
|
|
|
390
396
|
"in the query option."
|
|
391
397
|
},
|
|
392
398
|
|
|
393
|
-
|
|
399
|
+
73: {
|
|
394
400
|
file: "@apollo/client/__cjs/core/ApolloClient.cjs",
|
|
395
401
|
condition: "options.query.kind === \"Document\"",
|
|
396
402
|
message: 'You must wrap the query string in a "gql" tag.'
|
|
397
403
|
},
|
|
398
404
|
|
|
399
|
-
|
|
405
|
+
74: {
|
|
400
406
|
file: "@apollo/client/__cjs/core/ApolloClient.cjs",
|
|
401
407
|
condition: "!options.returnPartialData",
|
|
402
408
|
message: "returnPartialData option only supported on watchQuery."
|
|
403
409
|
},
|
|
404
410
|
|
|
405
|
-
|
|
411
|
+
75: {
|
|
406
412
|
file: "@apollo/client/__cjs/core/ApolloClient.cjs",
|
|
407
413
|
condition: "!options.pollInterval",
|
|
408
414
|
message: "pollInterval option only supported on watchQuery."
|
|
409
415
|
},
|
|
410
416
|
|
|
411
|
-
|
|
417
|
+
76: {
|
|
412
418
|
file: "@apollo/client/__cjs/core/ApolloClient.cjs",
|
|
413
419
|
condition: "!options.notifyOnNetworkStatusChange",
|
|
414
420
|
message: "notifyOnNetworkStatusChange option only supported on watchQuery."
|
|
415
421
|
},
|
|
416
422
|
|
|
417
|
-
|
|
423
|
+
77: {
|
|
418
424
|
file: "@apollo/client/__cjs/core/ApolloClient.cjs",
|
|
419
425
|
condition: "optionsWithDefaults.mutation",
|
|
420
426
|
message: "The `mutation` option is required. Please provide a GraphQL document in the `mutation` option."
|
|
421
427
|
},
|
|
422
428
|
|
|
423
|
-
|
|
429
|
+
78: {
|
|
424
430
|
file: "@apollo/client/__cjs/core/ApolloClient.cjs",
|
|
425
431
|
condition: "optionsWithDefaults.fetchPolicy === \"network-only\" ||\n optionsWithDefaults.fetchPolicy === \"no-cache\"",
|
|
426
432
|
message: "Mutations only support 'network-only' or 'no-cache' fetch policies. The default 'network-only' behavior automatically writes mutation results to the cache. Passing 'no-cache' skips the cache write."
|
|
427
433
|
},
|
|
428
434
|
|
|
429
|
-
|
|
435
|
+
80: {
|
|
430
436
|
file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
|
|
431
437
|
condition: "fetchPolicy === \"standby\"",
|
|
432
438
|
message: "The `variablesUnknown` option can only be used together with a `standby` fetch policy."
|
|
433
439
|
},
|
|
434
440
|
|
|
435
|
-
|
|
441
|
+
82: {
|
|
436
442
|
file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
|
|
437
443
|
condition: "this.options.fetchPolicy !== \"cache-only\"",
|
|
438
444
|
message: "Cannot execute `fetchMore` for 'cache-only' query '%s'. Please use a different fetch policy."
|
|
439
445
|
},
|
|
440
446
|
|
|
441
|
-
|
|
447
|
+
83: {
|
|
442
448
|
file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
|
|
443
449
|
condition: "updateQuery",
|
|
444
450
|
message: "You must provide an `updateQuery` function when using `fetchMore` with a `no-cache` fetch policy."
|
|
445
451
|
},
|
|
446
452
|
|
|
447
|
-
|
|
453
|
+
87: {
|
|
448
454
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
449
455
|
message: "QueryManager stopped while query was in flight"
|
|
450
456
|
},
|
|
451
457
|
|
|
452
|
-
|
|
458
|
+
88: {
|
|
453
459
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
454
460
|
condition: "this.localState",
|
|
455
461
|
message: "Mutation '%s' contains `@client` fields with variables provided by `@export` but local state has not been configured."
|
|
456
462
|
},
|
|
457
463
|
|
|
458
|
-
|
|
464
|
+
89: {
|
|
459
465
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
460
466
|
message: "Store reset while query was in flight (not completed in link chain)"
|
|
461
467
|
},
|
|
462
468
|
|
|
463
|
-
|
|
469
|
+
92: {
|
|
464
470
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
465
471
|
condition: "!this.getDocumentInfo(query).hasClientExports || this.localState",
|
|
466
472
|
message: "Subscription '%s' contains `@client` fields with variables provided by `@export` but local state has not been configured."
|
|
467
473
|
},
|
|
468
474
|
|
|
469
|
-
|
|
475
|
+
93: {
|
|
470
476
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
471
477
|
condition: "this.localState",
|
|
472
478
|
message: "%s '%s' contains `@client` fields but local state has not been configured."
|
|
473
479
|
},
|
|
474
480
|
|
|
475
|
-
|
|
481
|
+
94: {
|
|
476
482
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
477
483
|
condition: "!hasIncrementalDirective",
|
|
478
484
|
message: "%s '%s' contains `@client` and `@defer` directives. These cannot be used together."
|
|
479
485
|
},
|
|
480
486
|
|
|
481
|
-
|
|
487
|
+
95: {
|
|
482
488
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
483
489
|
condition: "this.localState",
|
|
484
490
|
message: "Query '%s' contains `@client` fields with variables provided by `@export` but local state has not been configured."
|
|
485
491
|
},
|
|
486
492
|
|
|
487
|
-
|
|
493
|
+
97: {
|
|
488
494
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
489
495
|
condition: "this.localState",
|
|
490
496
|
message: "Query '%s' contains `@client` fields but local state has not been configured."
|
|
491
497
|
},
|
|
492
498
|
|
|
493
|
-
|
|
499
|
+
98: {
|
|
494
500
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
495
501
|
condition: "didEmitValue",
|
|
496
502
|
message: "The link chain completed without emitting a value. This is likely unintentional and should be updated to emit a value before completing."
|
|
497
503
|
},
|
|
498
504
|
|
|
499
|
-
|
|
505
|
+
99: {
|
|
500
506
|
file: "@apollo/client/__cjs/cache/inmemory/entityStore.cjs",
|
|
501
507
|
condition: "typeof dataId === \"string\"",
|
|
502
508
|
message: "store.merge expects a string ID"
|
|
503
509
|
},
|
|
504
510
|
|
|
505
|
-
|
|
511
|
+
102: {
|
|
506
512
|
file: "@apollo/client/__cjs/cache/inmemory/key-extractor.cjs",
|
|
507
513
|
condition: "extracted !== void 0",
|
|
508
514
|
message: `Missing field '%s' while extracting keyFields from %s`
|
|
509
515
|
},
|
|
510
516
|
|
|
511
|
-
|
|
517
|
+
103: {
|
|
512
518
|
file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
|
|
513
519
|
condition: "!old || old === which",
|
|
514
520
|
message: `Cannot change root %s __typename more than once`
|
|
515
521
|
},
|
|
516
522
|
|
|
517
|
-
|
|
523
|
+
106: {
|
|
518
524
|
file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
|
|
519
525
|
message: "Cannot automatically merge arrays"
|
|
520
526
|
},
|
|
521
527
|
|
|
522
|
-
|
|
528
|
+
107: {
|
|
523
529
|
file: "@apollo/client/__cjs/cache/inmemory/readFromStore.cjs",
|
|
524
530
|
message: `No fragment named %s`
|
|
525
531
|
},
|
|
526
532
|
|
|
527
|
-
|
|
533
|
+
108: {
|
|
528
534
|
file: "@apollo/client/__cjs/cache/inmemory/readFromStore.cjs",
|
|
529
535
|
condition: "!(0, utilities_1.isReference)(value)",
|
|
530
536
|
message: `Missing selection set for object of type %s returned for query field %s`
|
|
531
537
|
},
|
|
532
538
|
|
|
533
|
-
|
|
539
|
+
109: {
|
|
534
540
|
file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
|
|
535
541
|
message: `Could not identify object %s`
|
|
536
542
|
},
|
|
537
543
|
|
|
538
|
-
|
|
544
|
+
111: {
|
|
539
545
|
file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
|
|
540
546
|
message: `No fragment named %s`
|
|
541
547
|
}
|
|
542
548
|
};
|
|
543
549
|
|
|
544
550
|
exports.devDebug = {
|
|
545
|
-
|
|
551
|
+
79: {
|
|
546
552
|
file: "@apollo/client/__cjs/core/ApolloClient.cjs",
|
|
547
553
|
message: `In client.refetchQueries, Promise.all promise rejected with error %o`
|
|
548
554
|
},
|
|
549
555
|
|
|
550
|
-
|
|
556
|
+
86: {
|
|
551
557
|
file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
|
|
552
558
|
message: `Missing cache result fields: %o`
|
|
553
559
|
}
|
|
@@ -583,30 +589,40 @@ exports.devWarn = {
|
|
|
583
589
|
|
|
584
590
|
50: {
|
|
585
591
|
file: "@apollo/client/__cjs/local-state/LocalState.cjs",
|
|
586
|
-
message: "The '%s'
|
|
592
|
+
message: "The '%s' field resolves the value from the cache, for example from a 'read' function, but a 'no-cache' fetch policy was used. The field value has been set to `null`. Either define a local resolver or use a fetch policy that uses the cache to ensure the field is resolved correctly."
|
|
587
593
|
},
|
|
588
594
|
|
|
589
595
|
51: {
|
|
590
596
|
file: "@apollo/client/__cjs/local-state/LocalState.cjs",
|
|
591
|
-
message: "
|
|
597
|
+
message: "Could not find a resolver for the '%s' field nor does the cache resolve the field. The field value has been set to `null`. Either define a resolver for the field or ensure the cache can resolve the value, for example, by adding a 'read' function to a field policy in 'InMemoryCache'."
|
|
592
598
|
},
|
|
593
599
|
|
|
594
600
|
52: {
|
|
601
|
+
file: "@apollo/client/__cjs/local-state/LocalState.cjs",
|
|
602
|
+
message: "The '%s' resolver returned `undefined` instead of a value. This is likely a bug in the resolver. If you didn't mean to return a value, return `null` instead."
|
|
603
|
+
},
|
|
604
|
+
|
|
605
|
+
53: {
|
|
606
|
+
file: "@apollo/client/__cjs/local-state/LocalState.cjs",
|
|
607
|
+
message: "The '%s' field had no cached value and only forced resolvers were run. The value was set to `null`."
|
|
608
|
+
},
|
|
609
|
+
|
|
610
|
+
54: {
|
|
595
611
|
file: "@apollo/client/__cjs/local-state/LocalState.cjs",
|
|
596
612
|
message: "The '%s' field on object %o returned `undefined` instead of a value. The parent resolver did not include the property in the returned value and there was no resolver defined for the field."
|
|
597
613
|
},
|
|
598
614
|
|
|
599
|
-
|
|
615
|
+
58: {
|
|
600
616
|
file: "@apollo/client/__cjs/link/ws/index.cjs",
|
|
601
617
|
message: "`WebSocketLink` uses the deprecated and unmaintained `subscriptions-transport-ws` library. This link is no longer maintained and will be removed in a future major version of Apollo Client. We recommend switching to `GraphQLWsLink` which uses the `graphql-ws` library to send GraphQL operations through WebSocket connections (https://the-guild.dev/graphql/ws)."
|
|
602
618
|
},
|
|
603
619
|
|
|
604
|
-
|
|
620
|
+
63: {
|
|
605
621
|
file: "@apollo/client/__cjs/link/core/ApolloLink.cjs",
|
|
606
622
|
message: "[ApolloLink.split]: The test function returned a non-boolean value which could result in subtle bugs (e.g. such as using an `async` function which always returns a truthy value). Got `%o`."
|
|
607
623
|
},
|
|
608
624
|
|
|
609
|
-
|
|
625
|
+
64: {
|
|
610
626
|
file: "@apollo/client/__cjs/link/core/ApolloLink.cjs",
|
|
611
627
|
|
|
612
628
|
message: "The terminating link provided to `ApolloLink.execute` called `forward` instead of handling the request. " +
|
|
@@ -615,34 +631,34 @@ exports.devWarn = {
|
|
|
615
631
|
"If you are using a split link, ensure each branch contains a terminating link that handles the request."
|
|
616
632
|
},
|
|
617
633
|
|
|
618
|
-
|
|
634
|
+
81: {
|
|
619
635
|
file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
|
|
620
636
|
|
|
621
637
|
message: `Called refetch(%o) for query %o, which does not declare a $variables variable.
|
|
622
638
|
Did you mean to call refetch(variables) instead of refetch({ variables })?`
|
|
623
639
|
},
|
|
624
640
|
|
|
625
|
-
|
|
641
|
+
85: {
|
|
626
642
|
file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
|
|
627
643
|
message: "Cannot poll on 'cache-only' query '%s' and as such, polling is disabled. Please use a different fetch policy."
|
|
628
644
|
},
|
|
629
645
|
|
|
630
|
-
|
|
646
|
+
90: {
|
|
631
647
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
632
648
|
message: `Unknown query named "%s" requested in refetchQueries options.include array`
|
|
633
649
|
},
|
|
634
650
|
|
|
635
|
-
|
|
651
|
+
91: {
|
|
636
652
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
637
653
|
message: `Unknown anonymous query requested in refetchQueries options.include array`
|
|
638
654
|
},
|
|
639
655
|
|
|
640
|
-
|
|
656
|
+
96: {
|
|
641
657
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
642
658
|
message: '[%s]: Fragments masked by data masking are inaccessible when using fetch policy "no-cache". Please add `@unmask` to each fragment spread to access the data.'
|
|
643
659
|
},
|
|
644
660
|
|
|
645
|
-
|
|
661
|
+
100: {
|
|
646
662
|
file: "@apollo/client/__cjs/cache/inmemory/entityStore.cjs",
|
|
647
663
|
|
|
648
664
|
message: "cache.modify: You are trying to write a Reference that is not part of the store: %o\n" +
|
|
@@ -650,24 +666,24 @@ Did you mean to call refetch(variables) instead of refetch({ variables })?`
|
|
|
650
666
|
"`toReference(object, true)`"
|
|
651
667
|
},
|
|
652
668
|
|
|
653
|
-
|
|
669
|
+
101: {
|
|
654
670
|
file: "@apollo/client/__cjs/cache/inmemory/entityStore.cjs",
|
|
655
671
|
|
|
656
672
|
message: "cache.modify: Writing an array with a mix of both References and Objects will not result in the Objects being normalized correctly.\n" +
|
|
657
673
|
"Please convert the object instance %o to a Reference before writing it to the cache by calling `toReference(object, true)`."
|
|
658
674
|
},
|
|
659
675
|
|
|
660
|
-
|
|
676
|
+
104: {
|
|
661
677
|
file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
|
|
662
678
|
message: `Inferring subtype %s of supertype %s`
|
|
663
679
|
},
|
|
664
680
|
|
|
665
|
-
|
|
681
|
+
105: {
|
|
666
682
|
file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
|
|
667
683
|
message: `Undefined 'from' passed to readField with arguments %s`
|
|
668
684
|
},
|
|
669
685
|
|
|
670
|
-
|
|
686
|
+
112: {
|
|
671
687
|
file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
|
|
672
688
|
|
|
673
689
|
message: `Cache data may be lost when replacing the %s field of a %s object.
|
|
@@ -686,7 +702,7 @@ For more information about these options, please refer to the documentation:
|
|
|
686
702
|
`
|
|
687
703
|
},
|
|
688
704
|
|
|
689
|
-
|
|
705
|
+
113: {
|
|
690
706
|
file: "@apollo/client/__cjs/cache/core/cache.cjs",
|
|
691
707
|
message: "Could not identify object passed to `from` for '%s' fragment, either because the object is non-normalized or the key fields are missing. If you are masking this object, please ensure the key fields are requested by the parent object."
|
|
692
708
|
}
|
|
@@ -703,12 +719,12 @@ exports.devError = {
|
|
|
703
719
|
message: "The result of getSnapshot should be cached to avoid an infinite loop"
|
|
704
720
|
},
|
|
705
721
|
|
|
706
|
-
|
|
722
|
+
84: {
|
|
707
723
|
file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
|
|
708
724
|
message: "Unhandled GraphQL subscription error"
|
|
709
725
|
},
|
|
710
726
|
|
|
711
|
-
|
|
727
|
+
110: {
|
|
712
728
|
file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
|
|
713
729
|
message: `Missing field '%s' while writing result %o`
|
|
714
730
|
}
|
|
@@ -45,7 +45,7 @@ class ClientAwarenessLink extends link_1.ApolloLink {
|
|
|
45
45
|
{
|
|
46
46
|
const { name, version, transport = "headers", } = (0, internal_1.compact)({}, clientOptions.clientAwareness, options.clientAwareness, context.clientAwareness);
|
|
47
47
|
if (transport === "headers") {
|
|
48
|
-
operation.setContext(({ headers
|
|
48
|
+
operation.setContext(({ headers }) => {
|
|
49
49
|
return {
|
|
50
50
|
headers: (0, internal_1.compact)(
|
|
51
51
|
// setting these first so that they can be overridden by user-provided headers
|
|
@@ -69,6 +69,18 @@ class ClientAwarenessLink extends link_1.ApolloLink {
|
|
|
69
69
|
},
|
|
70
70
|
}, operation.extensions);
|
|
71
71
|
}
|
|
72
|
+
if (transport === "headers") {
|
|
73
|
+
operation.setContext(({ headers }) => {
|
|
74
|
+
return {
|
|
75
|
+
headers: (0, internal_1.compact)(
|
|
76
|
+
// setting these first so that they can be overridden by user-provided headers
|
|
77
|
+
{
|
|
78
|
+
"apollographql-library-name": "@apollo/client",
|
|
79
|
+
"apollographql-library-version": client.version,
|
|
80
|
+
}, headers),
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
}
|
|
72
84
|
}
|
|
73
85
|
return forward(operation);
|
|
74
86
|
});
|