@apollo/client 4.0.10 → 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 +217 -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 +159 -18
- package/__cjs/core/ObservableQuery.cjs +173 -128
- package/__cjs/core/ObservableQuery.cjs.map +1 -1
- package/__cjs/core/ObservableQuery.d.cts +2 -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 +47 -25
- 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 +83 -61
- 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 +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 +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 +3 -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 +8 -8
- 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 +6 -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 +29 -0
- package/__cjs/utilities/internal/constants.cjs.map +1 -0
- package/__cjs/utilities/internal/constants.d.cts +26 -0
- package/__cjs/utilities/internal/getStoreKeyName.cjs +1 -0
- package/__cjs/utilities/internal/getStoreKeyName.cjs.map +1 -1
- package/__cjs/utilities/internal/index.cjs +10 -2
- package/__cjs/utilities/internal/index.cjs.map +1 -1
- package/__cjs/utilities/internal/index.d.cts +4 -0
- 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 +159 -18
- package/core/ApolloClient.js +32 -50
- package/core/ApolloClient.js.map +1 -1
- package/core/ObservableQuery.d.ts +2 -0
- package/core/ObservableQuery.js +176 -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 +48 -26
- 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 +83 -61
- 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 +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.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 +4 -1
- 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 +9 -9
- 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 +6 -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 +4 -1
- 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 +53 -61
- 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 +7 -9
- 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 +26 -0
- package/utilities/internal/constants.js +26 -0
- package/utilities/internal/constants.js.map +1 -0
- package/utilities/internal/getStoreKeyName.js +1 -0
- package/utilities/internal/getStoreKeyName.js.map +1 -1
- package/utilities/internal/index.d.ts +4 -0
- package/utilities/internal/index.js +3 -0
- 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,CA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A,CAAA,CAAA,CAAA,CAAe,CAAf,EAAA,EAAmB;IACjB,CAAF,EAAA,CAAA,CAAA,CAAA,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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AA,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;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/defer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AA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,158 +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: {
|
|
436
|
+
file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
|
|
437
|
+
condition: "fetchPolicy === \"standby\"",
|
|
438
|
+
message: "The `variablesUnknown` option can only be used together with a `standby` fetch policy."
|
|
439
|
+
},
|
|
440
|
+
|
|
441
|
+
82: {
|
|
430
442
|
file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
|
|
431
443
|
condition: "this.options.fetchPolicy !== \"cache-only\"",
|
|
432
444
|
message: "Cannot execute `fetchMore` for 'cache-only' query '%s'. Please use a different fetch policy."
|
|
433
445
|
},
|
|
434
446
|
|
|
435
|
-
|
|
447
|
+
83: {
|
|
436
448
|
file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
|
|
437
449
|
condition: "updateQuery",
|
|
438
450
|
message: "You must provide an `updateQuery` function when using `fetchMore` with a `no-cache` fetch policy."
|
|
439
451
|
},
|
|
440
452
|
|
|
441
|
-
|
|
453
|
+
87: {
|
|
442
454
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
443
455
|
message: "QueryManager stopped while query was in flight"
|
|
444
456
|
},
|
|
445
457
|
|
|
446
|
-
|
|
458
|
+
88: {
|
|
447
459
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
448
460
|
condition: "this.localState",
|
|
449
461
|
message: "Mutation '%s' contains `@client` fields with variables provided by `@export` but local state has not been configured."
|
|
450
462
|
},
|
|
451
463
|
|
|
452
|
-
|
|
464
|
+
89: {
|
|
453
465
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
454
466
|
message: "Store reset while query was in flight (not completed in link chain)"
|
|
455
467
|
},
|
|
456
468
|
|
|
457
|
-
|
|
469
|
+
92: {
|
|
458
470
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
459
471
|
condition: "!this.getDocumentInfo(query).hasClientExports || this.localState",
|
|
460
472
|
message: "Subscription '%s' contains `@client` fields with variables provided by `@export` but local state has not been configured."
|
|
461
473
|
},
|
|
462
474
|
|
|
463
|
-
|
|
475
|
+
93: {
|
|
464
476
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
465
477
|
condition: "this.localState",
|
|
466
478
|
message: "%s '%s' contains `@client` fields but local state has not been configured."
|
|
467
479
|
},
|
|
468
480
|
|
|
469
|
-
|
|
481
|
+
94: {
|
|
470
482
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
471
483
|
condition: "!hasIncrementalDirective",
|
|
472
484
|
message: "%s '%s' contains `@client` and `@defer` directives. These cannot be used together."
|
|
473
485
|
},
|
|
474
486
|
|
|
475
|
-
|
|
487
|
+
95: {
|
|
476
488
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
477
489
|
condition: "this.localState",
|
|
478
490
|
message: "Query '%s' contains `@client` fields with variables provided by `@export` but local state has not been configured."
|
|
479
491
|
},
|
|
480
492
|
|
|
481
|
-
|
|
493
|
+
97: {
|
|
482
494
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
483
495
|
condition: "this.localState",
|
|
484
496
|
message: "Query '%s' contains `@client` fields but local state has not been configured."
|
|
485
497
|
},
|
|
486
498
|
|
|
487
|
-
|
|
499
|
+
98: {
|
|
488
500
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
489
501
|
condition: "didEmitValue",
|
|
490
502
|
message: "The link chain completed without emitting a value. This is likely unintentional and should be updated to emit a value before completing."
|
|
491
503
|
},
|
|
492
504
|
|
|
493
|
-
|
|
505
|
+
99: {
|
|
494
506
|
file: "@apollo/client/__cjs/cache/inmemory/entityStore.cjs",
|
|
495
507
|
condition: "typeof dataId === \"string\"",
|
|
496
508
|
message: "store.merge expects a string ID"
|
|
497
509
|
},
|
|
498
510
|
|
|
499
|
-
|
|
511
|
+
102: {
|
|
500
512
|
file: "@apollo/client/__cjs/cache/inmemory/key-extractor.cjs",
|
|
501
513
|
condition: "extracted !== void 0",
|
|
502
514
|
message: `Missing field '%s' while extracting keyFields from %s`
|
|
503
515
|
},
|
|
504
516
|
|
|
505
|
-
|
|
517
|
+
103: {
|
|
506
518
|
file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
|
|
507
519
|
condition: "!old || old === which",
|
|
508
520
|
message: `Cannot change root %s __typename more than once`
|
|
509
521
|
},
|
|
510
522
|
|
|
511
|
-
|
|
523
|
+
106: {
|
|
512
524
|
file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
|
|
513
525
|
message: "Cannot automatically merge arrays"
|
|
514
526
|
},
|
|
515
527
|
|
|
516
|
-
|
|
528
|
+
107: {
|
|
517
529
|
file: "@apollo/client/__cjs/cache/inmemory/readFromStore.cjs",
|
|
518
530
|
message: `No fragment named %s`
|
|
519
531
|
},
|
|
520
532
|
|
|
521
|
-
|
|
533
|
+
108: {
|
|
522
534
|
file: "@apollo/client/__cjs/cache/inmemory/readFromStore.cjs",
|
|
523
535
|
condition: "!(0, utilities_1.isReference)(value)",
|
|
524
536
|
message: `Missing selection set for object of type %s returned for query field %s`
|
|
525
537
|
},
|
|
526
538
|
|
|
527
|
-
|
|
539
|
+
109: {
|
|
528
540
|
file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
|
|
529
541
|
message: `Could not identify object %s`
|
|
530
542
|
},
|
|
531
543
|
|
|
532
|
-
|
|
544
|
+
111: {
|
|
533
545
|
file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
|
|
534
546
|
message: `No fragment named %s`
|
|
535
547
|
}
|
|
536
548
|
};
|
|
537
549
|
|
|
538
550
|
exports.devDebug = {
|
|
539
|
-
|
|
551
|
+
79: {
|
|
540
552
|
file: "@apollo/client/__cjs/core/ApolloClient.cjs",
|
|
541
553
|
message: `In client.refetchQueries, Promise.all promise rejected with error %o`
|
|
542
554
|
},
|
|
543
555
|
|
|
544
|
-
|
|
556
|
+
86: {
|
|
545
557
|
file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
|
|
546
558
|
message: `Missing cache result fields: %o`
|
|
547
559
|
}
|
|
@@ -577,30 +589,40 @@ exports.devWarn = {
|
|
|
577
589
|
|
|
578
590
|
50: {
|
|
579
591
|
file: "@apollo/client/__cjs/local-state/LocalState.cjs",
|
|
580
|
-
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."
|
|
581
593
|
},
|
|
582
594
|
|
|
583
595
|
51: {
|
|
584
596
|
file: "@apollo/client/__cjs/local-state/LocalState.cjs",
|
|
585
|
-
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'."
|
|
586
598
|
},
|
|
587
599
|
|
|
588
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: {
|
|
589
611
|
file: "@apollo/client/__cjs/local-state/LocalState.cjs",
|
|
590
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."
|
|
591
613
|
},
|
|
592
614
|
|
|
593
|
-
|
|
615
|
+
58: {
|
|
594
616
|
file: "@apollo/client/__cjs/link/ws/index.cjs",
|
|
595
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)."
|
|
596
618
|
},
|
|
597
619
|
|
|
598
|
-
|
|
620
|
+
63: {
|
|
599
621
|
file: "@apollo/client/__cjs/link/core/ApolloLink.cjs",
|
|
600
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`."
|
|
601
623
|
},
|
|
602
624
|
|
|
603
|
-
|
|
625
|
+
64: {
|
|
604
626
|
file: "@apollo/client/__cjs/link/core/ApolloLink.cjs",
|
|
605
627
|
|
|
606
628
|
message: "The terminating link provided to `ApolloLink.execute` called `forward` instead of handling the request. " +
|
|
@@ -609,34 +631,34 @@ exports.devWarn = {
|
|
|
609
631
|
"If you are using a split link, ensure each branch contains a terminating link that handles the request."
|
|
610
632
|
},
|
|
611
633
|
|
|
612
|
-
|
|
634
|
+
81: {
|
|
613
635
|
file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
|
|
614
636
|
|
|
615
637
|
message: `Called refetch(%o) for query %o, which does not declare a $variables variable.
|
|
616
638
|
Did you mean to call refetch(variables) instead of refetch({ variables })?`
|
|
617
639
|
},
|
|
618
640
|
|
|
619
|
-
|
|
641
|
+
85: {
|
|
620
642
|
file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
|
|
621
643
|
message: "Cannot poll on 'cache-only' query '%s' and as such, polling is disabled. Please use a different fetch policy."
|
|
622
644
|
},
|
|
623
645
|
|
|
624
|
-
|
|
646
|
+
90: {
|
|
625
647
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
626
648
|
message: `Unknown query named "%s" requested in refetchQueries options.include array`
|
|
627
649
|
},
|
|
628
650
|
|
|
629
|
-
|
|
651
|
+
91: {
|
|
630
652
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
631
653
|
message: `Unknown anonymous query requested in refetchQueries options.include array`
|
|
632
654
|
},
|
|
633
655
|
|
|
634
|
-
|
|
656
|
+
96: {
|
|
635
657
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
636
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.'
|
|
637
659
|
},
|
|
638
660
|
|
|
639
|
-
|
|
661
|
+
100: {
|
|
640
662
|
file: "@apollo/client/__cjs/cache/inmemory/entityStore.cjs",
|
|
641
663
|
|
|
642
664
|
message: "cache.modify: You are trying to write a Reference that is not part of the store: %o\n" +
|
|
@@ -644,24 +666,24 @@ Did you mean to call refetch(variables) instead of refetch({ variables })?`
|
|
|
644
666
|
"`toReference(object, true)`"
|
|
645
667
|
},
|
|
646
668
|
|
|
647
|
-
|
|
669
|
+
101: {
|
|
648
670
|
file: "@apollo/client/__cjs/cache/inmemory/entityStore.cjs",
|
|
649
671
|
|
|
650
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" +
|
|
651
673
|
"Please convert the object instance %o to a Reference before writing it to the cache by calling `toReference(object, true)`."
|
|
652
674
|
},
|
|
653
675
|
|
|
654
|
-
|
|
676
|
+
104: {
|
|
655
677
|
file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
|
|
656
678
|
message: `Inferring subtype %s of supertype %s`
|
|
657
679
|
},
|
|
658
680
|
|
|
659
|
-
|
|
681
|
+
105: {
|
|
660
682
|
file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
|
|
661
683
|
message: `Undefined 'from' passed to readField with arguments %s`
|
|
662
684
|
},
|
|
663
685
|
|
|
664
|
-
|
|
686
|
+
112: {
|
|
665
687
|
file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
|
|
666
688
|
|
|
667
689
|
message: `Cache data may be lost when replacing the %s field of a %s object.
|
|
@@ -680,7 +702,7 @@ For more information about these options, please refer to the documentation:
|
|
|
680
702
|
`
|
|
681
703
|
},
|
|
682
704
|
|
|
683
|
-
|
|
705
|
+
113: {
|
|
684
706
|
file: "@apollo/client/__cjs/cache/core/cache.cjs",
|
|
685
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."
|
|
686
708
|
}
|
|
@@ -697,12 +719,12 @@ exports.devError = {
|
|
|
697
719
|
message: "The result of getSnapshot should be cached to avoid an infinite loop"
|
|
698
720
|
},
|
|
699
721
|
|
|
700
|
-
|
|
722
|
+
84: {
|
|
701
723
|
file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
|
|
702
724
|
message: "Unhandled GraphQL subscription error"
|
|
703
725
|
},
|
|
704
726
|
|
|
705
|
-
|
|
727
|
+
110: {
|
|
706
728
|
file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
|
|
707
729
|
message: `Missing field '%s' while writing result %o`
|
|
708
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
|
});
|