@apollo/client 4.0.12-beta.0 → 4.0.13
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 +10 -194
- package/__cjs/cache/core/cache.cjs +48 -169
- package/__cjs/cache/core/cache.cjs.map +1 -1
- package/__cjs/cache/core/cache.d.cts +25 -94
- package/__cjs/cache/core/types/Cache.d.cts +17 -49
- package/__cjs/cache/index.cjs.map +1 -1
- package/__cjs/cache/index.d.cts +1 -1
- package/__cjs/cache/inmemory/entityStore.cjs +4 -6
- package/__cjs/cache/inmemory/entityStore.cjs.map +1 -1
- package/__cjs/cache/inmemory/fragmentRegistry.cjs +5 -0
- package/__cjs/cache/inmemory/fragmentRegistry.cjs.map +1 -1
- package/__cjs/cache/inmemory/helpers.d.cts +1 -1
- package/__cjs/cache/inmemory/inMemoryCache.cjs +1 -15
- package/__cjs/cache/inmemory/inMemoryCache.cjs.map +1 -1
- package/__cjs/cache/inmemory/inMemoryCache.d.cts +0 -1
- 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 +17 -56
- package/__cjs/cache/inmemory/policies.cjs.map +1 -1
- package/__cjs/cache/inmemory/policies.d.cts +6 -30
- package/__cjs/cache/inmemory/readFromStore.cjs +3 -3
- package/__cjs/cache/inmemory/readFromStore.cjs.map +1 -1
- package/__cjs/cache/inmemory/types.d.cts +0 -2
- package/__cjs/cache/inmemory/writeToStore.cjs +10 -24
- package/__cjs/cache/inmemory/writeToStore.cjs.map +1 -1
- package/__cjs/cache/inmemory/writeToStore.d.cts +1 -2
- package/__cjs/core/ApolloClient.cjs +49 -31
- package/__cjs/core/ApolloClient.cjs.map +1 -1
- package/__cjs/core/ApolloClient.d.cts +17 -143
- package/__cjs/core/ObservableQuery.cjs +128 -162
- package/__cjs/core/ObservableQuery.cjs.map +1 -1
- package/__cjs/core/ObservableQuery.d.cts +0 -1
- package/__cjs/core/QueryInfo.cjs +1 -9
- package/__cjs/core/QueryInfo.cjs.map +1 -1
- package/__cjs/core/QueryInfo.d.cts +1 -2
- package/__cjs/core/QueryManager.cjs +24 -46
- package/__cjs/core/QueryManager.cjs.map +1 -1
- package/__cjs/core/QueryManager.d.cts +2 -18
- package/__cjs/incremental/handlers/defer20220824.cjs +19 -44
- package/__cjs/incremental/handlers/defer20220824.cjs.map +1 -1
- package/__cjs/incremental/handlers/defer20220824.d.cts +7 -15
- package/__cjs/incremental/handlers/notImplemented.cjs +1 -1
- package/__cjs/incremental/handlers/notImplemented.cjs.map +1 -1
- package/__cjs/incremental/index.cjs +1 -3
- package/__cjs/incremental/index.cjs.map +1 -1
- package/__cjs/incremental/index.d.cts +0 -1
- package/__cjs/incremental/types.d.cts +0 -9
- package/__cjs/invariantErrorCodes.cjs +62 -78
- package/__cjs/link/client-awareness/ClientAwarenessLink.cjs +1 -13
- 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/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/remove-typename/removeTypenameFromVariables.cjs +51 -50
- package/__cjs/link/remove-typename/removeTypenameFromVariables.cjs.map +1 -1
- package/__cjs/link/remove-typename/removeTypenameFromVariables.d.cts +3 -0
- package/__cjs/link/ws/index.cjs +1 -1
- package/__cjs/local-state/LocalState.cjs +14 -28
- package/__cjs/local-state/LocalState.cjs.map +1 -1
- package/__cjs/local-state/LocalState.d.cts +2 -3
- package/__cjs/masking/types.d.cts +1 -2
- package/__cjs/react/hooks/internal/useDeepMemo.cjs +0 -2
- package/__cjs/react/hooks/internal/useDeepMemo.cjs.map +1 -1
- package/__cjs/react/hooks/useApolloClient.cjs +1 -1
- package/__cjs/react/hooks/useApolloClient.cjs.map +1 -1
- package/__cjs/react/hooks/useApolloClient.d.cts +1 -1
- package/__cjs/react/hooks/useBackgroundQuery.cjs +3 -1
- package/__cjs/react/hooks/useBackgroundQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useFragment.cjs +87 -38
- package/__cjs/react/hooks/useFragment.cjs.map +1 -1
- package/__cjs/react/hooks/useFragment.d.cts +6 -65
- package/__cjs/react/hooks/useLazyQuery.cjs +0 -2
- package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useMutation.cjs +1 -7
- package/__cjs/react/hooks/useMutation.cjs.map +1 -1
- package/__cjs/react/hooks/useMutation.d.cts +1 -13
- package/__cjs/react/hooks/useQuery.cjs +4 -1
- package/__cjs/react/hooks/useQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useQuery.d.cts +1 -1
- package/__cjs/react/hooks/useQueryRefHandlers.cjs +3 -1
- package/__cjs/react/hooks/useQueryRefHandlers.cjs.map +1 -1
- package/__cjs/react/hooks/useReadQuery.cjs +3 -1
- 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 +7 -33
- package/__cjs/react/hooks/useSuspenseQuery.cjs +4 -4
- package/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
- package/__cjs/react/internal/cache/FragmentReference.cjs +22 -3
- package/__cjs/react/internal/cache/FragmentReference.cjs.map +1 -1
- package/__cjs/react/internal/cache/FragmentReference.d.cts +4 -2
- package/__cjs/react/internal/cache/QueryReference.cjs +0 -16
- package/__cjs/react/internal/cache/QueryReference.cjs.map +1 -1
- package/__cjs/react/internal/cache/QueryReference.d.cts +0 -5
- 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 +1 -41
- package/__cjs/react/query-preloader/createQueryPreloader.cjs.map +1 -1
- package/__cjs/react/ssr/useSSRQuery.cjs +0 -1
- 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 +4 -36
- package/__cjs/utilities/internal/DeepMerger.cjs.map +1 -1
- package/__cjs/utilities/internal/DeepMerger.d.cts +4 -20
- package/__cjs/utilities/internal/bindCacheKey.cjs +21 -0
- package/__cjs/utilities/internal/bindCacheKey.cjs.map +1 -0
- package/__cjs/utilities/internal/bindCacheKey.d.cts +15 -0
- package/__cjs/utilities/internal/compact.cjs +1 -1
- package/__cjs/utilities/internal/compact.cjs.map +1 -1
- package/__cjs/utilities/internal/constants.cjs +1 -17
- package/__cjs/utilities/internal/constants.cjs.map +1 -1
- package/__cjs/utilities/internal/constants.d.cts +0 -16
- package/__cjs/utilities/internal/getStoreKeyName.cjs +0 -1
- package/__cjs/utilities/internal/getStoreKeyName.cjs.map +1 -1
- package/__cjs/utilities/internal/index.cjs +4 -8
- package/__cjs/utilities/internal/index.cjs.map +1 -1
- package/__cjs/utilities/internal/index.d.cts +2 -4
- package/__cjs/utilities/internal/memoize.cjs +2 -2
- package/__cjs/utilities/internal/memoize.cjs.map +1 -1
- package/__cjs/utilities/internal/memoize.d.cts +1 -2
- package/__cjs/version.cjs +1 -1
- package/__cjs/version.cjs.map +1 -1
- package/cache/core/cache.d.ts +25 -94
- package/cache/core/cache.js +51 -172
- package/cache/core/cache.js.map +1 -1
- package/cache/core/types/Cache.d.ts +17 -49
- 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 +4 -6
- package/cache/inmemory/entityStore.js.map +1 -1
- package/cache/inmemory/fragmentRegistry.js +6 -1
- package/cache/inmemory/fragmentRegistry.js.map +1 -1
- package/cache/inmemory/helpers.d.ts +1 -1
- package/cache/inmemory/inMemoryCache.d.ts +0 -1
- package/cache/inmemory/inMemoryCache.js +1 -15
- 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 +6 -30
- package/cache/inmemory/policies.js +7 -45
- 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 +0 -2
- package/cache/inmemory/types.js.map +1 -1
- package/cache/inmemory/writeToStore.d.ts +1 -2
- package/cache/inmemory/writeToStore.js +12 -26
- package/cache/inmemory/writeToStore.js.map +1 -1
- package/core/ApolloClient.d.ts +17 -143
- package/core/ApolloClient.js +50 -32
- package/core/ApolloClient.js.map +1 -1
- package/core/ObservableQuery.d.ts +0 -1
- package/core/ObservableQuery.js +131 -165
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryInfo.d.ts +1 -2
- package/core/QueryInfo.js +2 -10
- package/core/QueryInfo.js.map +1 -1
- package/core/QueryManager.d.ts +2 -18
- package/core/QueryManager.js +25 -47
- package/core/QueryManager.js.map +1 -1
- package/incremental/handlers/defer20220824.d.ts +7 -15
- package/incremental/handlers/defer20220824.js +19 -44
- package/incremental/handlers/defer20220824.js.map +1 -1
- package/incremental/handlers/notImplemented.js +1 -1
- package/incremental/handlers/notImplemented.js.map +1 -1
- package/incremental/index.d.ts +0 -1
- package/incremental/index.js +2 -3
- package/incremental/index.js.map +1 -1
- package/incremental/types.d.ts +0 -9
- package/incremental/types.js.map +1 -1
- package/invariantErrorCodes.js +62 -78
- package/link/client-awareness/ClientAwarenessLink.d.ts +1 -1
- package/link/client-awareness/ClientAwarenessLink.js +1 -13
- package/link/client-awareness/ClientAwarenessLink.js.map +1 -1
- package/link/core/ApolloLink.js +3 -3
- package/link/http/checkFetcher.js +1 -1
- package/link/http/parseAndCheckHttpResponse.js +1 -1
- package/link/persisted-queries/index.js +2 -2
- package/link/remove-typename/removeTypenameFromVariables.d.ts +3 -0
- package/link/remove-typename/removeTypenameFromVariables.js +51 -50
- package/link/remove-typename/removeTypenameFromVariables.js.map +1 -1
- package/link/ws/index.js +1 -1
- package/local-state/LocalState.d.ts +2 -3
- package/local-state/LocalState.js +14 -28
- package/local-state/LocalState.js.map +1 -1
- package/masking/types.d.ts +1 -2
- package/masking/types.js.map +1 -1
- package/package.json +1 -15
- package/react/hooks/internal/useDeepMemo.js +0 -2
- package/react/hooks/internal/useDeepMemo.js.map +1 -1
- package/react/hooks/useApolloClient.d.ts +1 -1
- package/react/hooks/useApolloClient.js +1 -1
- package/react/hooks/useApolloClient.js.map +1 -1
- package/react/hooks/useBackgroundQuery.js +3 -1
- package/react/hooks/useBackgroundQuery.js.map +1 -1
- package/react/hooks/useFragment.d.ts +6 -65
- package/react/hooks/useFragment.js +87 -38
- package/react/hooks/useFragment.js.map +1 -1
- package/react/hooks/useLazyQuery.js +0 -2
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/react/hooks/useMutation.d.ts +1 -13
- package/react/hooks/useMutation.js +1 -7
- package/react/hooks/useMutation.js.map +1 -1
- package/react/hooks/useQuery.js +4 -1
- package/react/hooks/useQuery.js.map +1 -1
- package/react/hooks/useQueryRefHandlers.js +3 -1
- package/react/hooks/useQueryRefHandlers.js.map +1 -1
- package/react/hooks/useReadQuery.js +3 -1
- 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 +7 -33
- 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 +0 -2
- package/react/hooks-compiled/internal/useDeepMemo.js.map +1 -1
- package/react/hooks-compiled/internal/useSuspenseHookCacheKey.js +2 -0
- package/react/hooks-compiled/internal/useSuspenseHookCacheKey.js.map +1 -1
- package/react/hooks-compiled/useApolloClient.d.ts +1 -1
- package/react/hooks-compiled/useApolloClient.js +1 -1
- package/react/hooks-compiled/useApolloClient.js.map +1 -1
- package/react/hooks-compiled/useBackgroundQuery.js +3 -1
- package/react/hooks-compiled/useBackgroundQuery.js.map +1 -1
- package/react/hooks-compiled/useFragment.d.ts +6 -65
- package/react/hooks-compiled/useFragment.js +88 -110
- package/react/hooks-compiled/useFragment.js.map +1 -1
- package/react/hooks-compiled/useLazyQuery.js +0 -2
- package/react/hooks-compiled/useLazyQuery.js.map +1 -1
- package/react/hooks-compiled/useLoadableQuery.js +75 -69
- package/react/hooks-compiled/useMutation.d.ts +1 -13
- package/react/hooks-compiled/useMutation.js +13 -5
- package/react/hooks-compiled/useMutation.js.map +1 -1
- package/react/hooks-compiled/useQuery.js +56 -44
- package/react/hooks-compiled/useQuery.js.map +1 -1
- package/react/hooks-compiled/useQueryRefHandlers.js +5 -1
- package/react/hooks-compiled/useQueryRefHandlers.js.map +1 -1
- package/react/hooks-compiled/useReadQuery.js +14 -77
- package/react/hooks-compiled/useReadQuery.js.map +1 -1
- package/react/hooks-compiled/useSubscription.js +93 -237
- package/react/hooks-compiled/useSubscription.js.map +1 -1
- package/react/hooks-compiled/useSuspenseFragment.d.ts +7 -33
- package/react/hooks-compiled/useSuspenseFragment.js +17 -17
- package/react/hooks-compiled/useSuspenseFragment.js.map +1 -1
- package/react/hooks-compiled/useSuspenseQuery.js +8 -4
- 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 +4 -2
- package/react/internal/cache/FragmentReference.js +22 -3
- package/react/internal/cache/FragmentReference.js.map +1 -1
- package/react/internal/cache/QueryReference.d.ts +0 -5
- package/react/internal/cache/QueryReference.js +0 -16
- 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 +1 -41
- package/react/query-preloader/createQueryPreloader.js.map +1 -1
- package/react/ssr/useSSRQuery.js +0 -1
- 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 +4 -20
- package/utilities/internal/DeepMerger.js +4 -36
- package/utilities/internal/DeepMerger.js.map +1 -1
- package/utilities/internal/bindCacheKey.d.ts +15 -0
- package/utilities/internal/bindCacheKey.js +18 -0
- package/utilities/internal/bindCacheKey.js.map +1 -0
- package/utilities/internal/compact.js +1 -1
- package/utilities/internal/compact.js.map +1 -1
- package/utilities/internal/constants.d.ts +0 -16
- package/utilities/internal/constants.js +0 -16
- package/utilities/internal/constants.js.map +1 -1
- package/utilities/internal/getStoreKeyName.js +0 -1
- package/utilities/internal/getStoreKeyName.js.map +1 -1
- package/utilities/internal/index.d.ts +2 -4
- package/utilities/internal/index.js +2 -3
- package/utilities/internal/index.js.map +1 -1
- package/utilities/internal/memoize.d.ts +1 -2
- package/utilities/internal/memoize.js +2 -2
- package/utilities/internal/memoize.js.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/__cjs/incremental/handlers/graphql17Alpha9.cjs +0 -222
- package/__cjs/incremental/handlers/graphql17Alpha9.cjs.map +0 -1
- package/__cjs/incremental/handlers/graphql17Alpha9.d.cts +0 -98
- package/__cjs/utilities/internal/combineLatestBatched.cjs +0 -71
- package/__cjs/utilities/internal/combineLatestBatched.cjs.map +0 -1
- package/__cjs/utilities/internal/combineLatestBatched.d.cts +0 -14
- package/__cjs/utilities/internal/mapObservableFragment.cjs +0 -27
- package/__cjs/utilities/internal/mapObservableFragment.cjs.map +0 -1
- package/__cjs/utilities/internal/mapObservableFragment.d.cts +0 -3
- package/__cjs/utilities/internal/ponyfills/FinalizationRegistry.cjs +0 -61
- package/__cjs/utilities/internal/ponyfills/FinalizationRegistry.cjs.map +0 -1
- package/__cjs/utilities/internal/ponyfills/FinalizationRegistry.d.cts +0 -11
- package/__cjs/utilities/internal/ponyfills/index.cjs +0 -6
- package/__cjs/utilities/internal/ponyfills/index.cjs.map +0 -1
- package/__cjs/utilities/internal/ponyfills/index.d.cts +0 -3
- package/__cjs/utilities/internal/ponyfills/index.react-native.cjs +0 -6
- package/__cjs/utilities/internal/ponyfills/index.react-native.cjs.map +0 -1
- package/__cjs/utilities/internal/ponyfills/index.react-native.d.cts +0 -2
- package/__cjs/utilities/internal/types/ExtensionsWithStreamDetails.cjs +0 -3
- package/__cjs/utilities/internal/types/ExtensionsWithStreamDetails.cjs.map +0 -1
- package/__cjs/utilities/internal/types/ExtensionsWithStreamDetails.d.cts +0 -24
- package/incremental/handlers/graphql17Alpha9.d.ts +0 -98
- package/incremental/handlers/graphql17Alpha9.js +0 -218
- package/incremental/handlers/graphql17Alpha9.js.map +0 -1
- package/legacyEntryPoints/utilities/internal/ponyfills/index.d.ts +0 -1
- package/legacyEntryPoints/utilities/internal/ponyfills/index.js +0 -1
- package/legacyEntryPoints/utilities/internal/ponyfills/ponyfills.cjs +0 -1
- package/legacyEntryPoints/utilities/internal/ponyfills/ponyfills.d.cts +0 -1
- package/utilities/internal/combineLatestBatched.d.ts +0 -14
- package/utilities/internal/combineLatestBatched.js +0 -68
- package/utilities/internal/combineLatestBatched.js.map +0 -1
- package/utilities/internal/mapObservableFragment.d.ts +0 -3
- package/utilities/internal/mapObservableFragment.js +0 -24
- package/utilities/internal/mapObservableFragment.js.map +0 -1
- package/utilities/internal/ponyfills/FinalizationRegistry.d.ts +0 -11
- package/utilities/internal/ponyfills/FinalizationRegistry.js +0 -57
- package/utilities/internal/ponyfills/FinalizationRegistry.js.map +0 -1
- package/utilities/internal/ponyfills/index.d.ts +0 -3
- package/utilities/internal/ponyfills/index.js +0 -3
- package/utilities/internal/ponyfills/index.js.map +0 -1
- package/utilities/internal/ponyfills/index.react-native.d.ts +0 -2
- package/utilities/internal/ponyfills/index.react-native.js +0 -2
- package/utilities/internal/ponyfills/index.react-native.js.map +0 -1
- package/utilities/internal/types/ExtensionsWithStreamDetails.d.ts +0 -24
- package/utilities/internal/types/ExtensionsWithStreamDetails.js +0 -2
- package/utilities/internal/types/ExtensionsWithStreamDetails.js.map +0 -1
|
@@ -16,37 +16,29 @@ export declare namespace Defer20220824Handler {
|
|
|
16
16
|
errors?: ReadonlyArray<GraphQLFormattedError>;
|
|
17
17
|
extensions?: Record<string, unknown>;
|
|
18
18
|
hasNext: boolean;
|
|
19
|
-
incremental?: ReadonlyArray<IncrementalResult<TData>>;
|
|
20
19
|
};
|
|
21
20
|
type SubsequentResult<TData = Record<string, unknown>> = {
|
|
21
|
+
data?: TData | null | undefined;
|
|
22
|
+
errors?: ReadonlyArray<GraphQLFormattedError>;
|
|
22
23
|
extensions?: Record<string, unknown>;
|
|
23
24
|
hasNext: boolean;
|
|
24
|
-
incremental?: Array<
|
|
25
|
+
incremental?: Array<IncrementalDeferPayload<TData>>;
|
|
25
26
|
};
|
|
26
|
-
type
|
|
27
|
-
|
|
27
|
+
type Chunk<TData extends Record<string, unknown>> = InitialResult<TData> | SubsequentResult<TData>;
|
|
28
|
+
type IncrementalDeferPayload<TData = Record<string, unknown>> = {
|
|
29
|
+
data?: TData | null | undefined;
|
|
28
30
|
errors?: ReadonlyArray<GraphQLFormattedError>;
|
|
29
31
|
extensions?: Record<string, unknown>;
|
|
30
32
|
path?: Incremental.Path;
|
|
31
33
|
label?: string;
|
|
32
34
|
};
|
|
33
|
-
type IncrementalStreamResult<TData = Array<unknown>> = {
|
|
34
|
-
errors?: ReadonlyArray<GraphQLFormattedError>;
|
|
35
|
-
items?: TData;
|
|
36
|
-
path?: Incremental.Path;
|
|
37
|
-
label?: string;
|
|
38
|
-
extensions?: Record<string, unknown>;
|
|
39
|
-
};
|
|
40
|
-
type IncrementalResult<TData = Record<string, unknown>> = IncrementalDeferResult<TData> | IncrementalStreamResult<TData>;
|
|
41
|
-
type Chunk<TData extends Record<string, unknown>> = InitialResult<TData> | SubsequentResult<TData>;
|
|
42
35
|
}
|
|
43
36
|
declare class DeferRequest<TData extends Record<string, unknown>> implements Incremental.IncrementalRequest<Defer20220824Handler.Chunk<TData>, TData> {
|
|
44
37
|
hasNext: boolean;
|
|
45
38
|
private errors;
|
|
46
39
|
private extensions;
|
|
47
40
|
private data;
|
|
48
|
-
private
|
|
49
|
-
private merge;
|
|
41
|
+
private mergeIn;
|
|
50
42
|
handle(cacheData: TData | DeepPartial<TData> | null | undefined, chunk: Defer20220824Handler.Chunk<TData>): FormattedExecutionResult<TData>;
|
|
51
43
|
}
|
|
52
44
|
/**
|
|
@@ -4,14 +4,9 @@ class DeferRequest {
|
|
|
4
4
|
errors = [];
|
|
5
5
|
extensions = {};
|
|
6
6
|
data = {};
|
|
7
|
-
|
|
8
|
-
// errors thrown for non-null array items. We stop processing future updates
|
|
9
|
-
// to these stream arrays to prevent creating sparse arrays or inserting
|
|
10
|
-
// `null` for an expected non-null value which could cause runtime crashes.
|
|
11
|
-
ignoredImpossibleStreamPaths = new Set();
|
|
12
|
-
merge(normalized, atPath) {
|
|
7
|
+
mergeIn(normalized, merger) {
|
|
13
8
|
if (normalized.data !== undefined) {
|
|
14
|
-
this.data =
|
|
9
|
+
this.data = merger.merge(this.data, normalized.data);
|
|
15
10
|
}
|
|
16
11
|
if (normalized.errors) {
|
|
17
12
|
this.errors.push(...normalized.errors);
|
|
@@ -24,45 +19,27 @@ class DeferRequest {
|
|
|
24
19
|
cacheData = this.data, chunk) {
|
|
25
20
|
this.hasNext = chunk.hasNext;
|
|
26
21
|
this.data = cacheData;
|
|
22
|
+
this.mergeIn(chunk, new DeepMerger());
|
|
27
23
|
if (hasIncrementalChunks(chunk)) {
|
|
24
|
+
const merger = new DeepMerger();
|
|
28
25
|
for (const incremental of chunk.incremental) {
|
|
29
|
-
|
|
30
|
-
if (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
let { data, path, errors, extensions } = incremental;
|
|
27
|
+
if (data && path) {
|
|
28
|
+
for (let i = path.length - 1; i >= 0; --i) {
|
|
29
|
+
const key = path[i];
|
|
30
|
+
const isNumericKey = !isNaN(+key);
|
|
31
|
+
const parent = isNumericKey ? [] : {};
|
|
32
|
+
parent[key] = data;
|
|
33
|
+
data = parent;
|
|
37
34
|
}
|
|
38
|
-
if (this.ignoredImpossibleStreamPaths.has(stringPath)) {
|
|
39
|
-
this.merge({ errors, extensions });
|
|
40
|
-
continue;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
let data = "items" in incremental ? incremental.items
|
|
44
|
-
// Ensure `data: null` isn't merged for `@defer` responses by
|
|
45
|
-
// falling back to `undefined`
|
|
46
|
-
: "data" in incremental ? incremental.data ?? undefined
|
|
47
|
-
: undefined;
|
|
48
|
-
if (path && typeof path.at(-1) === "number" && Array.isArray(data)) {
|
|
49
|
-
const startingIdx = path.at(-1);
|
|
50
|
-
data.forEach((item, idx) => {
|
|
51
|
-
this.merge({ data: item }, [
|
|
52
|
-
...path.slice(0, -1),
|
|
53
|
-
startingIdx + idx,
|
|
54
|
-
]);
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
this.merge({ data }, path);
|
|
59
35
|
}
|
|
60
|
-
this.
|
|
36
|
+
this.mergeIn({
|
|
37
|
+
errors,
|
|
38
|
+
extensions,
|
|
39
|
+
data: data ? data : undefined,
|
|
40
|
+
}, merger);
|
|
61
41
|
}
|
|
62
42
|
}
|
|
63
|
-
else {
|
|
64
|
-
this.merge(chunk);
|
|
65
|
-
}
|
|
66
43
|
const result = { data: this.data };
|
|
67
44
|
if (isNonEmptyArray(this.errors)) {
|
|
68
45
|
result.errors = this.errors;
|
|
@@ -89,9 +66,7 @@ export class Defer20220824Handler {
|
|
|
89
66
|
}
|
|
90
67
|
};
|
|
91
68
|
if (this.isIncrementalResult(result)) {
|
|
92
|
-
|
|
93
|
-
push(result);
|
|
94
|
-
}
|
|
69
|
+
push(result);
|
|
95
70
|
if (hasIncrementalChunks(result)) {
|
|
96
71
|
result.incremental.forEach(push);
|
|
97
72
|
}
|
|
@@ -101,7 +76,7 @@ export class Defer20220824Handler {
|
|
|
101
76
|
}
|
|
102
77
|
}
|
|
103
78
|
prepareRequest(request) {
|
|
104
|
-
if (hasDirectives(["defer"
|
|
79
|
+
if (hasDirectives(["defer"], request.query)) {
|
|
105
80
|
const context = request.context ?? {};
|
|
106
81
|
const http = (context.http ??= {});
|
|
107
82
|
http.accept = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defer20220824.js","sourceRoot":"","sources":["../../../src/incremental/handlers/defer20220824.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,UAAU,EACV,aAAa,EACb,eAAe,GAChB,MAAM,mCAAmC,CAAC;AAqD3C,MAAM,YAAY;IAIT,OAAO,GAAG,IAAI,CAAC;IAEd,MAAM,GAAiC,EAAE,CAAC;IAC1C,UAAU,GAAwB,EAAE,CAAC;IACrC,IAAI,GAAQ,EAAE,CAAC;IACvB,yEAAyE;IACzE,4EAA4E;IAC5E,wEAAwE;IACxE,2EAA2E;IACnE,4BAA4B,GAAG,IAAI,GAAG,EAAU,CAAC;IAEjD,KAAK,CACX,UAA2C,EAC3C,MAA0C;QAE1C,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAClC,IAAI,CAAC,IAAI,GAAG,IAAI,UAAU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AAoC;gBACpC,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;aACvB,CAAC;QACJ,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,YAAY,CAAwC,CAEnD;QACC,OAAO,IAAI,YAAY,EAAS,CAAC;IACnC,CAAC;CACF;AAED,iCAAiC;AACjC,MAAM,UAAU,oBAAoB,CAClC,MAA2B;IAE3B,OAAO,eAAe,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAC7C,CAAC","sourcesContent":["import type {\n DocumentNode,\n FormattedExecutionResult,\n GraphQLFormattedError,\n} from \"graphql\";\n\nimport type { ApolloLink } from \"@apollo/client/link\";\nimport type { DeepPartial, HKT } from \"@apollo/client/utilities\";\nimport {\n DeepMerger,\n hasDirectives,\n isNonEmptyArray,\n} from \"@apollo/client/utilities/internal\";\n\nimport type { Incremental } from \"../types.js\";\n\nexport declare namespace Defer20220824Handler {\n interface Defer20220824Result extends HKT {\n arg1: unknown; // TData\n arg2: unknown; // TExtensions\n return: Defer20220824Handler.Chunk<Record<string, unknown>>;\n }\n export interface TypeOverrides {\n AdditionalApolloLinkResultTypes: Defer20220824Result;\n }\n\n export type InitialResult<TData = Record<string, unknown>> = {\n data?: TData | null | undefined;\n errors?: ReadonlyArray<GraphQLFormattedError>;\n extensions?: Record<string, unknown>;\n hasNext: boolean;\n incremental?: ReadonlyArray<IncrementalResult<TData>>;\n };\n\n export type SubsequentResult<TData = Record<string, unknown>> = {\n extensions?: Record<string, unknown>;\n hasNext: boolean;\n incremental?: Array<IncrementalResult<TData>>;\n };\n\n export type IncrementalDeferResult<TData = Record<string, unknown>> = {\n data?: TData | null;\n errors?: ReadonlyArray<GraphQLFormattedError>;\n extensions?: Record<string, unknown>;\n path?: Incremental.Path;\n label?: string;\n };\n\n export type IncrementalStreamResult<TData = Array<unknown>> = {\n errors?: ReadonlyArray<GraphQLFormattedError>;\n items?: TData;\n path?: Incremental.Path;\n label?: string;\n extensions?: Record<string, unknown>;\n };\n\n export type IncrementalResult<TData = Record<string, unknown>> =\n | IncrementalDeferResult<TData>\n | IncrementalStreamResult<TData>;\n\n export type Chunk<TData extends Record<string, unknown>> =\n | InitialResult<TData>\n | SubsequentResult<TData>;\n}\n\nclass DeferRequest<TData extends Record<string, unknown>>\n implements\n Incremental.IncrementalRequest<Defer20220824Handler.Chunk<TData>, TData>\n{\n public hasNext = true;\n\n private errors: Array<GraphQLFormattedError> = [];\n private extensions: Record<string, any> = {};\n private data: any = {};\n // This tracks paths for `@stream` arrays that returns items: null due to\n // errors thrown for non-null array items. We stop processing future updates\n // to these stream arrays to prevent creating sparse arrays or inserting\n // `null` for an expected non-null value which could cause runtime crashes.\n private ignoredImpossibleStreamPaths = new Set<string>();\n\n private merge(\n normalized: FormattedExecutionResult<TData>,\n atPath?: DeepMerger.MergeOptions[\"atPath\"]\n ) {\n if (normalized.data !== undefined) {\n this.data = new DeepMerger({ arrayMerge: \"truncate\" }).merge(\n this.data,\n normalized.data,\n { atPath }\n );\n }\n if (normalized.errors) {\n this.errors.push(...normalized.errors);\n }\n Object.assign(this.extensions, normalized.extensions);\n }\n\n handle(\n // we'll get `undefined` here in case of a `no-cache` fetch policy,\n // so we'll continue with the last value this request had accumulated\n cacheData: TData | DeepPartial<TData> | null | undefined = this.data,\n chunk: Defer20220824Handler.Chunk<TData>\n ): FormattedExecutionResult<TData> {\n this.hasNext = chunk.hasNext;\n this.data = cacheData;\n\n if (hasIncrementalChunks(chunk)) {\n for (const incremental of chunk.incremental) {\n const { path, errors, extensions } = incremental;\n\n if (\"items\" in incremental) {\n // Remove the array index from the end of the array since each future\n // chunk sends a different array index. This normalizes the path to\n // ensure we ignore updates to this field if `items` is `null`.\n const stringPath = path?.slice(0, -1).join(\".\") ?? \"\";\n\n if (incremental.items === null) {\n this.ignoredImpossibleStreamPaths.add(stringPath);\n }\n\n if (this.ignoredImpossibleStreamPaths.has(stringPath)) {\n this.merge({ errors, extensions });\n continue;\n }\n }\n\n let data: any =\n \"items\" in incremental ? incremental.items\n // Ensure `data: null` isn't merged for `@defer` responses by\n // falling back to `undefined`\n : \"data\" in incremental ? incremental.data ?? undefined\n : undefined;\n\n if (path && typeof path.at(-1) === \"number\" && Array.isArray(data)) {\n const startingIdx = path.at(-1) as number;\n data.forEach((item, idx) => {\n this.merge({ data: item }, [\n ...path!.slice(0, -1),\n startingIdx + idx,\n ]);\n });\n } else {\n this.merge({ data }, path);\n }\n\n this.merge({ errors, extensions });\n }\n } else {\n this.merge(chunk);\n }\n\n const result: FormattedExecutionResult<TData> = { data: this.data };\n\n if (isNonEmptyArray(this.errors)) {\n result.errors = this.errors;\n }\n\n if (Object.keys(this.extensions).length > 0) {\n result.extensions = this.extensions;\n }\n\n return result;\n }\n}\n\n/**\n * This handler implements the `@defer` directive as specified in this historical commit:\n * https://github.com/graphql/graphql-spec/tree/48cf7263a71a683fab03d45d309fd42d8d9a6659/spec\n */\nexport class Defer20220824Handler\n implements Incremental.Handler<Defer20220824Handler.Chunk<any>>\n{\n isIncrementalResult(\n result: Record<string, any>\n ): result is\n | Defer20220824Handler.SubsequentResult\n | Defer20220824Handler.InitialResult {\n return \"hasNext\" in result;\n }\n\n extractErrors(result: ApolloLink.Result<any>) {\n const acc: GraphQLFormattedError[] = [];\n const push = ({\n errors,\n }: {\n errors?: ReadonlyArray<GraphQLFormattedError>;\n }) => {\n if (errors) {\n acc.push(...errors);\n }\n };\n if (this.isIncrementalResult(result)) {\n if (\"errors\" in result) {\n push(result);\n }\n if (hasIncrementalChunks(result)) {\n result.incremental.forEach(push);\n }\n }\n if (acc.length) {\n return acc;\n }\n }\n\n prepareRequest(request: ApolloLink.Request): ApolloLink.Request {\n if (hasDirectives([\"defer\", \"stream\"], request.query)) {\n const context = request.context ?? {};\n const http = (context.http ??= {});\n http.accept = [\n \"multipart/mixed;deferSpec=20220824\",\n ...(http.accept || []),\n ];\n }\n\n return request;\n }\n startRequest<TData extends Record<string, unknown>>(_: {\n query: DocumentNode;\n }) {\n return new DeferRequest<TData>();\n }\n}\n\n// only exported for use in tests\nexport function hasIncrementalChunks(\n result: Record<string, any>\n): result is Required<Defer20220824Handler.SubsequentResult> {\n return isNonEmptyArray(result.incremental);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"defer20220824.js","sourceRoot":"","sources":["../../../src/incremental/handlers/defer20220824.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,UAAU,EACV,aAAa,EACb,eAAe,GAChB,MAAM,mCAAmC,CAAC;AA0C3C,MAAM,YAAY;IAIT,OAAO,GAAG,IAAI,CAAC;IAEd,MAAM,GAAiC,EAAE,CAAC;IAC1C,UAAU,GAAwB,EAAE,CAAC;IACrC,IAAI,GAAQ,EAAE,CAAC;IAEf,OAAO,CACb,UAA2C,EAC3C,MAAyB;QAEzB,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAClC,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;QACvD,CAAC;QACD,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC;YACtB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;QACzC,CAAC;QACD,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IACxD,CAAC;IAED,MAAM;IACJ,mEAAmE;IACnE,qEAAqE;IACrE,YAA2D,IAAI,CAAC,IAAI,EACpE,KAAwC;QAExC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;QAEtB,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,UAAU,EAAE,CAAC,CAAC;QAEtC,IAAI,oBAAoB,CAAC,KAAK,CAAC,EAAE,CAAC;YAChC,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE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AC;AAC7C,CAAC","sourcesContent":["import type {\n DocumentNode,\n FormattedExecutionResult,\n GraphQLFormattedError,\n} from \"graphql\";\n\nimport type { ApolloLink } from \"@apollo/client/link\";\nimport type { DeepPartial, HKT } from \"@apollo/client/utilities\";\nimport {\n DeepMerger,\n hasDirectives,\n isNonEmptyArray,\n} from \"@apollo/client/utilities/internal\";\n\nimport type { Incremental } from \"../types.js\";\n\nexport declare namespace Defer20220824Handler {\n interface Defer20220824Result extends HKT {\n arg1: unknown; // TData\n arg2: unknown; // TExtensions\n return: Defer20220824Handler.Chunk<Record<string, unknown>>;\n }\n export interface TypeOverrides {\n AdditionalApolloLinkResultTypes: Defer20220824Result;\n }\n\n export type InitialResult<TData = Record<string, unknown>> = {\n data?: TData | null | undefined;\n errors?: ReadonlyArray<GraphQLFormattedError>;\n extensions?: Record<string, unknown>;\n hasNext: boolean;\n };\n\n export type SubsequentResult<TData = Record<string, unknown>> = {\n data?: TData | null | undefined;\n errors?: ReadonlyArray<GraphQLFormattedError>;\n extensions?: Record<string, unknown>;\n hasNext: boolean;\n incremental?: Array<IncrementalDeferPayload<TData>>;\n };\n\n export type Chunk<TData extends Record<string, unknown>> =\n | InitialResult<TData>\n | SubsequentResult<TData>;\n\n export type IncrementalDeferPayload<TData = Record<string, unknown>> = {\n data?: TData | null | undefined;\n errors?: ReadonlyArray<GraphQLFormattedError>;\n extensions?: Record<string, unknown>;\n path?: Incremental.Path;\n label?: string;\n };\n}\n\nclass DeferRequest<TData extends Record<string, unknown>>\n implements\n Incremental.IncrementalRequest<Defer20220824Handler.Chunk<TData>, TData>\n{\n public hasNext = true;\n\n private errors: Array<GraphQLFormattedError> = [];\n private extensions: Record<string, any> = {};\n private data: any = {};\n\n private mergeIn(\n normalized: FormattedExecutionResult<TData>,\n merger: DeepMerger<any[]>\n ) {\n if (normalized.data !== undefined) {\n this.data = merger.merge(this.data, normalized.data);\n }\n if (normalized.errors) {\n this.errors.push(...normalized.errors);\n }\n Object.assign(this.extensions, normalized.extensions);\n }\n\n handle(\n // we'll get `undefined` here in case of a `no-cache` fetch policy,\n // so we'll continue with the last value this request had accumulated\n cacheData: TData | DeepPartial<TData> | null | undefined = this.data,\n chunk: Defer20220824Handler.Chunk<TData>\n ): FormattedExecutionResult<TData> {\n this.hasNext = chunk.hasNext;\n this.data = cacheData;\n\n this.mergeIn(chunk, new DeepMerger());\n\n if (hasIncrementalChunks(chunk)) {\n const merger = new DeepMerger();\n for (const incremental of chunk.incremental) {\n let { data, path, errors, extensions } = incremental;\n if (data && path) {\n for (let i = path.length - 1; i >= 0; --i) {\n const key = path[i];\n const isNumericKey = !isNaN(+key);\n const parent: Record<string | number, any> = isNumericKey ? [] : {};\n parent[key] = data;\n data = parent as typeof data;\n }\n }\n this.mergeIn(\n {\n errors,\n extensions,\n data: data ? (data as TData) : undefined,\n },\n merger\n );\n }\n }\n\n const result: FormattedExecutionResult<TData> = { data: this.data };\n\n if (isNonEmptyArray(this.errors)) {\n result.errors = this.errors;\n }\n\n if (Object.keys(this.extensions).length > 0) {\n result.extensions = this.extensions;\n }\n\n return result;\n }\n}\n\n/**\n * This handler implements the `@defer` directive as specified in this historical commit:\n * https://github.com/graphql/graphql-spec/tree/48cf7263a71a683fab03d45d309fd42d8d9a6659/spec\n */\nexport class Defer20220824Handler\n implements Incremental.Handler<Defer20220824Handler.Chunk<any>>\n{\n isIncrementalResult(\n result: Record<string, any>\n ): result is\n | Defer20220824Handler.SubsequentResult\n | Defer20220824Handler.InitialResult {\n return \"hasNext\" in result;\n }\n\n extractErrors(result: ApolloLink.Result<any>) {\n const acc: GraphQLFormattedError[] = [];\n const push = ({\n errors,\n }: {\n errors?: ReadonlyArray<GraphQLFormattedError>;\n }) => {\n if (errors) {\n acc.push(...errors);\n }\n };\n if (this.isIncrementalResult(result)) {\n push(result);\n if (hasIncrementalChunks(result)) {\n result.incremental.forEach(push);\n }\n }\n if (acc.length) {\n return acc;\n }\n }\n\n prepareRequest(request: ApolloLink.Request): ApolloLink.Request {\n if (hasDirectives([\"defer\"], request.query)) {\n const context = request.context ?? {};\n const http = (context.http ??= {});\n http.accept = [\n \"multipart/mixed;deferSpec=20220824\",\n ...(http.accept || []),\n ];\n }\n\n return request;\n }\n startRequest<TData extends Record<string, unknown>>(_: {\n query: DocumentNode;\n }) {\n return new DeferRequest<TData>();\n }\n}\n\n// only exported for use in tests\nexport function hasIncrementalChunks(\n result: Record<string, any>\n): result is Required<Defer20220824Handler.SubsequentResult> {\n return isNonEmptyArray(result.incremental);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notImplemented.js","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\"
|
|
1
|
+
{"version":3,"file":"notImplemented.js","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` is 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,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAA8B,CAA9B,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,CAAiE;AACjE,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAA0B,CAA1B,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,CAA8D;AAe9D,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAa,CAAb,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA;IACE,CAAF,CAAA,CAAA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iB,CAAjB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiC;AACjC;"}
|
package/incremental/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export type { Incremental } from "./types.js";
|
|
2
2
|
export { NotImplementedHandler } from "./handlers/notImplemented.js";
|
|
3
3
|
export { Defer20220824Handler, Defer20220824Handler as GraphQL17Alpha2Handler, } from "./handlers/defer20220824.js";
|
|
4
|
-
export { GraphQL17Alpha9Handler } from "./handlers/graphql17Alpha9.js";
|
|
5
4
|
//# sourceMappingURL=index.d.ts.map
|
package/incremental/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { NotImplementedHandler } from "./handlers/notImplemented.js";
|
|
2
|
-
export { Defer20220824Handler, Defer20220824Handler as GraphQL17Alpha2Handler
|
|
3
|
-
|
|
4
|
-
//# sourceMappingURL=index.js.map
|
|
2
|
+
export { Defer20220824Handler, Defer20220824Handler as GraphQL17Alpha2Handler } from "./handlers/defer20220824.js";
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
package/incremental/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","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,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAsC,CAAtC,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,CAAoE;SAElE,CADF,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAEE,CAFF,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAE0B,CAF1B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,SAGO,CAHP,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;"}
|
package/incremental/types.d.ts
CHANGED
|
@@ -20,14 +20,5 @@ 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
|
-
}
|
|
32
23
|
}
|
|
33
24
|
//# sourceMappingURL=types.d.ts.map
|
package/incremental/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/incremental/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n DocumentNode,\n FormattedExecutionResult,\n GraphQLFormattedError,\n} from \"graphql\";\n\nimport type { ApolloLink } from \"@apollo/client/link\";\nimport type { DeepPartial } from \"@apollo/client/utilities\";\n\nexport declare namespace Incremental {\n export type Path = ReadonlyArray<string | number>;\n\n /** @internal */\n export interface Handler<\n Chunk extends Record<string, unknown> = Record<string, unknown>,\n > {\n isIncrementalResult: (result: ApolloLink.Result<any>) => result is Chunk;\n prepareRequest: (request: ApolloLink.Request) => ApolloLink.Request;\n extractErrors: (\n result: ApolloLink.Result<any>\n ) => readonly GraphQLFormattedError[] | undefined | void;\n startRequest: <TData extends Record<string, unknown>>(request: {\n query: DocumentNode;\n }) => IncrementalRequest<Chunk, TData>;\n }\n\n export interface IncrementalRequest<\n Chunk extends Record<string, unknown>,\n TData,\n > {\n hasNext: boolean;\n handle: (\n cacheData: TData | DeepPartial<TData> | undefined | null,\n chunk: Chunk\n ) => FormattedExecutionResult<TData>;\n }\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/incremental/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n DocumentNode,\n FormattedExecutionResult,\n GraphQLFormattedError,\n} from \"graphql\";\n\nimport type { ApolloLink } from \"@apollo/client/link\";\nimport type { DeepPartial } from \"@apollo/client/utilities\";\n\nexport declare namespace Incremental {\n export type Path = ReadonlyArray<string | number>;\n\n /** @internal */\n export interface Handler<\n Chunk extends Record<string, unknown> = Record<string, unknown>,\n > {\n isIncrementalResult: (result: ApolloLink.Result<any>) => result is Chunk;\n prepareRequest: (request: ApolloLink.Request) => ApolloLink.Request;\n extractErrors: (\n result: ApolloLink.Result<any>\n ) => readonly GraphQLFormattedError[] | undefined | void;\n startRequest: <TData extends Record<string, unknown>>(request: {\n query: DocumentNode;\n }) => IncrementalRequest<Chunk, TData>;\n }\n\n export interface IncrementalRequest<\n Chunk extends Record<string, unknown>,\n TData,\n > {\n hasNext: boolean;\n handle: (\n cacheData: TData | DeepPartial<TData> | undefined | null,\n chunk: Chunk\n ) => FormattedExecutionResult<TData>;\n }\n}\n"]}
|