@apollo/client 4.0.0-rc.4 → 4.0.0-rc.6
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 +63 -0
- package/README.md +40 -40
- package/__cjs/cache/core/cache.cjs +4 -12
- package/__cjs/cache/core/cache.cjs.map +1 -1
- package/__cjs/cache/core/cache.d.cts +96 -66
- package/__cjs/cache/core/types/Cache.cjs +0 -4
- package/__cjs/cache/core/types/Cache.cjs.map +1 -1
- package/__cjs/cache/core/types/Cache.d.cts +200 -15
- package/__cjs/cache/{core/types/DataProxy.cjs → deprecated.cjs} +1 -1
- package/__cjs/cache/deprecated.cjs.map +1 -0
- package/__cjs/cache/deprecated.d.cts +6 -0
- package/__cjs/cache/index.cjs.map +1 -1
- package/__cjs/cache/index.d.cts +2 -2
- package/__cjs/cache/inmemory/entityStore.cjs +28 -31
- package/__cjs/cache/inmemory/entityStore.cjs.map +1 -1
- package/__cjs/cache/inmemory/entityStore.d.cts +18 -17
- package/__cjs/cache/inmemory/inMemoryCache.cjs +1 -1
- package/__cjs/cache/inmemory/inMemoryCache.cjs.map +1 -1
- package/__cjs/cache/inmemory/inMemoryCache.d.cts +4 -4
- package/__cjs/cache/inmemory/key-extractor.cjs +1 -1
- package/__cjs/cache/inmemory/policies.cjs +4 -4
- package/__cjs/cache/inmemory/policies.cjs.map +1 -1
- package/__cjs/cache/inmemory/policies.d.cts +3 -2
- package/__cjs/cache/inmemory/readFromStore.cjs +2 -2
- package/__cjs/cache/inmemory/types.d.cts +1 -1
- package/__cjs/cache/inmemory/writeToStore.cjs +4 -4
- package/__cjs/cache/inmemory/writeToStore.cjs.map +1 -1
- package/__cjs/cache/inmemory/writeToStore.d.cts +1 -1
- package/__cjs/core/ApolloClient.cjs +137 -117
- package/__cjs/core/ApolloClient.cjs.map +1 -1
- package/__cjs/core/ApolloClient.d.cts +790 -183
- package/__cjs/core/ObservableQuery.cjs +50 -20
- package/__cjs/core/ObservableQuery.cjs.map +1 -1
- package/__cjs/core/ObservableQuery.d.cts +184 -68
- package/__cjs/core/QueryInfo.cjs.map +1 -1
- package/__cjs/core/QueryInfo.d.cts +5 -4
- package/__cjs/core/QueryManager.cjs +15 -13
- package/__cjs/core/QueryManager.cjs.map +1 -1
- package/__cjs/core/QueryManager.d.cts +17 -17
- package/__cjs/core/deprecated.cjs +3 -0
- package/__cjs/core/deprecated.cjs.map +1 -0
- package/__cjs/core/deprecated.d.cts +29 -0
- package/__cjs/core/index.cjs.map +1 -1
- package/__cjs/core/index.d.cts +9 -5
- package/__cjs/core/types.d.cts +81 -104
- package/__cjs/core/watchQueryOptions.d.cts +8 -297
- package/__cjs/dev/setErrorMessageHandler.cjs.map +1 -1
- package/__cjs/dev/setErrorMessageHandler.d.cts +4 -4
- package/__cjs/errors/CombinedGraphQLErrors.cjs +59 -11
- package/__cjs/errors/CombinedGraphQLErrors.cjs.map +1 -1
- package/__cjs/errors/CombinedGraphQLErrors.d.cts +146 -11
- package/__cjs/errors/CombinedProtocolErrors.cjs +48 -1
- package/__cjs/errors/CombinedProtocolErrors.cjs.map +1 -1
- package/__cjs/errors/CombinedProtocolErrors.d.cts +126 -2
- package/__cjs/errors/LinkError.cjs +45 -2
- package/__cjs/errors/LinkError.cjs.map +1 -1
- package/__cjs/errors/LinkError.d.cts +45 -2
- package/__cjs/errors/LocalStateError.cjs +35 -5
- package/__cjs/errors/LocalStateError.cjs.map +1 -1
- package/__cjs/errors/LocalStateError.d.cts +41 -5
- package/__cjs/errors/ServerError.cjs +50 -8
- package/__cjs/errors/ServerError.cjs.map +1 -1
- package/__cjs/errors/ServerError.d.cts +70 -11
- package/__cjs/errors/ServerParseError.cjs +45 -8
- package/__cjs/errors/ServerParseError.cjs.map +1 -1
- package/__cjs/errors/ServerParseError.d.cts +71 -16
- package/__cjs/errors/UnconventionalError.cjs +46 -2
- package/__cjs/errors/UnconventionalError.cjs.map +1 -1
- package/__cjs/errors/UnconventionalError.d.cts +46 -2
- package/__cjs/incremental/handlers/notImplemented.cjs +1 -1
- package/__cjs/invariantErrorCodes.cjs +72 -80
- package/__cjs/link/batch/batchLink.cjs.map +1 -1
- package/__cjs/link/batch-http/batchHttpLink.cjs +2 -2
- package/__cjs/link/batch-http/batchHttpLink.cjs.map +1 -1
- package/__cjs/link/client-awareness/ClientAwarenessLink.cjs.map +1 -1
- package/__cjs/link/client-awareness/ClientAwarenessLink.d.cts +4 -4
- package/__cjs/link/context/index.cjs +1 -1
- package/__cjs/link/context/index.cjs.map +1 -1
- package/__cjs/link/context/index.d.cts +1 -1
- package/__cjs/link/core/ApolloLink.cjs +2 -2
- package/__cjs/link/core/types.d.cts +2 -2
- package/__cjs/link/error/index.cjs.map +1 -1
- package/__cjs/link/error/index.d.cts +16 -1
- package/__cjs/link/http/HttpLink.cjs.map +1 -1
- package/__cjs/link/http/HttpLink.d.cts +13 -2
- package/__cjs/link/http/checkFetcher.cjs +1 -1
- package/__cjs/link/http/parseAndCheckHttpResponse.cjs +1 -1
- package/__cjs/link/http/serializeFetchParameter.cjs +1 -1
- package/__cjs/link/persisted-queries/index.cjs +2 -2
- package/__cjs/link/persisted-queries/index.cjs.map +1 -1
- package/__cjs/link/persisted-queries/index.d.cts +11 -11
- package/__cjs/link/retry/delayFunction.cjs.map +1 -1
- package/__cjs/link/retry/delayFunction.d.cts +1 -1
- package/__cjs/link/retry/retryFunction.cjs.map +1 -1
- package/__cjs/link/retry/retryFunction.d.cts +1 -1
- package/__cjs/link/retry/retryLink.cjs.map +1 -1
- package/__cjs/link/schema/index.cjs.map +1 -1
- package/__cjs/link/utils/validateOperation.cjs +1 -1
- package/__cjs/link/ws/index.cjs.map +1 -1
- package/__cjs/local-state/LocalState.cjs +55 -9
- package/__cjs/local-state/LocalState.cjs.map +1 -1
- package/__cjs/local-state/LocalState.d.cts +94 -0
- package/__cjs/masking/GraphQLCodegenDataMasking.d.cts +6 -7
- package/__cjs/masking/internal/types.d.cts +70 -70
- package/__cjs/masking/maskDefinition.cjs +2 -2
- package/__cjs/masking/maskFragment.cjs +2 -2
- package/__cjs/masking/maskOperation.cjs +1 -1
- package/__cjs/masking/utils.cjs +3 -3
- package/__cjs/react/context/ApolloContext.cjs +1 -1
- package/__cjs/react/context/ApolloProvider.cjs +1 -1
- package/__cjs/react/hooks/internal/useDeepMemo.cjs +0 -3
- package/__cjs/react/hooks/internal/useDeepMemo.cjs.map +1 -1
- package/__cjs/react/hooks/internal/validateSuspenseHookOptions.cjs.map +1 -1
- package/__cjs/react/hooks/internal/validateSuspenseHookOptions.d.cts +2 -2
- package/__cjs/react/hooks/internal/wrapHook.cjs +1 -0
- package/__cjs/react/hooks/internal/wrapHook.cjs.map +1 -1
- package/__cjs/react/hooks/internal/wrapHook.d.cts +8 -7
- package/__cjs/react/hooks/useApolloClient.cjs +2 -2
- package/__cjs/react/hooks/useApolloClient.cjs.map +1 -1
- package/__cjs/react/hooks/useApolloClient.d.cts +2 -2
- package/__cjs/react/hooks/useBackgroundQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useBackgroundQuery.d.cts +814 -82
- package/__cjs/react/hooks/useFragment.cjs +11 -9
- package/__cjs/react/hooks/useFragment.cjs.map +1 -1
- package/__cjs/react/hooks/useFragment.d.cts +53 -2
- package/__cjs/react/hooks/useLazyQuery.cjs +0 -38
- package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useLazyQuery.d.cts +313 -119
- package/__cjs/react/hooks/useLoadableQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useLoadableQuery.d.cts +230 -44
- package/__cjs/react/hooks/useMutation.cjs +6 -7
- package/__cjs/react/hooks/useMutation.cjs.map +1 -1
- package/__cjs/react/hooks/useMutation.d.cts +57 -17
- package/__cjs/react/hooks/useQuery.cjs +1 -35
- package/__cjs/react/hooks/useQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useQuery.d.cts +407 -238
- package/__cjs/react/hooks/useQueryRefHandlers.cjs +2 -1
- package/__cjs/react/hooks/useQueryRefHandlers.cjs.map +1 -1
- package/__cjs/react/hooks/useQueryRefHandlers.d.cts +25 -1
- package/__cjs/react/hooks/useReactiveVar.cjs +2 -1
- package/__cjs/react/hooks/useReactiveVar.cjs.map +1 -1
- package/__cjs/react/hooks/useReactiveVar.d.cts +2 -1
- package/__cjs/react/hooks/useReadQuery.cjs +29 -0
- package/__cjs/react/hooks/useReadQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useReadQuery.d.cts +95 -16
- package/__cjs/react/hooks/useSubscription.cjs +8 -9
- package/__cjs/react/hooks/useSubscription.cjs.map +1 -1
- package/__cjs/react/hooks/useSubscription.d.cts +153 -69
- package/__cjs/react/hooks/useSuspenseFragment.cjs.map +1 -1
- package/__cjs/react/hooks/useSuspenseFragment.d.cts +61 -29
- package/__cjs/react/hooks/useSuspenseQuery.cjs +4 -1
- package/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useSuspenseQuery.d.cts +605 -160
- package/__cjs/react/index.cjs +1 -5
- package/__cjs/react/index.cjs.map +1 -1
- package/__cjs/react/index.d.cts +0 -2
- package/__cjs/react/index.react-server.cjs +1 -3
- package/__cjs/react/index.react-server.cjs.map +1 -1
- package/__cjs/react/index.react-server.d.cts +0 -1
- package/__cjs/react/internal/cache/FragmentReference.cjs +1 -1
- package/__cjs/react/internal/cache/FragmentReference.cjs.map +1 -1
- package/__cjs/react/internal/cache/FragmentReference.d.cts +2 -3
- package/__cjs/react/internal/cache/QueryReference.cjs.map +1 -1
- package/__cjs/react/internal/cache/QueryReference.d.cts +11 -11
- package/__cjs/react/internal/cache/SuspenseCache.cjs.map +1 -1
- package/__cjs/react/internal/cache/SuspenseCache.d.cts +2 -2
- package/__cjs/react/internal/cache/getSuspenseCache.cjs.map +1 -1
- package/__cjs/react/internal/cache/getSuspenseCache.d.cts +6 -4
- package/__cjs/react/internal/index.cjs +1 -0
- package/__cjs/react/internal/index.cjs.map +1 -1
- package/__cjs/react/internal/index.d.cts +1 -1
- package/__cjs/react/internal/types.d.cts +3 -3
- package/__cjs/react/query-preloader/createQueryPreloader.cjs +1 -1
- package/__cjs/react/query-preloader/createQueryPreloader.cjs.map +1 -1
- package/__cjs/react/query-preloader/createQueryPreloader.d.cts +31 -31
- package/__cjs/react/ssr/prerenderStatic.cjs +5 -4
- package/__cjs/react/ssr/prerenderStatic.cjs.map +1 -1
- package/__cjs/react/ssr/prerenderStatic.d.cts +11 -9
- package/__cjs/react/ssr/useSSRQuery.cjs.map +1 -1
- package/__cjs/react/types/deprecated.d.cts +1 -1
- package/__cjs/react/types/types.documentation.d.cts +22 -11
- package/__cjs/testing/core/mocking/mockLink.cjs.map +1 -1
- package/__cjs/testing/core/mocking/mockLink.d.cts +3 -2
- package/__cjs/testing/core/types/deprecated.d.cts +3 -2
- package/__cjs/testing/react/MockedProvider.cjs.map +1 -1
- package/__cjs/testing/react/MockedProvider.d.cts +2 -3
- package/__cjs/utilities/HKT.d.cts +8 -7
- package/__cjs/utilities/caching/sizes.cjs +3 -3
- package/__cjs/utilities/caching/sizes.cjs.map +1 -1
- package/__cjs/utilities/caching/sizes.d.cts +4 -6
- package/__cjs/utilities/graphql/DocumentTransform.cjs +2 -2
- package/__cjs/utilities/graphql/DocumentTransform.cjs.map +1 -1
- package/__cjs/utilities/index.cjs +2 -3
- package/__cjs/utilities/index.cjs.map +1 -1
- package/__cjs/utilities/index.d.cts +1 -2
- package/__cjs/utilities/{shared → internal}/canonicalStringify.cjs +5 -7
- package/__cjs/utilities/internal/canonicalStringify.cjs.map +1 -0
- package/__cjs/utilities/{shared → internal}/canonicalStringify.d.cts +1 -1
- package/__cjs/utilities/internal/checkDocument.cjs +2 -2
- package/__cjs/utilities/internal/checkDocument.cjs.map +1 -1
- package/__cjs/utilities/internal/createFragmentMap.cjs.map +1 -1
- package/__cjs/{core → utilities/internal}/equalByQuery.cjs +13 -7
- package/__cjs/utilities/internal/equalByQuery.cjs.map +1 -0
- package/__cjs/utilities/internal/equalByQuery.d.cts +5 -0
- package/__cjs/utilities/internal/getFragmentQueryDocument.cjs +13 -3
- package/__cjs/utilities/internal/getFragmentQueryDocument.cjs.map +1 -1
- package/__cjs/utilities/internal/getFragmentQueryDocument.d.cts +13 -3
- package/__cjs/utilities/internal/getMemoryInternals.cjs.map +1 -1
- package/__cjs/utilities/internal/getStoreKeyName.cjs +9 -7
- package/__cjs/utilities/internal/getStoreKeyName.cjs.map +1 -1
- package/__cjs/utilities/internal/index.cjs +8 -2
- package/__cjs/utilities/internal/index.cjs.map +1 -1
- package/__cjs/utilities/internal/index.d.cts +4 -0
- package/__cjs/utilities/internal/mergeOptions.cjs.map +1 -1
- package/__cjs/utilities/internal/mergeOptions.d.cts +2 -2
- package/__cjs/utilities/internal/removeFragmentSpreads.cjs +14 -0
- package/__cjs/utilities/internal/removeFragmentSpreads.cjs.map +1 -0
- package/__cjs/utilities/internal/removeFragmentSpreads.d.cts +3 -0
- package/__cjs/utilities/internal/toQueryResult.cjs.map +1 -1
- package/__cjs/utilities/internal/toQueryResult.d.cts +2 -2
- package/__cjs/utilities/internal/types/DocumentationTypes.cjs +3 -0
- package/__cjs/utilities/internal/types/DocumentationTypes.cjs.map +1 -0
- package/__cjs/utilities/internal/types/DocumentationTypes.d.cts +96 -0
- package/__cjs/utilities/internal/types/NoInfer.d.cts +31 -25
- package/__cjs/utilities/subscriptions/relay/index.cjs +2 -0
- package/__cjs/utilities/subscriptions/relay/index.cjs.map +1 -1
- package/__cjs/version.cjs +1 -1
- package/cache/core/cache.d.ts +96 -66
- package/cache/core/cache.js +5 -13
- package/cache/core/cache.js.map +1 -1
- package/cache/core/types/Cache.d.ts +200 -15
- package/cache/core/types/Cache.js +1 -3
- package/cache/core/types/Cache.js.map +1 -1
- package/cache/deprecated.d.ts +6 -0
- package/cache/deprecated.js +2 -0
- package/cache/deprecated.js.map +1 -0
- package/cache/index.d.ts +2 -2
- package/cache/index.js.map +1 -1
- package/cache/inmemory/entityStore.d.ts +18 -17
- package/cache/inmemory/entityStore.js +28 -31
- package/cache/inmemory/entityStore.js.map +1 -1
- package/cache/inmemory/inMemoryCache.d.ts +4 -4
- package/cache/inmemory/inMemoryCache.js +1 -1
- package/cache/inmemory/inMemoryCache.js.map +1 -1
- package/cache/inmemory/key-extractor.js +1 -1
- package/cache/inmemory/policies.d.ts +3 -2
- package/cache/inmemory/policies.js +4 -4
- package/cache/inmemory/policies.js.map +1 -1
- package/cache/inmemory/readFromStore.js +2 -2
- package/cache/inmemory/types.d.ts +1 -1
- package/cache/inmemory/types.js.map +1 -1
- package/cache/inmemory/writeToStore.d.ts +1 -1
- package/cache/inmemory/writeToStore.js +4 -4
- package/cache/inmemory/writeToStore.js.map +1 -1
- package/core/ApolloClient.d.ts +790 -183
- package/core/ApolloClient.js +138 -118
- package/core/ApolloClient.js.map +1 -1
- package/core/ObservableQuery.d.ts +184 -68
- package/core/ObservableQuery.js +50 -20
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryInfo.d.ts +5 -4
- package/core/QueryInfo.js.map +1 -1
- package/core/QueryManager.d.ts +17 -17
- package/core/QueryManager.js +15 -13
- package/core/QueryManager.js.map +1 -1
- package/core/deprecated.d.ts +29 -0
- package/core/deprecated.js +2 -0
- package/core/deprecated.js.map +1 -0
- package/core/index.d.ts +9 -5
- package/core/index.js.map +1 -1
- package/core/types.d.ts +81 -104
- package/core/types.js.map +1 -1
- package/core/watchQueryOptions.d.ts +9 -298
- package/core/watchQueryOptions.js.map +1 -1
- package/dev/setErrorMessageHandler.d.ts +4 -4
- package/dev/setErrorMessageHandler.js.map +1 -1
- package/errors/CombinedGraphQLErrors.d.ts +147 -12
- package/errors/CombinedGraphQLErrors.js +60 -12
- package/errors/CombinedGraphQLErrors.js.map +1 -1
- package/errors/CombinedProtocolErrors.d.ts +127 -3
- package/errors/CombinedProtocolErrors.js +49 -2
- package/errors/CombinedProtocolErrors.js.map +1 -1
- package/errors/LinkError.d.ts +45 -2
- package/errors/LinkError.js +45 -2
- package/errors/LinkError.js.map +1 -1
- package/errors/LocalStateError.d.ts +42 -6
- package/errors/LocalStateError.js +36 -6
- package/errors/LocalStateError.js.map +1 -1
- package/errors/ServerError.d.ts +71 -12
- package/errors/ServerError.js +51 -9
- package/errors/ServerError.js.map +1 -1
- package/errors/ServerParseError.d.ts +72 -17
- package/errors/ServerParseError.js +46 -9
- package/errors/ServerParseError.js.map +1 -1
- package/errors/UnconventionalError.d.ts +46 -2
- package/errors/UnconventionalError.js +46 -2
- package/errors/UnconventionalError.js.map +1 -1
- package/incremental/handlers/notImplemented.js +1 -1
- package/invariantErrorCodes.js +72 -80
- package/link/batch/batchLink.js.map +1 -1
- package/link/batch-http/batchHttpLink.js +1 -1
- package/link/batch-http/batchHttpLink.js.map +1 -1
- package/link/client-awareness/ClientAwarenessLink.d.ts +4 -4
- package/link/client-awareness/ClientAwarenessLink.js.map +1 -1
- package/link/context/index.d.ts +1 -1
- package/link/context/index.js +1 -1
- package/link/context/index.js.map +1 -1
- package/link/core/ApolloLink.js +2 -2
- package/link/core/types.d.ts +2 -2
- package/link/core/types.js.map +1 -1
- package/link/error/index.d.ts +16 -1
- package/link/error/index.js.map +1 -1
- package/link/http/HttpLink.d.ts +13 -2
- package/link/http/HttpLink.js.map +1 -1
- package/link/http/checkFetcher.js +1 -1
- package/link/http/parseAndCheckHttpResponse.js +1 -1
- package/link/http/serializeFetchParameter.js +1 -1
- package/link/persisted-queries/index.d.ts +11 -11
- package/link/persisted-queries/index.js +2 -2
- package/link/persisted-queries/index.js.map +1 -1
- package/link/retry/delayFunction.d.ts +1 -1
- package/link/retry/delayFunction.js.map +1 -1
- package/link/retry/retryFunction.d.ts +1 -1
- package/link/retry/retryFunction.js.map +1 -1
- package/link/retry/retryLink.js.map +1 -1
- package/link/schema/index.js.map +1 -1
- package/link/utils/validateOperation.js +1 -1
- package/link/ws/index.js.map +1 -1
- package/local-state/LocalState.d.ts +94 -0
- package/local-state/LocalState.js +55 -9
- package/local-state/LocalState.js.map +1 -1
- package/masking/GraphQLCodegenDataMasking.d.ts +6 -7
- package/masking/GraphQLCodegenDataMasking.js.map +1 -1
- package/masking/internal/types.d.ts +70 -70
- package/masking/internal/types.js.map +1 -1
- package/masking/maskDefinition.js +2 -2
- package/masking/maskFragment.js +2 -2
- package/masking/maskOperation.js +1 -1
- package/masking/types.js.map +1 -1
- package/masking/utils.js +3 -3
- package/package.json +1 -1
- package/react/context/ApolloContext.js +1 -1
- package/react/context/ApolloProvider.js +1 -1
- package/react/hooks/internal/useDeepMemo.js +0 -3
- package/react/hooks/internal/useDeepMemo.js.map +1 -1
- package/react/hooks/internal/validateSuspenseHookOptions.d.ts +2 -2
- package/react/hooks/internal/validateSuspenseHookOptions.js.map +1 -1
- package/react/hooks/internal/wrapHook.d.ts +8 -7
- package/react/hooks/internal/wrapHook.js +1 -0
- package/react/hooks/internal/wrapHook.js.map +1 -1
- package/react/hooks/useApolloClient.d.ts +2 -2
- package/react/hooks/useApolloClient.js +2 -2
- package/react/hooks/useApolloClient.js.map +1 -1
- package/react/hooks/useBackgroundQuery.d.ts +814 -82
- package/react/hooks/useBackgroundQuery.js.map +1 -1
- package/react/hooks/useFragment.d.ts +54 -3
- package/react/hooks/useFragment.js +11 -9
- package/react/hooks/useFragment.js.map +1 -1
- package/react/hooks/useLazyQuery.d.ts +313 -119
- package/react/hooks/useLazyQuery.js +0 -38
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/react/hooks/useLoadableQuery.d.ts +230 -44
- package/react/hooks/useLoadableQuery.js.map +1 -1
- package/react/hooks/useMutation.d.ts +57 -17
- package/react/hooks/useMutation.js +6 -7
- package/react/hooks/useMutation.js.map +1 -1
- package/react/hooks/useQuery.d.ts +407 -238
- package/react/hooks/useQuery.js +1 -35
- package/react/hooks/useQuery.js.map +1 -1
- package/react/hooks/useQueryRefHandlers.d.ts +25 -1
- package/react/hooks/useQueryRefHandlers.js +2 -1
- package/react/hooks/useQueryRefHandlers.js.map +1 -1
- package/react/hooks/useReactiveVar.d.ts +2 -1
- package/react/hooks/useReactiveVar.js +2 -1
- package/react/hooks/useReactiveVar.js.map +1 -1
- package/react/hooks/useReadQuery.d.ts +96 -17
- package/react/hooks/useReadQuery.js +29 -0
- package/react/hooks/useReadQuery.js.map +1 -1
- package/react/hooks/useSubscription.d.ts +153 -69
- package/react/hooks/useSubscription.js +8 -9
- package/react/hooks/useSubscription.js.map +1 -1
- package/react/hooks/useSuspenseFragment.d.ts +62 -30
- package/react/hooks/useSuspenseFragment.js.map +1 -1
- package/react/hooks/useSuspenseQuery.d.ts +605 -160
- package/react/hooks/useSuspenseQuery.js +4 -1
- package/react/hooks/useSuspenseQuery.js.map +1 -1
- package/react/hooks-compiled/internal/useDeepMemo.js +0 -3
- package/react/hooks-compiled/internal/useDeepMemo.js.map +1 -1
- package/react/hooks-compiled/internal/validateSuspenseHookOptions.d.ts +2 -2
- package/react/hooks-compiled/internal/validateSuspenseHookOptions.js.map +1 -1
- package/react/hooks-compiled/internal/wrapHook.d.ts +8 -7
- package/react/hooks-compiled/internal/wrapHook.js +1 -0
- package/react/hooks-compiled/internal/wrapHook.js.map +1 -1
- package/react/hooks-compiled/useApolloClient.d.ts +2 -2
- package/react/hooks-compiled/useApolloClient.js +2 -2
- package/react/hooks-compiled/useApolloClient.js.map +1 -1
- package/react/hooks-compiled/useBackgroundQuery.d.ts +814 -82
- package/react/hooks-compiled/useBackgroundQuery.js.map +1 -1
- package/react/hooks-compiled/useFragment.d.ts +54 -3
- package/react/hooks-compiled/useFragment.js +11 -9
- package/react/hooks-compiled/useFragment.js.map +1 -1
- package/react/hooks-compiled/useLazyQuery.d.ts +313 -119
- package/react/hooks-compiled/useLazyQuery.js +0 -38
- package/react/hooks-compiled/useLazyQuery.js.map +1 -1
- package/react/hooks-compiled/useLoadableQuery.d.ts +230 -44
- package/react/hooks-compiled/useLoadableQuery.js.map +1 -1
- package/react/hooks-compiled/useMutation.d.ts +57 -17
- package/react/hooks-compiled/useMutation.js +6 -7
- package/react/hooks-compiled/useMutation.js.map +1 -1
- package/react/hooks-compiled/useQuery.d.ts +407 -238
- package/react/hooks-compiled/useQuery.js +1 -35
- package/react/hooks-compiled/useQuery.js.map +1 -1
- package/react/hooks-compiled/useQueryRefHandlers.d.ts +25 -1
- package/react/hooks-compiled/useQueryRefHandlers.js +2 -1
- package/react/hooks-compiled/useQueryRefHandlers.js.map +1 -1
- package/react/hooks-compiled/useReactiveVar.d.ts +2 -1
- package/react/hooks-compiled/useReactiveVar.js +2 -1
- package/react/hooks-compiled/useReactiveVar.js.map +1 -1
- package/react/hooks-compiled/useReadQuery.d.ts +96 -17
- package/react/hooks-compiled/useReadQuery.js +29 -0
- package/react/hooks-compiled/useReadQuery.js.map +1 -1
- package/react/hooks-compiled/useSubscription.d.ts +153 -69
- package/react/hooks-compiled/useSubscription.js +8 -9
- package/react/hooks-compiled/useSubscription.js.map +1 -1
- package/react/hooks-compiled/useSuspenseFragment.d.ts +62 -30
- package/react/hooks-compiled/useSuspenseFragment.js.map +1 -1
- package/react/hooks-compiled/useSuspenseQuery.d.ts +605 -160
- package/react/hooks-compiled/useSuspenseQuery.js.map +1 -1
- package/react/index.compiled.d.ts +0 -2
- package/react/index.compiled.js +0 -2
- package/react/index.compiled.js.map +1 -1
- package/react/index.d.ts +0 -2
- package/react/index.js +0 -2
- package/react/index.js.map +1 -1
- package/react/index.react-server.d.ts +0 -1
- package/react/index.react-server.js +0 -2
- package/react/index.react-server.js.map +1 -1
- package/react/internal/cache/FragmentReference.d.ts +2 -3
- package/react/internal/cache/FragmentReference.js +1 -1
- package/react/internal/cache/FragmentReference.js.map +1 -1
- package/react/internal/cache/QueryReference.d.ts +11 -11
- package/react/internal/cache/QueryReference.js.map +1 -1
- package/react/internal/cache/SuspenseCache.d.ts +2 -2
- package/react/internal/cache/SuspenseCache.js.map +1 -1
- package/react/internal/cache/getSuspenseCache.d.ts +6 -4
- package/react/internal/cache/getSuspenseCache.js.map +1 -1
- package/react/internal/index.d.ts +1 -1
- package/react/internal/index.js +1 -0
- package/react/internal/index.js.map +1 -1
- package/react/internal/types.d.ts +3 -3
- package/react/internal/types.js.map +1 -1
- package/react/query-preloader/createQueryPreloader.d.ts +31 -31
- package/react/query-preloader/createQueryPreloader.js +1 -1
- package/react/query-preloader/createQueryPreloader.js.map +1 -1
- package/react/ssr/prerenderStatic.d.ts +11 -9
- package/react/ssr/prerenderStatic.js +5 -4
- package/react/ssr/prerenderStatic.js.map +1 -1
- package/react/ssr/useSSRQuery.js.map +1 -1
- package/react/types/deprecated.d.ts +1 -1
- package/react/types/deprecated.js.map +1 -1
- package/react/types/types.documentation.d.ts +22 -11
- package/react/types/types.documentation.js.map +1 -1
- package/testing/core/mocking/mockLink.d.ts +3 -2
- package/testing/core/mocking/mockLink.js.map +1 -1
- package/testing/core/types/deprecated.d.ts +3 -2
- package/testing/core/types/deprecated.js.map +1 -1
- package/testing/react/MockedProvider.d.ts +2 -3
- package/testing/react/MockedProvider.js.map +1 -1
- package/utilities/HKT.d.ts +8 -7
- package/utilities/HKT.js.map +1 -1
- package/utilities/caching/sizes.d.ts +4 -6
- package/utilities/caching/sizes.js +3 -3
- package/utilities/caching/sizes.js.map +1 -1
- package/utilities/graphql/DocumentTransform.js +1 -1
- package/utilities/graphql/DocumentTransform.js.map +1 -1
- package/utilities/index.d.ts +1 -2
- package/utilities/index.js +1 -2
- package/utilities/index.js.map +1 -1
- package/utilities/{shared → internal}/canonicalStringify.d.ts +1 -1
- package/utilities/{shared → internal}/canonicalStringify.js +4 -6
- package/utilities/internal/canonicalStringify.js.map +1 -0
- package/utilities/internal/checkDocument.js +1 -1
- package/utilities/internal/checkDocument.js.map +1 -1
- package/utilities/internal/createFragmentMap.js.map +1 -1
- package/utilities/internal/equalByQuery.d.ts +5 -0
- package/{core → utilities/internal}/equalByQuery.js +7 -1
- package/utilities/internal/equalByQuery.js.map +1 -0
- package/utilities/internal/getFragmentQueryDocument.d.ts +13 -3
- package/utilities/internal/getFragmentQueryDocument.js +13 -3
- package/utilities/internal/getFragmentQueryDocument.js.map +1 -1
- package/utilities/internal/getMemoryInternals.js.map +1 -1
- package/utilities/internal/getStoreKeyName.js +9 -7
- 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/mergeOptions.d.ts +2 -2
- package/utilities/internal/mergeOptions.js.map +1 -1
- package/utilities/internal/removeFragmentSpreads.d.ts +3 -0
- package/utilities/internal/removeFragmentSpreads.js +11 -0
- package/utilities/internal/removeFragmentSpreads.js.map +1 -0
- package/utilities/internal/toQueryResult.d.ts +2 -2
- package/utilities/internal/toQueryResult.js.map +1 -1
- package/utilities/internal/types/DocumentationTypes.d.ts +96 -0
- package/utilities/internal/types/DocumentationTypes.js +2 -0
- package/utilities/internal/types/DocumentationTypes.js.map +1 -0
- package/utilities/internal/types/NoInfer.d.ts +31 -25
- package/utilities/internal/types/NoInfer.js.map +1 -1
- package/utilities/subscriptions/relay/index.js +2 -0
- package/utilities/subscriptions/relay/index.js.map +1 -1
- package/version.js +1 -1
- package/__cjs/cache/core/types/DataProxy.cjs.map +0 -1
- package/__cjs/cache/core/types/DataProxy.d.cts +0 -140
- package/__cjs/core/equalByQuery.cjs.map +0 -1
- package/__cjs/core/equalByQuery.d.cts +0 -4
- package/__cjs/react/context/ApolloConsumer.cjs +0 -16
- package/__cjs/react/context/ApolloConsumer.cjs.map +0 -1
- package/__cjs/react/context/ApolloConsumer.d.cts +0 -10
- package/__cjs/utilities/shared/canonicalStringify.cjs.map +0 -1
- package/cache/core/types/DataProxy.d.ts +0 -140
- package/cache/core/types/DataProxy.js +0 -2
- package/cache/core/types/DataProxy.js.map +0 -1
- package/core/equalByQuery.d.ts +0 -4
- package/core/equalByQuery.js.map +0 -1
- package/react/context/ApolloConsumer.d.ts +0 -10
- package/react/context/ApolloConsumer.js +0 -11
- package/react/context/ApolloConsumer.js.map +0 -1
- package/utilities/shared/canonicalStringify.js.map +0 -1
|
@@ -122,11 +122,12 @@ export function prerenderStatic(
|
|
|
122
122
|
* The "web" `ReadableStream` consuming path.
|
|
123
123
|
* This could also be done with the `AsyncIterable` branch, but we add this
|
|
124
124
|
* code for two reasons:
|
|
125
|
-
* 1. potential performance benefits if we don't need to create an `AsyncIterator` on top
|
|
126
|
-
* 2. some browsers (looking at Safari) don't support `AsyncIterable` for `ReadableStream` yet
|
|
127
|
-
* and we're not 100% sure how good this is covered on edge runtimes
|
|
128
125
|
*
|
|
129
|
-
*
|
|
126
|
+
* 1. potential performance benefits if we don't need to create an `AsyncIterator` on top
|
|
127
|
+
* 2. some browsers (looking at Safari) don't support `AsyncIterable` for `ReadableStream` yet
|
|
128
|
+
* and we're not 100% sure how good this is covered on edge runtimes
|
|
129
|
+
*
|
|
130
|
+
* The extra code here doesn't really matter, since _usually_ this would not
|
|
130
131
|
* be run in a browser, so we don't have to shave every single byte.
|
|
131
132
|
*/
|
|
132
133
|
const reader = prelude.getReader();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prerenderStatic.js","sources":["../../../src/react/ssr/prerenderStatic.tsx"],"sourcesContent":["import { print } from \"graphql\";\nimport type * as ReactTypes from \"react\";\nimport * as React from \"react\";\nimport type { Observer, Subscription } from \"rxjs\";\nimport { filter, firstValueFrom } from \"rxjs\";\n\nimport type {\n ApolloClient,\n DocumentNode,\n ObservableQuery,\n OperationVariables,\n} from \"@apollo/client\";\nimport { getApolloContext } from \"@apollo/client/react\";\nimport { wrapperSymbol } from \"@apollo/client/react/internal\";\nimport { canonicalStringify } from \"@apollo/client/utilities\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\n\nimport { useSSRQuery } from \"./useSSRQuery.js\";\n\ntype ObservableQueryKey = `${string}|${string}`;\nfunction getObservableQueryKey(\n query: DocumentNode,\n variables: Record<string, any> = {}\n): ObservableQueryKey {\n const queryKey = print(query);\n const variablesKey = canonicalStringify(variables);\n return `${queryKey}|${variablesKey}`;\n}\nexport interface PrerenderStaticInternalContext {\n getObservableQuery(\n query: DocumentNode,\n variables?: Record<string, any>\n ): ObservableQuery | undefined;\n onCreatedObservableQuery: (\n observable: ObservableQuery,\n query: DocumentNode,\n variables: OperationVariables\n ) => void;\n}\n\nexport declare namespace prerenderStatic {\n export interface Options {\n /**\n * The React component tree to prerender\n */\n tree: ReactTypes.ReactNode;\n /**\n * If your app is not wrapped in an `ApolloProvider`, you can pass a `client` instance in here.\n */\n context?: { client?: ApolloClient };\n /**\n * An `AbortSignal` that indicates you want to stop the re-render loop, even if not all data is fetched yet.\n *\n * Note that if you use an api like `prerender` or `prerenderToNodeStream` that supports `AbortSignal` as an option,\n * you will still have to pass that `signal` option to that function by wrapping the `renderFunction`, and if that api\n * throws an exception if the signal is aborted, so will `prerenderStatic`.\n *\n * @example\n * ```ts\n * const result = await prerenderStatic({\n * tree: <App/>,\n * signal,\n * renderFunction: (tree) => prerender(tree, { signal }),\n * })\n * ```\n */\n signal?: AbortSignal;\n /**\n * If this is set, this method will return `\"\"` as the `result` property.\n * Setting this can save CPU time that would otherwise be spent on converting\n * `Uint8Array` or `Buffer` instances to strings for the result.\n */\n ignoreResults?: boolean;\n /**\n * The rendering function to use.\n * These functions are currently supported:\n * * `prerender` from `react-dom/static` (https://react.dev/reference/react-dom/static/prerender)\n * * recommended if you use Deno or a modern edge runtime with Web Streams\n * * `prerenderToNodeStream` from `react-dom/static` (https://react.dev/reference/react-dom/static/prerenderToNodeStream)\n * * recommended if you use Node.js\n * * `renderToString` from `react-dom/server` (https://react.dev/reference/react-dom/server/renderToString)\n * * this API has no suspense support and will not work with hooks like `useSuspenseQuery`\n * * `renderToStaticMarkup` from `react-dom/server` (https://react.dev/reference/react-dom/server/renderToStaticMarkup)\n * * slightly faster than `renderToString`, but the result cannot be hydrated\n * * this API has no suspense support and will not work with hooks like `useSuspenseQuery`\n */\n renderFunction:\n | RenderToString\n | RenderToStringPromise\n | PrerenderToWebStream\n | PrerenderToNodeStream\n | ((\n reactNode: ReactTypes.ReactNode\n ) =>\n | ReturnType<RenderToString>\n | ReturnType<RenderToStringPromise>\n | ReturnType<PrerenderToWebStream>\n | ReturnType<PrerenderToNodeStream>);\n /**\n * If this is set to `true`, the result will contain a `diagnostics` property that can help you e.g. detect `useQuery` waterfalls in your application.\n * @defaultValue false\n */\n diagnostics?: boolean;\n\n /**\n * The maximum number of times the tree will be rerendered until no more network requests are made.\n * This is useful to prevent infinite loops in case of a bug in your application.\n * If you have a lot of waterfalls in your application, you might need to increase this number.\n *\n * @defaultValue 50\n */\n maxRerenders?: number;\n }\n\n export interface Result {\n /**\n * The result of the last render, or an empty string if `ignoreResults` was set to `true`.\n */\n result: string;\n /**\n * If the render was aborted early because the `AbortSignal` was cancelled,\n * this will be `true`.\n * If you used a hydratable render function (everything except `renderToStaticMarkup`),\n * the result will still be able to hydrate in the browser, but it might still\n * contain `loading` states and need additional data fetches in the browser.\n */\n aborted: boolean;\n /**\n * If `diagnostics` was set to `true`, this will contain an object with diagnostics that can be used to\n * detect ineffective rendering structures in your app.\n */\n diagnostics?: Diagnostics;\n }\n\n export interface Diagnostics {\n /**\n * The number of times the tree had to be rerendered until no more network requests\n * were made.\n * A high number here might indicate that you have a waterfall of `useQuery` calls\n * in your application and shows potential for optimization, e.g. via fragment colocation.\n */\n renderCount: number;\n }\n\n export type RenderToString = (element: ReactTypes.ReactNode) => string;\n export type RenderToStringPromise = (\n element: ReactTypes.ReactNode\n ) => PromiseLike<string>;\n\n export type PrerenderToWebStream = (\n reactNode: ReactTypes.ReactNode\n ) => Promise<{\n prelude: ReadableStream<Uint8Array>; // AsyncIterable<Uint8Array>;\n }>;\n\n export type PrerenderToNodeStream = (\n reactNode: ReactTypes.ReactNode\n ) => Promise<{\n prelude: AsyncIterable<string | Buffer>;\n }>;\n}\n\nconst noopObserver: Partial<Observer<unknown>> = { complete() {} };\n\n/**\n * This function will rerender your React tree until no more network requests need\n * to be made.\n * If you only use suspenseful hooks (and a suspense-ready `renderFunction`), this\n * means that the tree will be rendered once.\n * If you use non-suspenseful hooks like `useQuery`, this function will render all\n * components, wait for all requests started by your rendered\n * hooks to finish, and then render the tree again, until no more requests are made.\n *\n * After executing this function, you can use `client.extract()` to get a full set\n * of the data that was fetched during these renders.\n * You can then transport that data and hydrate your cache via `client.restore(extractedData)`\n * before hydrating your React tree in the browser.\n */\nexport function prerenderStatic({\n tree,\n context = {},\n // The rendering function is configurable! We use renderToStaticMarkup as\n // the default, because it's a little less expensive than renderToString,\n // and legacy usage of getDataFromTree ignores the return value anyway.\n renderFunction,\n signal,\n ignoreResults,\n diagnostics,\n maxRerenders = 50,\n}: prerenderStatic.Options): Promise<prerenderStatic.Result> {\n const availableObservableQueries = new Map<\n ObservableQueryKey,\n ObservableQuery\n >();\n const subscriptions = new Set<Subscription>();\n let recentlyCreatedObservableQueries = new Set<ObservableQuery>();\n let renderCount = 0;\n\n const internalContext: PrerenderStaticInternalContext = {\n getObservableQuery(query, variables) {\n return availableObservableQueries.get(\n getObservableQueryKey(query, variables)\n );\n },\n onCreatedObservableQuery: (\n observable: ObservableQuery,\n query: DocumentNode,\n variables: OperationVariables\n ) => {\n availableObservableQueries.set(\n getObservableQueryKey(query, variables),\n observable\n );\n // we keep the observable subscribed to until we are done with rendering\n // otherwise it will be torn down after every render pass\n subscriptions.add(observable.subscribe(noopObserver));\n if (observable.options.fetchPolicy !== \"cache-only\") {\n recentlyCreatedObservableQueries.add(observable);\n }\n },\n };\n\n async function process(): Promise<prerenderStatic.Result> {\n renderCount++;\n invariant(\n renderCount <= maxRerenders,\n `Exceeded maximum rerender count of %d.\nThis either means you have very deep \\`useQuery\\` waterfalls in your application\nand need to increase the \\`maxRerender\\` option to \\`prerenderStatic\\`, or that\nyou have an infinite render loop in your application.`,\n maxRerenders\n );\n\n invariant(\n !signal?.aborted,\n \"The operation was aborted before it could be attempted.\"\n );\n\n // Always re-render from the rootElement, even though it might seem\n // better to render the children of the component responsible for the\n // promise, because it is not possible to reconstruct the full context\n // of the original rendering (including all unknown context provider\n // elements) for a subtree of the original component tree.\n const ApolloContext = getApolloContext();\n\n const element = (\n <ApolloContext.Provider\n value={{\n ...context,\n [wrapperSymbol]: {\n useQuery: () => useSSRQuery.bind(internalContext) as any,\n },\n }}\n >\n {tree}\n </ApolloContext.Provider>\n );\n const result = await consume(await renderFunction(element));\n\n if (recentlyCreatedObservableQueries.size == 0) {\n return { result, aborted: false };\n }\n if (signal?.aborted) {\n return { result, aborted: true };\n }\n\n const dataPromise = Promise.all(\n Array.from(recentlyCreatedObservableQueries).map(async (observable) => {\n await firstValueFrom(\n observable.pipe(filter((result) => result.loading === false))\n );\n\n recentlyCreatedObservableQueries.delete(observable);\n })\n );\n\n let resolveAbortPromise!: () => void;\n const abortPromise = new Promise<void>((resolve) => {\n resolveAbortPromise = resolve;\n });\n signal?.addEventListener(\"abort\", resolveAbortPromise);\n await Promise.race([abortPromise, dataPromise]);\n signal?.removeEventListener(\"abort\", resolveAbortPromise);\n\n if (signal?.aborted) {\n return { result, aborted: true };\n }\n return process();\n }\n\n return Promise.resolve()\n .then(process)\n .then((result) =>\n diagnostics ?\n {\n ...result,\n diagnostics: {\n renderCount,\n },\n }\n : result\n )\n .finally(() => {\n availableObservableQueries.clear();\n recentlyCreatedObservableQueries.clear();\n subscriptions.forEach((subscription) => subscription.unsubscribe());\n subscriptions.clear();\n });\n\n async function consume(\n value:\n | string\n | {\n prelude: ReadableStream<Uint8Array>;\n }\n | {\n prelude: AsyncIterable<string | Buffer>;\n }\n ): Promise<string> {\n if (typeof value === \"string\") {\n return ignoreResults ? \"\" : value;\n }\n if (!value.prelude) {\n throw new Error(\n \"`getMarkupFromTree` was called with an incompatible render method.\\n\" +\n 'It is compatible with `renderToStaticMarkup` and `renderToString` from `\"react-dom/server\"`\\n' +\n 'as well as `prerender` and `prerenderToNodeStream` from \"react-dom/static\"'\n );\n }\n const prelude = value.prelude;\n let result = \"\";\n if (\"getReader\" in prelude) {\n /**\n * The \"web\" `ReadableStream` consuming path.\n * This could also be done with the `AsyncIterable` branch, but we add this\n * code for two reasons:\n * 1. potential performance benefits if we don't need to create an `AsyncIterator` on top\n * 2. some browsers (looking at Safari) don't support `AsyncIterable` for `ReadableStream` yet\n * and we're not 100% sure how good this is covered on edge runtimes\n *\n * The extra code here doesn't really matter, since *usually* this would not\n * be run in a browser, so we don't have to shave every single byte.\n */\n const reader = prelude.getReader();\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n if (!ignoreResults) {\n result += Buffer.from(value).toString(\"utf8\");\n }\n }\n } else {\n for await (const chunk of prelude) {\n if (!ignoreResults) {\n result +=\n typeof chunk === \"string\" ? chunk : (\n Buffer.from(chunk).toString(\"utf8\")\n );\n }\n }\n }\n return result;\n }\n}\n"],"names":[],"mappings":"AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAsB,CAAtB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA+B;AAE/B,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAP,CAAA,EAAY,CAAZ,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAuB,CAAvB,CAAA,CAAA,CAAA,CAAA,CAAA,CAA8B;AAE9B,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAe,EAAE,CAAjB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAuC,CAAvC,CAAA,CAAA,CAAA,CAAA,CAA6C;AAQ7C,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,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,CAAhC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAuC,EAAE;gBACjC,CAAR,EAAA,CAAY,CAAC,CAAb,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA0B,EAAE;oBAClB,CAAV,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA;wBACY,CAAZ,CAAA,CAAA,CAAA,CAAA,EAAmB,CAAnB,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAA6B,CAA7B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAsC,EAAE,CAAxC,CAAA,CAAA,CAAA,EAA8C,EAAE,CAClC,CADd,CAAA,CAAA,CAAA,CAAA,CACoB,CAAC,CADrB,CAAA,CAAA,CACyB,CAAC,CAD1B,CAAA,CAAA,CAAA,CAC+B,CAAC,CAAC,CADjC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACyC,CAAC,CAD1C,CAAA,CAAA,CAAA,CAAA,CACgD,CAAC,CACpC;gBACL;YACF;QACF;QACA,CAAJ,CAAA,CAAA,CAAA,CAAA,EAAW,CAAX,CAAA,CAAA,CAAA,CAAA,CAAiB;IACf;AACF;"}
|
|
1
|
+
{"version":3,"file":"prerenderStatic.js","sources":["../../../src/react/ssr/prerenderStatic.tsx"],"sourcesContent":["import { print } from \"graphql\";\nimport type * as ReactTypes from \"react\";\nimport * as React from \"react\";\nimport type { Observer, Subscription } from \"rxjs\";\nimport { filter, firstValueFrom } from \"rxjs\";\n\nimport type {\n ApolloClient,\n DocumentNode,\n ObservableQuery,\n OperationVariables,\n} from \"@apollo/client\";\nimport { getApolloContext } from \"@apollo/client/react\";\nimport { wrapperSymbol } from \"@apollo/client/react/internal\";\nimport { canonicalStringify } from \"@apollo/client/utilities\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\n\nimport { useSSRQuery } from \"./useSSRQuery.js\";\n\ntype ObservableQueryKey = `${string}|${string}`;\nfunction getObservableQueryKey(\n query: DocumentNode,\n variables: Record<string, any> = {}\n): ObservableQueryKey {\n const queryKey = print(query);\n const variablesKey = canonicalStringify(variables);\n return `${queryKey}|${variablesKey}`;\n}\nexport interface PrerenderStaticInternalContext {\n getObservableQuery(\n query: DocumentNode,\n variables?: Record<string, any>\n ): ObservableQuery | undefined;\n onCreatedObservableQuery: (\n observable: ObservableQuery,\n query: DocumentNode,\n variables: OperationVariables\n ) => void;\n}\n\nexport declare namespace prerenderStatic {\n export interface Options {\n /**\n * The React component tree to prerender\n */\n tree: ReactTypes.ReactNode;\n /**\n * If your app is not wrapped in an `ApolloProvider`, you can pass a `client` instance in here.\n */\n context?: { client?: ApolloClient };\n /**\n * An `AbortSignal` that indicates you want to stop the re-render loop, even if not all data is fetched yet.\n *\n * Note that if you use an api like `prerender` or `prerenderToNodeStream` that supports `AbortSignal` as an option,\n * you will still have to pass that `signal` option to that function by wrapping the `renderFunction`, and if that api\n * throws an exception if the signal is aborted, so will `prerenderStatic`.\n *\n * @example\n *\n * ```ts\n * const result = await prerenderStatic({\n * tree: <App/>,\n * signal,\n * renderFunction: (tree) => prerender(tree, { signal }),\n * })\n * ```\n */\n signal?: AbortSignal;\n /**\n * If this is set, this method will return `\"\"` as the `result` property.\n * Setting this can save CPU time that would otherwise be spent on converting\n * `Uint8Array` or `Buffer` instances to strings for the result.\n */\n ignoreResults?: boolean;\n /**\n * The rendering function to use.\n * These functions are currently supported:\n *\n * - `prerender` from `react-dom/static` (https://react.dev/reference/react-dom/static/prerender)\n * - recommended if you use Deno or a modern edge runtime with Web Streams\n * - `prerenderToNodeStream` from `react-dom/static` (https://react.dev/reference/react-dom/static/prerenderToNodeStream)\n * - recommended if you use Node.js\n * - `renderToString` from `react-dom/server` (https://react.dev/reference/react-dom/server/renderToString)\n * - this API has no suspense support and will not work with hooks like `useSuspenseQuery`\n * - `renderToStaticMarkup` from `react-dom/server` (https://react.dev/reference/react-dom/server/renderToStaticMarkup)\n * - slightly faster than `renderToString`, but the result cannot be hydrated\n * - this API has no suspense support and will not work with hooks like `useSuspenseQuery`\n */\n renderFunction:\n | RenderToString\n | RenderToStringPromise\n | PrerenderToWebStream\n | PrerenderToNodeStream\n | ((\n reactNode: ReactTypes.ReactNode\n ) =>\n | ReturnType<RenderToString>\n | ReturnType<RenderToStringPromise>\n | ReturnType<PrerenderToWebStream>\n | ReturnType<PrerenderToNodeStream>);\n /**\n * If this is set to `true`, the result will contain a `diagnostics` property that can help you e.g. detect `useQuery` waterfalls in your application.\n * @defaultValue false\n */\n diagnostics?: boolean;\n\n /**\n * The maximum number of times the tree will be rerendered until no more network requests are made.\n * This is useful to prevent infinite loops in case of a bug in your application.\n * If you have a lot of waterfalls in your application, you might need to increase this number.\n *\n * @defaultValue 50\n */\n maxRerenders?: number;\n }\n\n export interface Result {\n /**\n * The result of the last render, or an empty string if `ignoreResults` was set to `true`.\n */\n result: string;\n /**\n * If the render was aborted early because the `AbortSignal` was cancelled,\n * this will be `true`.\n * If you used a hydratable render function (everything except `renderToStaticMarkup`),\n * the result will still be able to hydrate in the browser, but it might still\n * contain `loading` states and need additional data fetches in the browser.\n */\n aborted: boolean;\n /**\n * If `diagnostics` was set to `true`, this will contain an object with diagnostics that can be used to\n * detect ineffective rendering structures in your app.\n */\n diagnostics?: Diagnostics;\n }\n\n export interface Diagnostics {\n /**\n * The number of times the tree had to be rerendered until no more network requests\n * were made.\n * A high number here might indicate that you have a waterfall of `useQuery` calls\n * in your application and shows potential for optimization, e.g. via fragment colocation.\n */\n renderCount: number;\n }\n\n export type RenderToString = (element: ReactTypes.ReactNode) => string;\n export type RenderToStringPromise = (\n element: ReactTypes.ReactNode\n ) => PromiseLike<string>;\n\n export type PrerenderToWebStream = (\n reactNode: ReactTypes.ReactNode\n ) => Promise<{\n prelude: ReadableStream<Uint8Array>; // AsyncIterable<Uint8Array>;\n }>;\n\n export type PrerenderToNodeStream = (\n reactNode: ReactTypes.ReactNode\n ) => Promise<{\n prelude: AsyncIterable<string | Buffer>;\n }>;\n}\n\nconst noopObserver: Partial<Observer<unknown>> = { complete() {} };\n\n/**\n * This function will rerender your React tree until no more network requests need\n * to be made.\n * If you only use suspenseful hooks (and a suspense-ready `renderFunction`), this\n * means that the tree will be rendered once.\n * If you use non-suspenseful hooks like `useQuery`, this function will render all\n * components, wait for all requests started by your rendered\n * hooks to finish, and then render the tree again, until no more requests are made.\n *\n * After executing this function, you can use `client.extract()` to get a full set\n * of the data that was fetched during these renders.\n * You can then transport that data and hydrate your cache via `client.restore(extractedData)`\n * before hydrating your React tree in the browser.\n */\nexport function prerenderStatic({\n tree,\n context = {},\n // The rendering function is configurable! We use renderToStaticMarkup as\n // the default, because it's a little less expensive than renderToString,\n // and legacy usage of getDataFromTree ignores the return value anyway.\n renderFunction,\n signal,\n ignoreResults,\n diagnostics,\n maxRerenders = 50,\n}: prerenderStatic.Options): Promise<prerenderStatic.Result> {\n const availableObservableQueries = new Map<\n ObservableQueryKey,\n ObservableQuery\n >();\n const subscriptions = new Set<Subscription>();\n let recentlyCreatedObservableQueries = new Set<ObservableQuery>();\n let renderCount = 0;\n\n const internalContext: PrerenderStaticInternalContext = {\n getObservableQuery(query, variables) {\n return availableObservableQueries.get(\n getObservableQueryKey(query, variables)\n );\n },\n onCreatedObservableQuery: (\n observable: ObservableQuery,\n query: DocumentNode,\n variables: OperationVariables\n ) => {\n availableObservableQueries.set(\n getObservableQueryKey(query, variables),\n observable\n );\n // we keep the observable subscribed to until we are done with rendering\n // otherwise it will be torn down after every render pass\n subscriptions.add(observable.subscribe(noopObserver));\n if (observable.options.fetchPolicy !== \"cache-only\") {\n recentlyCreatedObservableQueries.add(observable);\n }\n },\n };\n\n async function process(): Promise<prerenderStatic.Result> {\n renderCount++;\n invariant(\n renderCount <= maxRerenders,\n `Exceeded maximum rerender count of %d.\nThis either means you have very deep \\`useQuery\\` waterfalls in your application\nand need to increase the \\`maxRerender\\` option to \\`prerenderStatic\\`, or that\nyou have an infinite render loop in your application.`,\n maxRerenders\n );\n\n invariant(\n !signal?.aborted,\n \"The operation was aborted before it could be attempted.\"\n );\n\n // Always re-render from the rootElement, even though it might seem\n // better to render the children of the component responsible for the\n // promise, because it is not possible to reconstruct the full context\n // of the original rendering (including all unknown context provider\n // elements) for a subtree of the original component tree.\n const ApolloContext = getApolloContext();\n\n const element = (\n <ApolloContext.Provider\n value={{\n ...context,\n [wrapperSymbol]: {\n useQuery: () => useSSRQuery.bind(internalContext) as any,\n },\n }}\n >\n {tree}\n </ApolloContext.Provider>\n );\n const result = await consume(await renderFunction(element));\n\n if (recentlyCreatedObservableQueries.size == 0) {\n return { result, aborted: false };\n }\n if (signal?.aborted) {\n return { result, aborted: true };\n }\n\n const dataPromise = Promise.all(\n Array.from(recentlyCreatedObservableQueries).map(async (observable) => {\n await firstValueFrom(\n observable.pipe(filter((result) => result.loading === false))\n );\n\n recentlyCreatedObservableQueries.delete(observable);\n })\n );\n\n let resolveAbortPromise!: () => void;\n const abortPromise = new Promise<void>((resolve) => {\n resolveAbortPromise = resolve;\n });\n signal?.addEventListener(\"abort\", resolveAbortPromise);\n await Promise.race([abortPromise, dataPromise]);\n signal?.removeEventListener(\"abort\", resolveAbortPromise);\n\n if (signal?.aborted) {\n return { result, aborted: true };\n }\n return process();\n }\n\n return Promise.resolve()\n .then(process)\n .then((result) =>\n diagnostics ?\n {\n ...result,\n diagnostics: {\n renderCount,\n },\n }\n : result\n )\n .finally(() => {\n availableObservableQueries.clear();\n recentlyCreatedObservableQueries.clear();\n subscriptions.forEach((subscription) => subscription.unsubscribe());\n subscriptions.clear();\n });\n\n async function consume(\n value:\n | string\n | {\n prelude: ReadableStream<Uint8Array>;\n }\n | {\n prelude: AsyncIterable<string | Buffer>;\n }\n ): Promise<string> {\n if (typeof value === \"string\") {\n return ignoreResults ? \"\" : value;\n }\n if (!value.prelude) {\n throw new Error(\n \"`getMarkupFromTree` was called with an incompatible render method.\\n\" +\n 'It is compatible with `renderToStaticMarkup` and `renderToString` from `\"react-dom/server\"`\\n' +\n 'as well as `prerender` and `prerenderToNodeStream` from \"react-dom/static\"'\n );\n }\n const prelude = value.prelude;\n let result = \"\";\n if (\"getReader\" in prelude) {\n /**\n * The \"web\" `ReadableStream` consuming path.\n * This could also be done with the `AsyncIterable` branch, but we add this\n * code for two reasons:\n *\n * 1. potential performance benefits if we don't need to create an `AsyncIterator` on top\n * 2. some browsers (looking at Safari) don't support `AsyncIterable` for `ReadableStream` yet\n * and we're not 100% sure how good this is covered on edge runtimes\n *\n * The extra code here doesn't really matter, since _usually_ this would not\n * be run in a browser, so we don't have to shave every single byte.\n */\n const reader = prelude.getReader();\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n if (!ignoreResults) {\n result += Buffer.from(value).toString(\"utf8\");\n }\n }\n } else {\n for await (const chunk of prelude) {\n if (!ignoreResults) {\n result +=\n typeof chunk === \"string\" ? chunk : (\n Buffer.from(chunk).toString(\"utf8\")\n );\n }\n }\n }\n return result;\n }\n}\n"],"names":[],"mappings":"AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAsB,CAAtB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA+B;AAE/B,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAP,CAAA,EAAY,CAAZ,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAuB,CAAvB,CAAA,CAAA,CAAA,CAAA,CAAA,CAA8B;AAE9B,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAe,EAAE,CAAjB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAuC,CAAvC,CAAA,CAAA,CAAA,CAAA,CAA6C;AAQ7C,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,C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,CAAV,CAAA,CAAA,CAAA,EAAA,CAAiB,CAAjB,CAAA,CAAA,CAAA,EAAuB,CAAvB,CAAA,CAAA,CAAA,EAAA,CAAA,EAAgC,CAAhC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAuC,EAAE;gBACjC,CAAR,EAAA,CAAY,CAAC,CAAb,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA0B,EAAE;oBAClB,CAAV,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA;wBACY,CAAZ,CAAA,CAAA,CAAA,CAAA,EAAmB,CAAnB,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAA6B,CAA7B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAsC,EAAE,CAAxC,CAAA,CAAA,CAAA,EAA8C,EAAE,CAClC,CADd,CAAA,CAAA,CAAA,CAAA,CACoB,CAAC,CADrB,CAAA,CAAA,CACyB,CAAC,CAD1B,CAAA,CAAA,CAAA,CAC+B,CAAC,CAAC,CADjC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACyC,CAAC,CAD1C,CAAA,CAAA,CAAA,CAAA,CACgD,CAAC,CACpC;gBACL;YACF;QACF;QACA,CAAJ,CAAA,CAAA,CAAA,CAAA,EAAW,CAAX,CAAA,CAAA,CAAA,CAAA,CAAiB;IACf;AACF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSSRQuery.js","sourceRoot":"","sources":["../../../src/react/ssr/useSSRQuery.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAIpE,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"useSSRQuery.js","sourceRoot":"","sources":["../../../src/react/ssr/useSSRQuery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,GAAG,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACnE,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;YAC7B,KAAK;YACL,GAAG,OAAO;YACV,WAAW,EACT,CACE,OAAO,CAAC,WAAW,KAAK,cAAc;gBACtC,OAAO,CAAC,WAAW,KAAK,mBAAmB,CAC5C,CAAC,CAAC;gBACD,aAAa;gBACf,CAAC,CAAC,OAAO,CAAC,WAAW;SACxB,CAAC,CAAC;QACH,IAAI,CAAC,wBAAwB,CAAC,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACtE,CAAC;IACD,OAAO;QACL,UAAU;QACV,GAAG,UAAU,CAAC,gBAAgB,EAAE;QAChC,GAAG,UAAU;KACd,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,uBAAuB,CAC9B,KAAQ;IAER,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,YAAY,EAAE;QACzC,GAAG;YACD,MAAM,IAAI,KAAK,CACb,qGAAqG,CACtG,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;IACH,OAAO,KAAY,CAAC;AACtB,CAAC","sourcesContent":["import type { DocumentNode } from \"graphql\";\n\nimport type { ObservableQuery } from \"@apollo/client\";\nimport { NetworkStatus } from \"@apollo/client\";\nimport { useApolloClient, useQuery } from \"@apollo/client/react\";\nimport { maybeDeepFreeze } from \"@apollo/client/utilities/internal\";\n\nimport type { PrerenderStaticInternalContext } from \"./prerenderStatic.js\";\n\nconst skipStandbyResult: ObservableQuery.Result<any> = maybeDeepFreeze({\n loading: false,\n data: void 0 as any,\n dataState: \"empty\",\n error: void 0,\n networkStatus: NetworkStatus.ready,\n partial: true,\n});\n\nexport const useSSRQuery = function (\n this: PrerenderStaticInternalContext,\n query: DocumentNode,\n options: useQuery.Options<any, any> = {}\n): useQuery.Result<any, any> {\n function notAllowed(): never {\n throw new Error(\"This method cannot be called during SSR.\");\n }\n const client = useApolloClient(options.client);\n\n const baseResult: Omit<\n useQuery.Result,\n \"observable\" | \"data\" | \"error\" | \"loading\" | \"networkStatus\" | \"dataState\"\n > = {\n client,\n refetch: notAllowed,\n fetchMore: notAllowed,\n subscribeToMore: notAllowed,\n updateQuery: notAllowed,\n startPolling: notAllowed,\n stopPolling: notAllowed,\n variables: options?.variables,\n previousData: undefined,\n };\n\n if (options.skip || options.fetchPolicy === \"standby\") {\n return withoutObservableAccess({\n ...baseResult,\n ...skipStandbyResult,\n });\n }\n if (options.ssr === false) {\n return withoutObservableAccess({\n ...baseResult,\n ...useQuery.ssrDisabledResult,\n });\n }\n\n let observable = this.getObservableQuery(query, options.variables);\n if (!observable) {\n observable = client.watchQuery({\n query,\n ...options,\n fetchPolicy:\n (\n options.fetchPolicy === \"network-only\" ||\n options.fetchPolicy === \"cache-and-network\"\n ) ?\n \"cache-first\"\n : options.fetchPolicy,\n });\n this.onCreatedObservableQuery(observable, query, options.variables);\n }\n return {\n observable,\n ...observable.getCurrentResult(),\n ...baseResult,\n };\n};\n\nfunction withoutObservableAccess<T>(\n value: T\n): T & { observable: ObservableQuery<any, any> } {\n Object.defineProperty(value, \"observable\", {\n get() {\n throw new Error(\n '\"observable\" property is not accessible on skipped hooks or hook calls with `ssr: false` during SSR'\n );\n },\n });\n return value as any;\n}\n"]}
|
|
@@ -41,7 +41,7 @@ export type OnDataOptions<TData = unknown> = useSubscription.OnDataOptions<TData
|
|
|
41
41
|
/** @deprecated Use `useSubscription.OnSubscriptionDataOptions` instead */
|
|
42
42
|
export type OnSubscriptionDataOptions<TData = unknown> = useSubscription.OnSubscriptionDataOptions<TData>;
|
|
43
43
|
/** @deprecated Use `useFragment.Options` instead */
|
|
44
|
-
export type UseFragmentOptions<TData, TVariables> = useFragment.Options<TData, TVariables>;
|
|
44
|
+
export type UseFragmentOptions<TData, TVariables extends OperationVariables> = useFragment.Options<TData, TVariables>;
|
|
45
45
|
/** @deprecated Use `useFragment.Result` instead */
|
|
46
46
|
export type UseFragmentResult<TData> = useFragment.Result<TData>;
|
|
47
47
|
/** @deprecated Use `useSuspenseQuery.Options` instead */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deprecated.js","sourceRoot":"","sources":["../../../src/react/types/deprecated.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n ApolloCache,\n DefaultContext,\n OperationVariables,\n} from \"@apollo/client\";\n\nimport type { useBackgroundQuery } from \"../hooks/useBackgroundQuery.js\";\nimport type { useFragment } from \"../hooks/useFragment.js\";\nimport type { useLazyQuery } from \"../hooks/useLazyQuery.js\";\nimport type { useLoadableQuery } from \"../hooks/useLoadableQuery.js\";\nimport type { useMutation } from \"../hooks/useMutation.js\";\nimport type { useQuery } from \"../hooks/useQuery.js\";\nimport type { useQueryRefHandlers } from \"../hooks/useQueryRefHandlers.js\";\nimport type { useReadQuery } from \"../hooks/useReadQuery.js\";\nimport type { useSubscription } from \"../hooks/useSubscription.js\";\nimport type { useSuspenseFragment } from \"../hooks/useSuspenseFragment.js\";\nimport type { useSuspenseQuery } from \"../hooks/useSuspenseQuery.js\";\n\n/** @deprecated Use `useQuery.Options` instead */\nexport type QueryHookOptions<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n> = useQuery.Options<TData, TVariables>;\n\n/** @deprecated Use `useQuery.Result` instead */\nexport type QueryResult<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n> = useQuery.Result<TData, TVariables>;\n\n/** @deprecated Use `useLazyQuery.Options` instead */\nexport type LazyQueryHookOptions<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n> = useLazyQuery.Options<TData, TVariables>;\n\n/** @deprecated Use `useLazyQuery.Result` instead */\nexport type LazyQueryResult<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n> = useLazyQuery.Result<TData, TVariables>;\n\n/** @deprecated Use `useLazyQuery.ResultTuple` instead */\nexport type LazyQueryResultTuple<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n> = useLazyQuery.ResultTuple<TData, TVariables>;\n\n/** @deprecated Use `useLazyQuery.ExecOptions` instead */\nexport type LazyQueryHookExecOptions<\n TVariables extends OperationVariables = OperationVariables,\n> = useLazyQuery.ExecOptions<TVariables>;\n\n/** @deprecated Use `useLazyQuery.ExecOptions` instead */\nexport type LazyQueryExecFunction<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n> = useLazyQuery.ExecFunction<TData, TVariables>;\n\n/** @deprecated Use `useMutation.Options` instead */\nexport type MutationHookOptions<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n _TContext = DefaultContext,\n TCache extends ApolloCache = ApolloCache,\n> = useMutation.Options<TData, TVariables, TCache>;\n\n/** @deprecated Use `useMutation.Result` instead */\nexport type MutationResult<TData = unknown> = useMutation.Result<TData>;\n\n/** @deprecated Use `useMutation.MutationFunctionOptions` instead */\nexport type MutationFunctionOptions<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n _TContext = DefaultContext,\n TCache extends ApolloCache = ApolloCache,\n> = useMutation.MutationFunctionOptions<TData, TVariables, TCache>;\n\n/** @deprecated Use `useMutation.ResultTuple` instead */\nexport type MutationTuple<\n TData,\n TVariables extends OperationVariables,\n _TContext = DefaultContext,\n TCache extends ApolloCache = ApolloCache,\n> = useMutation.ResultTuple<TData, TVariables, TCache>;\n\n/** @deprecated Use `useSubscription.Result` instead */\nexport type SubscriptionResult<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n> = useSubscription.Result<TData>;\n\n/** @deprecated Use `useSubscription.Options` instead */\nexport type SubscriptionHookOptions<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n> = useSubscription.Options<TData, TVariables>;\n\n/** @deprecated Use `useSubscription.OnDataOptions` instead */\nexport type OnDataOptions<TData = unknown> =\n useSubscription.OnDataOptions<TData>;\n\n/** @deprecated Use `useSubscription.OnSubscriptionDataOptions` instead */\nexport type OnSubscriptionDataOptions<TData = unknown> =\n useSubscription.OnSubscriptionDataOptions<TData>;\n\n/** @deprecated Use `useFragment.Options` instead */\nexport type UseFragmentOptions
|
|
1
|
+
{"version":3,"file":"deprecated.js","sourceRoot":"","sources":["../../../src/react/types/deprecated.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n ApolloCache,\n DefaultContext,\n OperationVariables,\n} from \"@apollo/client\";\n\nimport type { useBackgroundQuery } from \"../hooks/useBackgroundQuery.js\";\nimport type { useFragment } from \"../hooks/useFragment.js\";\nimport type { useLazyQuery } from \"../hooks/useLazyQuery.js\";\nimport type { useLoadableQuery } from \"../hooks/useLoadableQuery.js\";\nimport type { useMutation } from \"../hooks/useMutation.js\";\nimport type { useQuery } from \"../hooks/useQuery.js\";\nimport type { useQueryRefHandlers } from \"../hooks/useQueryRefHandlers.js\";\nimport type { useReadQuery } from \"../hooks/useReadQuery.js\";\nimport type { useSubscription } from \"../hooks/useSubscription.js\";\nimport type { useSuspenseFragment } from \"../hooks/useSuspenseFragment.js\";\nimport type { useSuspenseQuery } from \"../hooks/useSuspenseQuery.js\";\n\n/** @deprecated Use `useQuery.Options` instead */\nexport type QueryHookOptions<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n> = useQuery.Options<TData, TVariables>;\n\n/** @deprecated Use `useQuery.Result` instead */\nexport type QueryResult<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n> = useQuery.Result<TData, TVariables>;\n\n/** @deprecated Use `useLazyQuery.Options` instead */\nexport type LazyQueryHookOptions<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n> = useLazyQuery.Options<TData, TVariables>;\n\n/** @deprecated Use `useLazyQuery.Result` instead */\nexport type LazyQueryResult<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n> = useLazyQuery.Result<TData, TVariables>;\n\n/** @deprecated Use `useLazyQuery.ResultTuple` instead */\nexport type LazyQueryResultTuple<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n> = useLazyQuery.ResultTuple<TData, TVariables>;\n\n/** @deprecated Use `useLazyQuery.ExecOptions` instead */\nexport type LazyQueryHookExecOptions<\n TVariables extends OperationVariables = OperationVariables,\n> = useLazyQuery.ExecOptions<TVariables>;\n\n/** @deprecated Use `useLazyQuery.ExecOptions` instead */\nexport type LazyQueryExecFunction<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n> = useLazyQuery.ExecFunction<TData, TVariables>;\n\n/** @deprecated Use `useMutation.Options` instead */\nexport type MutationHookOptions<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n _TContext = DefaultContext,\n TCache extends ApolloCache = ApolloCache,\n> = useMutation.Options<TData, TVariables, TCache>;\n\n/** @deprecated Use `useMutation.Result` instead */\nexport type MutationResult<TData = unknown> = useMutation.Result<TData>;\n\n/** @deprecated Use `useMutation.MutationFunctionOptions` instead */\nexport type MutationFunctionOptions<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n _TContext = DefaultContext,\n TCache extends ApolloCache = ApolloCache,\n> = useMutation.MutationFunctionOptions<TData, TVariables, TCache>;\n\n/** @deprecated Use `useMutation.ResultTuple` instead */\nexport type MutationTuple<\n TData,\n TVariables extends OperationVariables,\n _TContext = DefaultContext,\n TCache extends ApolloCache = ApolloCache,\n> = useMutation.ResultTuple<TData, TVariables, TCache>;\n\n/** @deprecated Use `useSubscription.Result` instead */\nexport type SubscriptionResult<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n> = useSubscription.Result<TData>;\n\n/** @deprecated Use `useSubscription.Options` instead */\nexport type SubscriptionHookOptions<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n> = useSubscription.Options<TData, TVariables>;\n\n/** @deprecated Use `useSubscription.OnDataOptions` instead */\nexport type OnDataOptions<TData = unknown> =\n useSubscription.OnDataOptions<TData>;\n\n/** @deprecated Use `useSubscription.OnSubscriptionDataOptions` instead */\nexport type OnSubscriptionDataOptions<TData = unknown> =\n useSubscription.OnSubscriptionDataOptions<TData>;\n\n/** @deprecated Use `useFragment.Options` instead */\nexport type UseFragmentOptions<\n TData,\n TVariables extends OperationVariables,\n> = useFragment.Options<TData, TVariables>;\n\n/** @deprecated Use `useFragment.Result` instead */\nexport type UseFragmentResult<TData> = useFragment.Result<TData>;\n\n/** @deprecated Use `useSuspenseQuery.Options` instead */\nexport type SuspenseQueryHookOptions<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n> = useSuspenseQuery.Options<TVariables>;\n\n/** @deprecated Use `useSuspenseQuery.Result` instead */\nexport type UseSuspenseQueryResult<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n> = useSuspenseQuery.Result<TData, TVariables>;\n\n/** @deprecated Use `useSuspenseQuery.FetchPolicy` instead */\nexport type SuspenseQueryHookFetchPolicy = useSuspenseQuery.FetchPolicy;\n\n/** @deprecated Use `useBackgroundQuery.Options` instead */\nexport type BackgroundQueryHookOptions<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n> = useBackgroundQuery.Options<TVariables>;\n\n/** @deprecated Use `useBackgroundQuery.Result` instead */\nexport type UseBackgroundQueryResult<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n> = useBackgroundQuery.Result<TData, TVariables>;\n\n/** @deprecated Use `useBackgroundQuery.FetchPolicy` instead */\nexport type BackgroundQueryHookFetchPolicy = useBackgroundQuery.FetchPolicy;\n\n/** @deprecated Use `useSuspenseFragment.Options` instead */\nexport type UseSuspenseFragmentOptions<\n TData,\n TVariables extends OperationVariables,\n> = useSuspenseFragment.Options<TData, TVariables>;\n\n/** @deprecated Use `useSuspenseFragment.Result` instead */\nexport type UseSuspenseFragmentResult<TData> =\n useSuspenseFragment.Result<TData>;\n\n/** @deprecated Use `useLoadableQuery.LoadQueryFunction` instead */\nexport type LoadQueryFunction<TVariables extends OperationVariables> =\n useLoadableQuery.LoadQueryFunction<TVariables>;\n\n/** @deprecated Use `useLoadableQuery.FetchPolicy` instead */\nexport type LoadableQueryFetchPolicy = useLoadableQuery.FetchPolicy;\n\n/** @deprecated Use `useLoadableQuery.Options` instead */\nexport type LoadableQueryHookOptions = useLoadableQuery.Options;\n\n/** @deprecated Use `useLoadableQuery.Result` instead */\nexport type UseLoadableQueryResult<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n> = useLoadableQuery.Result<TData, TVariables>;\n\n/** @deprecated Use `useQueryRefHandlers.Result` instead */\nexport type UseQueryRefHandlersResult<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n> = useQueryRefHandlers.Result<TData, TVariables>;\n\n/** @deprecated Use `useReadQuery.Result` instead */\nexport type UseReadQueryResult<TData = unknown> = useReadQuery.Result<TData>;\n"]}
|
|
@@ -108,7 +108,8 @@ export interface QueryOptionsDocumentation {
|
|
|
108
108
|
* @deprecated We recommend using `skipToken` in place of the `skip` option as
|
|
109
109
|
* it is more type-safe.
|
|
110
110
|
*
|
|
111
|
-
* This option is deprecated and only supported to ease the migration from useQuery
|
|
111
|
+
* This option is deprecated and only supported to ease the migration from `useQuery`. It will be removed in a future release.
|
|
112
|
+
* Please use [`skipToken`](https://www.apollographql.com/docs/react/api/react/hooks#skiptoken) instead of the `skip` option as it is more type-safe.
|
|
112
113
|
*
|
|
113
114
|
* @docGroup 1. Operation options
|
|
114
115
|
*/
|
|
@@ -177,7 +178,8 @@ export interface QueryResultDocumentation {
|
|
|
177
178
|
*/
|
|
178
179
|
previousData: unknown;
|
|
179
180
|
/**
|
|
180
|
-
*
|
|
181
|
+
* A single ErrorLike object describing the error that occured during the latest
|
|
182
|
+
* query execution.
|
|
181
183
|
*
|
|
182
184
|
* For more information, see [Handling operation errors](https://www.apollographql.com/docs/react/data/error-handling/).
|
|
183
185
|
*
|
|
@@ -211,7 +213,11 @@ export interface QueryResultDocumentation {
|
|
|
211
213
|
*
|
|
212
214
|
* See also [Refetching](https://www.apollographql.com/docs/react/data/queries/#refetching).
|
|
213
215
|
*
|
|
214
|
-
*
|
|
216
|
+
* Returns a `ResultPromise` with an additional `.retain()` method. Calling
|
|
217
|
+
* `.retain()` keeps the network operation running even if the `ObservableQuery`
|
|
218
|
+
* no longer requires the result.
|
|
219
|
+
*
|
|
220
|
+
* @docGroup 3. Helper functions
|
|
215
221
|
*/
|
|
216
222
|
refetch: unknown;
|
|
217
223
|
/**
|
|
@@ -255,16 +261,27 @@ export interface QueryResultDocumentation {
|
|
|
255
261
|
updateQuery: unknown;
|
|
256
262
|
/**
|
|
257
263
|
* Describes the completeness of `data`.
|
|
264
|
+
*
|
|
258
265
|
* - `empty`: No data could be fulfilled from the cache or the result is
|
|
259
266
|
* incomplete. `data` is `undefined`.
|
|
260
267
|
* - `partial`: Some data could be fulfilled from the cache but `data` is
|
|
261
268
|
* incomplete. This is only possible when `returnPartialData` is `true`.
|
|
262
269
|
* - `streaming`: `data` is incomplete as a result of a deferred query and
|
|
263
270
|
* the result is still streaming in.
|
|
264
|
-
*
|
|
265
|
-
*
|
|
271
|
+
* - `complete`: `data` is a fully satisfied query result fulfilled
|
|
272
|
+
* either from the cache or network.
|
|
273
|
+
*
|
|
274
|
+
* @docGroup 1. Operation data
|
|
266
275
|
*/
|
|
267
276
|
dataState: unknown;
|
|
277
|
+
/**
|
|
278
|
+
* Describes whether `data` is a complete or partial result. This flag is only
|
|
279
|
+
* set when `returnPartialData` is `true` in query options.
|
|
280
|
+
*
|
|
281
|
+
* @deprecated This field will be removed in a future version of Apollo Client.
|
|
282
|
+
* @docGroup 1. Operation data
|
|
283
|
+
*/
|
|
284
|
+
partial: boolean;
|
|
268
285
|
}
|
|
269
286
|
export interface MutationOptionsDocumentation {
|
|
270
287
|
/**
|
|
@@ -500,20 +517,14 @@ export interface SubscriptionOptionsDocumentation {
|
|
|
500
517
|
extensions: unknown;
|
|
501
518
|
/**
|
|
502
519
|
* Allows the registration of a callback function that will be triggered each time the `useSubscription` Hook / `Subscription` component completes the subscription.
|
|
503
|
-
*
|
|
504
|
-
* @since 3.7.0
|
|
505
520
|
*/
|
|
506
521
|
onComplete: unknown;
|
|
507
522
|
/**
|
|
508
523
|
* Allows the registration of a callback function that will be triggered each time the `useSubscription` Hook / `Subscription` component receives data. The callback `options` object param consists of the current Apollo Client instance in `client`, and the received subscription data in `data`.
|
|
509
|
-
*
|
|
510
|
-
* @since 3.7.0
|
|
511
524
|
*/
|
|
512
525
|
onData: unknown;
|
|
513
526
|
/**
|
|
514
527
|
* Allows the registration of a callback function that will be triggered each time the `useSubscription` Hook / `Subscription` component receives an error.
|
|
515
|
-
*
|
|
516
|
-
* @since 3.7.0
|
|
517
528
|
*/
|
|
518
529
|
onError: unknown;
|
|
519
530
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.documentation.js","sourceRoot":"","sources":["../../../src/react/types/types.documentation.ts"],"names":[],"mappings":"","sourcesContent":["export interface QueryOptionsDocumentation {\n /**\n * A GraphQL query string parsed into an AST with the gql template literal.\n *\n * @docGroup 1. Operation options\n */\n query: unknown;\n\n /**\n * An object containing all of the GraphQL variables your query requires to execute.\n *\n * Each key in the object corresponds to a variable name, and that key's value corresponds to the variable value.\n *\n * @docGroup 1. Operation options\n */\n variables: unknown;\n\n /**\n * Specifies how the query handles a response that returns both GraphQL errors and partial results.\n *\n * For details, see [GraphQL error policies](https://www.apollographql.com/docs/react/data/error-handling/#graphql-error-policies).\n *\n * The default value is `none`, meaning that the query result includes error details but not partial results.\n *\n * @docGroup 1. Operation options\n */\n errorPolicy: unknown;\n\n /**\n * If you're using [Apollo Link](https://www.apollographql.com/docs/react/api/link/introduction/), this object is the initial value of the `context` object that's passed along your link chain.\n *\n * @docGroup 2. Networking options\n */\n context: unknown;\n\n /**\n * Specifies how the query interacts with the Apollo Client cache during execution (for example, whether it checks the cache for results before sending a request to the server).\n *\n * For details, see [Setting a fetch policy](https://www.apollographql.com/docs/react/data/queries/#setting-a-fetch-policy).\n *\n * The default value is `cache-first`.\n *\n * @docGroup 3. Caching options\n */\n fetchPolicy: unknown;\n\n /**\n * Specifies the `FetchPolicy` to be used after this query has completed.\n *\n * @docGroup 3. Caching options\n */\n nextFetchPolicy: unknown;\n\n /**\n * Defaults to the initial value of options.fetchPolicy, but can be explicitly\n * configured to specify the WatchQueryFetchPolicy to revert back to whenever\n * variables change (unless nextFetchPolicy intervenes).\n *\n * @docGroup 3. Caching options\n */\n initialFetchPolicy: unknown;\n\n /**\n * Specifies the interval (in milliseconds) at which the query polls for updated results.\n *\n * The default value is `0` (no polling).\n *\n * @docGroup 2. Networking options\n */\n pollInterval: unknown;\n\n /**\n * If `true`, the in-progress query's associated component re-renders whenever the network status changes or a network error occurs.\n *\n * The default value is `true`.\n *\n * @docGroup 2. Networking options\n */\n notifyOnNetworkStatusChange: unknown;\n\n /**\n * If `true`, the query can return partial results from the cache if the cache doesn't contain results for all queried fields.\n *\n * The default value is `false`.\n *\n * @docGroup 3. Caching options\n */\n returnPartialData: unknown;\n\n /**\n * Specifies whether a `NetworkStatus.refetch` operation should merge\n * incoming field data with existing data, or overwrite the existing data.\n * Overwriting is probably preferable, but merging is currently the default\n * behavior, for backwards compatibility with Apollo Client 3.x.\n *\n * @docGroup 3. Caching options\n */\n refetchWritePolicy: unknown;\n\n /**\n * Watched queries must opt into overwriting existing data on refetch, by passing refetchWritePolicy: \"overwrite\" in their WatchQueryOptions.\n *\n * The default value is \"overwrite\".\n *\n * @docGroup 3. Caching options\n */\n refetchWritePolicy_suspense: unknown;\n\n /**\n * If true, the query is not executed.\n *\n * The default value is `false`.\n *\n * @docGroup 1. Operation options\n */\n skip: unknown;\n\n /**\n * If `true`, the query is not executed. The default value is `false`.\n *\n * @deprecated We recommend using `skipToken` in place of the `skip` option as\n * it is more type-safe.\n *\n * This option is deprecated and only supported to ease the migration from useQuery. It will be removed in a future release.\n *\n * @docGroup 1. Operation options\n */\n skip_deprecated: unknown;\n\n /**\n * The instance of `ApolloClient` to use to execute the query.\n *\n * By default, the instance that's passed down via context is used, but you\n * can provide a different instance here.\n *\n * @docGroup 1. Operation options\n */\n client: unknown;\n\n /**\n * A unique identifier for the query. Each item in the array must be a stable\n * identifier to prevent infinite fetches.\n *\n * This is useful when using the same query and variables combination in more\n * than one component, otherwise the components may clobber each other. This\n * can also be used to force the query to re-evaluate fresh.\n *\n * @docGroup 1. Operation options\n */\n queryKey: unknown;\n\n /**\n * Pass `false` to skip executing the query during [server-side rendering](https://www.apollographql.com/docs/react/performance/server-side-rendering/).\n *\n * @docGroup 2. Networking options\n */\n ssr: unknown;\n\n /**\n * A callback function that's called whenever a refetch attempt occurs\n * while polling. If the function returns `true`, the refetch is\n * skipped and not reattempted until the next poll interval.\n *\n * @docGroup 2. Networking options\n */\n skipPollAttempt: unknown;\n}\n\nexport interface QueryResultDocumentation {\n /**\n * The instance of Apollo Client that executed the query.\n * Can be useful for manually executing followup queries or writing data to the cache.\n *\n * @docGroup 2. Network info\n */\n client: unknown;\n /**\n * A reference to the internal `ObservableQuery` used by the hook.\n */\n observable: unknown;\n /**\n * An object containing the result of your GraphQL query after it completes.\n *\n * This value might be `undefined` if a query results in one or more errors (depending on the query's `errorPolicy`).\n *\n * @docGroup 1. Operation data\n */\n data: unknown;\n /**\n * An object containing the result from the most recent _previous_ execution of this query.\n *\n * This value is `undefined` if this is the query's first execution.\n *\n * @docGroup 1. Operation data\n */\n previousData: unknown;\n /**\n * If the query produces one or more errors, this object contains either an array of `graphQLErrors` or a single `networkError`. Otherwise, this value is `undefined`.\n *\n * For more information, see [Handling operation errors](https://www.apollographql.com/docs/react/data/error-handling/).\n *\n * @docGroup 1. Operation data\n */\n error: unknown;\n /**\n * If `true`, the query is still in flight and results have not yet been returned.\n *\n * @docGroup 2. Network info\n */\n loading: unknown;\n /**\n * A number indicating the current network state of the query's associated request. [See possible values.](https://github.com/apollographql/apollo-client/blob/d96f4578f89b933c281bb775a39503f6cdb59ee8/src/core/networkStatus.ts#L4)\n *\n * Used in conjunction with the [`notifyOnNetworkStatusChange`](#notifyonnetworkstatuschange) option.\n *\n * @docGroup 2. Network info\n */\n networkStatus: unknown;\n /**\n * An object containing the variables that were provided for the query.\n *\n * @docGroup 1. Operation data\n */\n variables: unknown;\n\n /**\n * A function that enables you to re-execute the query, optionally passing in new `variables`.\n *\n * To guarantee that the refetch performs a network request, its `fetchPolicy` is set to `network-only` (unless the original query's `fetchPolicy` is `no-cache` or `cache-and-network`, which also guarantee a network request).\n *\n * See also [Refetching](https://www.apollographql.com/docs/react/data/queries/#refetching).\n *\n * @docGroup 3. Helper functions\n */\n refetch: unknown;\n /**\n * {@inheritDoc @apollo/client!ObservableQuery#fetchMore:member(1)}\n *\n * @docGroup 3. Helper functions\n */\n fetchMore: unknown;\n /**\n * {@inheritDoc @apollo/client!ObservableQuery#startPolling:member(1)}\n *\n * @docGroup 3. Helper functions\n */\n startPolling: unknown;\n /**\n * {@inheritDoc @apollo/client!ObservableQuery#stopPolling:member(1)}\n *\n * @docGroup 3. Helper functions\n */\n stopPolling: unknown;\n /**\n * {@inheritDoc @apollo/client!ObservableQuery#subscribeToMore:member(1)}\n *\n * @docGroup 3. Helper functions\n */\n subscribeToMore: unknown;\n /**\n * {@inheritDoc @apollo/client!ObservableQuery#updateQuery:member(1)}\n *\n * @docGroup 3. Helper functions\n */\n updateQuery: unknown;\n\n /**\n * Describes the completeness of `data`.\n * - `empty`: No data could be fulfilled from the cache or the result is\n * incomplete. `data` is `undefined`.\n * - `partial`: Some data could be fulfilled from the cache but `data` is\n * incomplete. This is only possible when `returnPartialData` is `true`.\n * - `streaming`: `data` is incomplete as a result of a deferred query and\n * the result is still streaming in.\n * - `complete`: `data` is a fully satisfied query result fulfilled\n * either from the cache or network.\n */\n dataState: unknown;\n}\n\nexport interface MutationOptionsDocumentation {\n /**\n * A GraphQL document, often created with `gql` from the `graphql-tag`\n * package, that contains a single mutation inside of it.\n *\n * @docGroup 1. Operation options\n */\n mutation: unknown;\n\n /**\n * Provide `no-cache` if the mutation's result should _not_ be written to the Apollo Client cache.\n *\n * The default value is `network-only` (which means the result _is_ written to the cache).\n *\n * Unlike queries, mutations _do not_ support [fetch policies](https://www.apollographql.com/docs/react/data/queries/#setting-a-fetch-policy) besides `network-only` and `no-cache`.\n *\n * @docGroup 3. Caching options\n */\n fetchPolicy: unknown;\n\n /**\n * To avoid retaining sensitive information from mutation root field\n * arguments, Apollo Client v3.4+ automatically clears any `ROOT_MUTATION`\n * fields from the cache after each mutation finishes. If you need this\n * information to remain in the cache, you can prevent the removal by passing\n * `keepRootFields: true` to the mutation. `ROOT_MUTATION` result data are\n * also passed to the mutation `update` function, so we recommend obtaining\n * the results that way, rather than using this option, if possible.\n */\n keepRootFields: unknown;\n\n /**\n * By providing either an object or a callback function that, when invoked after\n * a mutation, allows you to return optimistic data and optionally skip updates\n * via the `IGNORE` sentinel object, Apollo Client caches this temporary\n * (and potentially incorrect) response until the mutation completes, enabling\n * more responsive UI updates.\n *\n * For more information, see [Optimistic mutation results](https://www.apollographql.com/docs/react/performance/optimistic-ui/).\n *\n * @docGroup 3. Caching options\n */\n optimisticResponse: unknown;\n\n /**\n * A `MutationQueryReducersMap`, which is map from query names to\n * mutation query reducers. Briefly, this map defines how to incorporate the\n * results of the mutation into the results of queries that are currently\n * being watched by your application.\n */\n updateQueries: unknown;\n\n /**\n * An array (or a function that _returns_ an array) that specifies which queries you want to refetch after the mutation occurs.\n *\n * Each array value can be either:\n *\n * - An object containing the `query` to execute, along with any `variables`\n *\n * - A string indicating the operation name of the query to refetch\n *\n * @docGroup 1. Operation options\n */\n refetchQueries: unknown;\n\n /**\n * If `true`, makes sure all queries included in `refetchQueries` are completed before the mutation is considered complete.\n *\n * The default value is `false` (queries are refetched asynchronously).\n *\n * @docGroup 1. Operation options\n */\n awaitRefetchQueries: unknown;\n\n /**\n * A function used to update the Apollo Client cache after the mutation completes.\n *\n * For more information, see [Updating the cache after a mutation](https://www.apollographql.com/docs/react/data/mutations#updating-the-cache-after-a-mutation).\n *\n * @docGroup 3. Caching options\n */\n update: unknown;\n\n /**\n * Optional callback for intercepting queries whose cache data has been updated by the mutation, as well as any queries specified in the `refetchQueries: [...]` list passed to `client.mutate`.\n *\n * Returning a `Promise` from `onQueryUpdated` will cause the final mutation `Promise` to await the returned `Promise`. Returning `false` causes the query to be ignored.\n *\n * @docGroup 1. Operation options\n */\n onQueryUpdated: unknown;\n\n /**\n * Specifies how the mutation handles a response that returns both GraphQL errors and partial results.\n *\n * For details, see [GraphQL error policies](https://www.apollographql.com/docs/react/data/error-handling/#graphql-error-policies).\n *\n * The default value is `none`, meaning that the mutation result includes error details but _not_ partial results.\n *\n * @docGroup 1. Operation options\n */\n errorPolicy: unknown;\n\n /**\n * An object containing all of the GraphQL variables your mutation requires to execute.\n *\n * Each key in the object corresponds to a variable name, and that key's value corresponds to the variable value.\n *\n * @docGroup 1. Operation options\n */\n variables: unknown;\n\n /**\n * If you're using [Apollo Link](https://www.apollographql.com/docs/react/api/link/introduction/), this object is the initial value of the `context` object that's passed along your link chain.\n *\n * @docGroup 2. Networking options\n */\n context: unknown;\n\n /**\n * The instance of `ApolloClient` to use to execute the mutation.\n *\n * By default, the instance that's passed down via context is used, but you can provide a different instance here.\n *\n * @docGroup 2. Networking options\n */\n client: unknown;\n /**\n * If `true`, the in-progress mutation's associated component re-renders whenever the network status changes or a network error occurs.\n *\n * The default value is `true`.\n *\n * @docGroup 2. Networking options\n */\n notifyOnNetworkStatusChange: unknown;\n /**\n * A callback function that's called when your mutation successfully completes with zero errors (or if `errorPolicy` is `ignore` and partial data is returned).\n *\n * This function is passed the mutation's result `data` and any options passed to the mutation.\n *\n * @docGroup 1. Operation options\n */\n onCompleted: unknown;\n /**\n * A callback function that's called when the mutation encounters one or more errors (unless `errorPolicy` is `ignore`).\n *\n * This function is passed an [`ApolloError`](https://github.com/apollographql/apollo-client/blob/d96f4578f89b933c281bb775a39503f6cdb59ee8/src/errors/index.ts#L36-L39) object that contains either a `networkError` object or a `graphQLErrors` array, depending on the error(s) that occurred, as well as any options passed the mutation.\n *\n * @docGroup 1. Operation options\n */\n onError: unknown;\n /**\n * If `true`:\n *\n * - The initial state update (setting loading to true) is skipped\n * - The success state update (setting data and setting loading to false) is skipped\n * - Error updates will still occur\n *\n * The default value is `false`.\n *\n * This option is useful when you want to execute a mutation but don't need to track its progress or result in the UI, potentially improving performance by reducing re-renders.\n *\n * @docGroup 1. Operation options\n */\n ignoreResults: unknown;\n}\n\nexport interface MutationResultDocumentation {\n /**\n * The data returned from your mutation. Can be `undefined` if `ignoreResults` is `true`.\n */\n data: unknown;\n /**\n * If the mutation produces one or more errors, this object contains either an array of `graphQLErrors` or a single `networkError`. Otherwise, this value is `undefined`.\n *\n * For more information, see [Handling operation errors](https://www.apollographql.com/docs/react/data/error-handling/).\n */\n error: unknown;\n /**\n * If `true`, the mutation is currently in flight.\n */\n loading: unknown;\n /**\n * If `true`, the mutation's mutate function has been called.\n */\n called: unknown;\n /**\n * The instance of Apollo Client that executed the mutation.\n *\n * Can be useful for manually executing followup operations or writing data to the cache.\n */\n client: unknown;\n /**\n * A function that you can call to reset the mutation's result to its initial, uncalled state.\n */\n reset: unknown;\n /**\n * Custom extensions returned from the GraphQL server\n */\n extensions: unknown;\n}\n\nexport interface SubscriptionOptionsDocumentation {\n /**\n * A GraphQL document, often created with `gql` from the `graphql-tag`\n * package, that contains a single subscription inside of it.\n */\n query: unknown;\n /**\n * An object containing all of the variables your subscription needs to execute\n */\n variables: unknown;\n\n /**\n * Specifies the `ErrorPolicy` to be used for this operation\n */\n errorPolicy: unknown;\n\n /**\n * How you want your component to interact with the Apollo cache. For details, see [Setting a fetch policy](https://www.apollographql.com/docs/react/data/queries/#setting-a-fetch-policy).\n */\n fetchPolicy: unknown;\n\n /**\n * Determines if your subscription should be unsubscribed and subscribed again when an input to the hook (such as `subscription` or `variables`) changes.\n */\n shouldResubscribe: unknown;\n\n /**\n * If `true`, the hook will not cause the component to rerender. This is useful when you want to control the rendering of your component yourself with logic in the `onData` and `onError` callbacks.\n *\n * Changing this to `true` when the hook already has `data` will reset the `data` to `undefined`.\n */\n ignoreResults: unknown;\n /**\n * An `ApolloClient` instance. By default `useSubscription` / `Subscription` uses the client passed down via context, but a different client can be passed in.\n */\n client: unknown;\n\n /**\n * Determines if the current subscription should be skipped. Useful if, for example, variables depend on previous queries and are not ready yet.\n */\n skip: unknown;\n\n /**\n * Shared context between your component and your network interface (Apollo Link).\n */\n context: unknown;\n\n /**\n * Shared context between your component and your network interface (Apollo Link).\n */\n extensions: unknown;\n\n /**\n * Allows the registration of a callback function that will be triggered each time the `useSubscription` Hook / `Subscription` component completes the subscription.\n *\n * @since 3.7.0\n */\n onComplete: unknown;\n\n /**\n * Allows the registration of a callback function that will be triggered each time the `useSubscription` Hook / `Subscription` component receives data. The callback `options` object param consists of the current Apollo Client instance in `client`, and the received subscription data in `data`.\n *\n * @since 3.7.0\n */\n onData: unknown;\n\n /**\n * Allows the registration of a callback function that will be triggered each time the `useSubscription` Hook / `Subscription` component receives an error.\n *\n * @since 3.7.0\n */\n onError: unknown;\n}\n\nexport interface SubscriptionResultDocumentation {\n /**\n * A boolean that indicates whether any initial data has been returned\n */\n loading: unknown;\n /**\n * An object containing the result of your GraphQL subscription. Defaults to an empty object.\n */\n data: unknown;\n /**\n * A runtime error with `graphQLErrors` and `networkError` properties\n */\n error: unknown;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.documentation.js","sourceRoot":"","sources":["../../../src/react/types/types.documentation.ts"],"names":[],"mappings":"","sourcesContent":["export interface QueryOptionsDocumentation {\n /**\n * A GraphQL query string parsed into an AST with the gql template literal.\n *\n * @docGroup 1. Operation options\n */\n query: unknown;\n\n /**\n * An object containing all of the GraphQL variables your query requires to execute.\n *\n * Each key in the object corresponds to a variable name, and that key's value corresponds to the variable value.\n *\n * @docGroup 1. Operation options\n */\n variables: unknown;\n\n /**\n * Specifies how the query handles a response that returns both GraphQL errors and partial results.\n *\n * For details, see [GraphQL error policies](https://www.apollographql.com/docs/react/data/error-handling/#graphql-error-policies).\n *\n * The default value is `none`, meaning that the query result includes error details but not partial results.\n *\n * @docGroup 1. Operation options\n */\n errorPolicy: unknown;\n\n /**\n * If you're using [Apollo Link](https://www.apollographql.com/docs/react/api/link/introduction/), this object is the initial value of the `context` object that's passed along your link chain.\n *\n * @docGroup 2. Networking options\n */\n context: unknown;\n\n /**\n * Specifies how the query interacts with the Apollo Client cache during execution (for example, whether it checks the cache for results before sending a request to the server).\n *\n * For details, see [Setting a fetch policy](https://www.apollographql.com/docs/react/data/queries/#setting-a-fetch-policy).\n *\n * The default value is `cache-first`.\n *\n * @docGroup 3. Caching options\n */\n fetchPolicy: unknown;\n\n /**\n * Specifies the `FetchPolicy` to be used after this query has completed.\n *\n * @docGroup 3. Caching options\n */\n nextFetchPolicy: unknown;\n\n /**\n * Defaults to the initial value of options.fetchPolicy, but can be explicitly\n * configured to specify the WatchQueryFetchPolicy to revert back to whenever\n * variables change (unless nextFetchPolicy intervenes).\n *\n * @docGroup 3. Caching options\n */\n initialFetchPolicy: unknown;\n\n /**\n * Specifies the interval (in milliseconds) at which the query polls for updated results.\n *\n * The default value is `0` (no polling).\n *\n * @docGroup 2. Networking options\n */\n pollInterval: unknown;\n\n /**\n * If `true`, the in-progress query's associated component re-renders whenever the network status changes or a network error occurs.\n *\n * The default value is `true`.\n *\n * @docGroup 2. Networking options\n */\n notifyOnNetworkStatusChange: unknown;\n\n /**\n * If `true`, the query can return partial results from the cache if the cache doesn't contain results for all queried fields.\n *\n * The default value is `false`.\n *\n * @docGroup 3. Caching options\n */\n returnPartialData: unknown;\n\n /**\n * Specifies whether a `NetworkStatus.refetch` operation should merge\n * incoming field data with existing data, or overwrite the existing data.\n * Overwriting is probably preferable, but merging is currently the default\n * behavior, for backwards compatibility with Apollo Client 3.x.\n *\n * @docGroup 3. Caching options\n */\n refetchWritePolicy: unknown;\n\n /**\n * Watched queries must opt into overwriting existing data on refetch, by passing refetchWritePolicy: \"overwrite\" in their WatchQueryOptions.\n *\n * The default value is \"overwrite\".\n *\n * @docGroup 3. Caching options\n */\n refetchWritePolicy_suspense: unknown;\n\n /**\n * If true, the query is not executed.\n *\n * The default value is `false`.\n *\n * @docGroup 1. Operation options\n */\n skip: unknown;\n\n /**\n * If `true`, the query is not executed. The default value is `false`.\n *\n * @deprecated We recommend using `skipToken` in place of the `skip` option as\n * it is more type-safe.\n *\n * This option is deprecated and only supported to ease the migration from `useQuery`. It will be removed in a future release.\n * Please use [`skipToken`](https://www.apollographql.com/docs/react/api/react/hooks#skiptoken) instead of the `skip` option as it is more type-safe.\n *\n * @docGroup 1. Operation options\n */\n skip_deprecated: unknown;\n\n /**\n * The instance of `ApolloClient` to use to execute the query.\n *\n * By default, the instance that's passed down via context is used, but you\n * can provide a different instance here.\n *\n * @docGroup 1. Operation options\n */\n client: unknown;\n\n /**\n * A unique identifier for the query. Each item in the array must be a stable\n * identifier to prevent infinite fetches.\n *\n * This is useful when using the same query and variables combination in more\n * than one component, otherwise the components may clobber each other. This\n * can also be used to force the query to re-evaluate fresh.\n *\n * @docGroup 1. Operation options\n */\n queryKey: unknown;\n\n /**\n * Pass `false` to skip executing the query during [server-side rendering](https://www.apollographql.com/docs/react/performance/server-side-rendering/).\n *\n * @docGroup 2. Networking options\n */\n ssr: unknown;\n\n /**\n * A callback function that's called whenever a refetch attempt occurs\n * while polling. If the function returns `true`, the refetch is\n * skipped and not reattempted until the next poll interval.\n *\n * @docGroup 2. Networking options\n */\n skipPollAttempt: unknown;\n}\n\nexport interface QueryResultDocumentation {\n /**\n * The instance of Apollo Client that executed the query.\n * Can be useful for manually executing followup queries or writing data to the cache.\n *\n * @docGroup 2. Network info\n */\n client: unknown;\n /**\n * A reference to the internal `ObservableQuery` used by the hook.\n */\n observable: unknown;\n /**\n * An object containing the result of your GraphQL query after it completes.\n *\n * This value might be `undefined` if a query results in one or more errors (depending on the query's `errorPolicy`).\n *\n * @docGroup 1. Operation data\n */\n data: unknown;\n /**\n * An object containing the result from the most recent _previous_ execution of this query.\n *\n * This value is `undefined` if this is the query's first execution.\n *\n * @docGroup 1. Operation data\n */\n previousData: unknown;\n /**\n * A single ErrorLike object describing the error that occured during the latest\n * query execution.\n *\n * For more information, see [Handling operation errors](https://www.apollographql.com/docs/react/data/error-handling/).\n *\n * @docGroup 1. Operation data\n */\n error: unknown;\n /**\n * If `true`, the query is still in flight and results have not yet been returned.\n *\n * @docGroup 2. Network info\n */\n loading: unknown;\n /**\n * A number indicating the current network state of the query's associated request. [See possible values.](https://github.com/apollographql/apollo-client/blob/d96f4578f89b933c281bb775a39503f6cdb59ee8/src/core/networkStatus.ts#L4)\n *\n * Used in conjunction with the [`notifyOnNetworkStatusChange`](#notifyonnetworkstatuschange) option.\n *\n * @docGroup 2. Network info\n */\n networkStatus: unknown;\n /**\n * An object containing the variables that were provided for the query.\n *\n * @docGroup 1. Operation data\n */\n variables: unknown;\n\n /**\n * A function that enables you to re-execute the query, optionally passing in new `variables`.\n *\n * To guarantee that the refetch performs a network request, its `fetchPolicy` is set to `network-only` (unless the original query's `fetchPolicy` is `no-cache` or `cache-and-network`, which also guarantee a network request).\n *\n * See also [Refetching](https://www.apollographql.com/docs/react/data/queries/#refetching).\n *\n * Returns a `ResultPromise` with an additional `.retain()` method. Calling\n * `.retain()` keeps the network operation running even if the `ObservableQuery`\n * no longer requires the result.\n *\n * @docGroup 3. Helper functions\n */\n refetch: unknown;\n /**\n * {@inheritDoc @apollo/client!ObservableQuery#fetchMore:member(1)}\n *\n * @docGroup 3. Helper functions\n */\n fetchMore: unknown;\n /**\n * {@inheritDoc @apollo/client!ObservableQuery#startPolling:member(1)}\n *\n * @docGroup 3. Helper functions\n */\n startPolling: unknown;\n /**\n * {@inheritDoc @apollo/client!ObservableQuery#stopPolling:member(1)}\n *\n * @docGroup 3. Helper functions\n */\n stopPolling: unknown;\n /**\n * {@inheritDoc @apollo/client!ObservableQuery#subscribeToMore:member(1)}\n *\n * @docGroup 3. Helper functions\n */\n subscribeToMore: unknown;\n /**\n * {@inheritDoc @apollo/client!ObservableQuery#updateQuery:member(1)}\n *\n * @docGroup 3. Helper functions\n */\n updateQuery: unknown;\n\n /**\n * Describes the completeness of `data`.\n *\n * - `empty`: No data could be fulfilled from the cache or the result is\n * incomplete. `data` is `undefined`.\n * - `partial`: Some data could be fulfilled from the cache but `data` is\n * incomplete. This is only possible when `returnPartialData` is `true`.\n * - `streaming`: `data` is incomplete as a result of a deferred query and\n * the result is still streaming in.\n * - `complete`: `data` is a fully satisfied query result fulfilled\n * either from the cache or network.\n *\n * @docGroup 1. Operation data\n */\n dataState: unknown;\n\n /**\n * Describes whether `data` is a complete or partial result. This flag is only\n * set when `returnPartialData` is `true` in query options.\n *\n * @deprecated This field will be removed in a future version of Apollo Client.\n * @docGroup 1. Operation data\n */\n partial: boolean;\n}\n\nexport interface MutationOptionsDocumentation {\n /**\n * A GraphQL document, often created with `gql` from the `graphql-tag`\n * package, that contains a single mutation inside of it.\n *\n * @docGroup 1. Operation options\n */\n mutation: unknown;\n\n /**\n * Provide `no-cache` if the mutation's result should _not_ be written to the Apollo Client cache.\n *\n * The default value is `network-only` (which means the result _is_ written to the cache).\n *\n * Unlike queries, mutations _do not_ support [fetch policies](https://www.apollographql.com/docs/react/data/queries/#setting-a-fetch-policy) besides `network-only` and `no-cache`.\n *\n * @docGroup 3. Caching options\n */\n fetchPolicy: unknown;\n\n /**\n * To avoid retaining sensitive information from mutation root field\n * arguments, Apollo Client v3.4+ automatically clears any `ROOT_MUTATION`\n * fields from the cache after each mutation finishes. If you need this\n * information to remain in the cache, you can prevent the removal by passing\n * `keepRootFields: true` to the mutation. `ROOT_MUTATION` result data are\n * also passed to the mutation `update` function, so we recommend obtaining\n * the results that way, rather than using this option, if possible.\n */\n keepRootFields: unknown;\n\n /**\n * By providing either an object or a callback function that, when invoked after\n * a mutation, allows you to return optimistic data and optionally skip updates\n * via the `IGNORE` sentinel object, Apollo Client caches this temporary\n * (and potentially incorrect) response until the mutation completes, enabling\n * more responsive UI updates.\n *\n * For more information, see [Optimistic mutation results](https://www.apollographql.com/docs/react/performance/optimistic-ui/).\n *\n * @docGroup 3. Caching options\n */\n optimisticResponse: unknown;\n\n /**\n * A `MutationQueryReducersMap`, which is map from query names to\n * mutation query reducers. Briefly, this map defines how to incorporate the\n * results of the mutation into the results of queries that are currently\n * being watched by your application.\n */\n updateQueries: unknown;\n\n /**\n * An array (or a function that _returns_ an array) that specifies which queries you want to refetch after the mutation occurs.\n *\n * Each array value can be either:\n *\n * - An object containing the `query` to execute, along with any `variables`\n *\n * - A string indicating the operation name of the query to refetch\n *\n * @docGroup 1. Operation options\n */\n refetchQueries: unknown;\n\n /**\n * If `true`, makes sure all queries included in `refetchQueries` are completed before the mutation is considered complete.\n *\n * The default value is `false` (queries are refetched asynchronously).\n *\n * @docGroup 1. Operation options\n */\n awaitRefetchQueries: unknown;\n\n /**\n * A function used to update the Apollo Client cache after the mutation completes.\n *\n * For more information, see [Updating the cache after a mutation](https://www.apollographql.com/docs/react/data/mutations#updating-the-cache-after-a-mutation).\n *\n * @docGroup 3. Caching options\n */\n update: unknown;\n\n /**\n * Optional callback for intercepting queries whose cache data has been updated by the mutation, as well as any queries specified in the `refetchQueries: [...]` list passed to `client.mutate`.\n *\n * Returning a `Promise` from `onQueryUpdated` will cause the final mutation `Promise` to await the returned `Promise`. Returning `false` causes the query to be ignored.\n *\n * @docGroup 1. Operation options\n */\n onQueryUpdated: unknown;\n\n /**\n * Specifies how the mutation handles a response that returns both GraphQL errors and partial results.\n *\n * For details, see [GraphQL error policies](https://www.apollographql.com/docs/react/data/error-handling/#graphql-error-policies).\n *\n * The default value is `none`, meaning that the mutation result includes error details but _not_ partial results.\n *\n * @docGroup 1. Operation options\n */\n errorPolicy: unknown;\n\n /**\n * An object containing all of the GraphQL variables your mutation requires to execute.\n *\n * Each key in the object corresponds to a variable name, and that key's value corresponds to the variable value.\n *\n * @docGroup 1. Operation options\n */\n variables: unknown;\n\n /**\n * If you're using [Apollo Link](https://www.apollographql.com/docs/react/api/link/introduction/), this object is the initial value of the `context` object that's passed along your link chain.\n *\n * @docGroup 2. Networking options\n */\n context: unknown;\n\n /**\n * The instance of `ApolloClient` to use to execute the mutation.\n *\n * By default, the instance that's passed down via context is used, but you can provide a different instance here.\n *\n * @docGroup 2. Networking options\n */\n client: unknown;\n /**\n * If `true`, the in-progress mutation's associated component re-renders whenever the network status changes or a network error occurs.\n *\n * The default value is `true`.\n *\n * @docGroup 2. Networking options\n */\n notifyOnNetworkStatusChange: unknown;\n /**\n * A callback function that's called when your mutation successfully completes with zero errors (or if `errorPolicy` is `ignore` and partial data is returned).\n *\n * This function is passed the mutation's result `data` and any options passed to the mutation.\n *\n * @docGroup 1. Operation options\n */\n onCompleted: unknown;\n /**\n * A callback function that's called when the mutation encounters one or more errors (unless `errorPolicy` is `ignore`).\n *\n * This function is passed an [`ApolloError`](https://github.com/apollographql/apollo-client/blob/d96f4578f89b933c281bb775a39503f6cdb59ee8/src/errors/index.ts#L36-L39) object that contains either a `networkError` object or a `graphQLErrors` array, depending on the error(s) that occurred, as well as any options passed the mutation.\n *\n * @docGroup 1. Operation options\n */\n onError: unknown;\n /**\n * If `true`:\n *\n * - The initial state update (setting loading to true) is skipped\n * - The success state update (setting data and setting loading to false) is skipped\n * - Error updates will still occur\n *\n * The default value is `false`.\n *\n * This option is useful when you want to execute a mutation but don't need to track its progress or result in the UI, potentially improving performance by reducing re-renders.\n *\n * @docGroup 1. Operation options\n */\n ignoreResults: unknown;\n}\n\nexport interface MutationResultDocumentation {\n /**\n * The data returned from your mutation. Can be `undefined` if `ignoreResults` is `true`.\n */\n data: unknown;\n /**\n * If the mutation produces one or more errors, this object contains either an array of `graphQLErrors` or a single `networkError`. Otherwise, this value is `undefined`.\n *\n * For more information, see [Handling operation errors](https://www.apollographql.com/docs/react/data/error-handling/).\n */\n error: unknown;\n /**\n * If `true`, the mutation is currently in flight.\n */\n loading: unknown;\n /**\n * If `true`, the mutation's mutate function has been called.\n */\n called: unknown;\n /**\n * The instance of Apollo Client that executed the mutation.\n *\n * Can be useful for manually executing followup operations or writing data to the cache.\n */\n client: unknown;\n /**\n * A function that you can call to reset the mutation's result to its initial, uncalled state.\n */\n reset: unknown;\n /**\n * Custom extensions returned from the GraphQL server\n */\n extensions: unknown;\n}\n\nexport interface SubscriptionOptionsDocumentation {\n /**\n * A GraphQL document, often created with `gql` from the `graphql-tag`\n * package, that contains a single subscription inside of it.\n */\n query: unknown;\n /**\n * An object containing all of the variables your subscription needs to execute\n */\n variables: unknown;\n\n /**\n * Specifies the `ErrorPolicy` to be used for this operation\n */\n errorPolicy: unknown;\n\n /**\n * How you want your component to interact with the Apollo cache. For details, see [Setting a fetch policy](https://www.apollographql.com/docs/react/data/queries/#setting-a-fetch-policy).\n */\n fetchPolicy: unknown;\n\n /**\n * Determines if your subscription should be unsubscribed and subscribed again when an input to the hook (such as `subscription` or `variables`) changes.\n */\n shouldResubscribe: unknown;\n\n /**\n * If `true`, the hook will not cause the component to rerender. This is useful when you want to control the rendering of your component yourself with logic in the `onData` and `onError` callbacks.\n *\n * Changing this to `true` when the hook already has `data` will reset the `data` to `undefined`.\n */\n ignoreResults: unknown;\n /**\n * An `ApolloClient` instance. By default `useSubscription` / `Subscription` uses the client passed down via context, but a different client can be passed in.\n */\n client: unknown;\n\n /**\n * Determines if the current subscription should be skipped. Useful if, for example, variables depend on previous queries and are not ready yet.\n */\n skip: unknown;\n\n /**\n * Shared context between your component and your network interface (Apollo Link).\n */\n context: unknown;\n\n /**\n * Shared context between your component and your network interface (Apollo Link).\n */\n extensions: unknown;\n\n /**\n * Allows the registration of a callback function that will be triggered each time the `useSubscription` Hook / `Subscription` component completes the subscription.\n */\n onComplete: unknown;\n\n /**\n * Allows the registration of a callback function that will be triggered each time the `useSubscription` Hook / `Subscription` component receives data. The callback `options` object param consists of the current Apollo Client instance in `client`, and the received subscription data in `data`.\n */\n onData: unknown;\n\n /**\n * Allows the registration of a callback function that will be triggered each time the `useSubscription` Hook / `Subscription` component receives an error.\n */\n onError: unknown;\n}\n\nexport interface SubscriptionResultDocumentation {\n /**\n * A boolean that indicates whether any initial data has been returned\n */\n loading: unknown;\n /**\n * An object containing the result of your GraphQL subscription. Defaults to an empty object.\n */\n data: unknown;\n /**\n * A runtime error with `graphQLErrors` and `networkError` properties\n */\n error: unknown;\n}\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DocumentNode } from "graphql";
|
|
2
2
|
import { Observable } from "rxjs";
|
|
3
|
+
import type { OperationVariables } from "@apollo/client";
|
|
3
4
|
import type { FetchResult, Operation } from "@apollo/client/link";
|
|
4
5
|
import { ApolloLink } from "@apollo/client/link";
|
|
5
6
|
import type { Unmasked } from "@apollo/client/masking";
|
|
@@ -18,11 +19,11 @@ export declare namespace MockLink {
|
|
|
18
19
|
interface DefaultOptions {
|
|
19
20
|
delay?: MockLink.Delay;
|
|
20
21
|
}
|
|
21
|
-
interface MockedRequest<TVariables =
|
|
22
|
+
interface MockedRequest<TVariables extends OperationVariables = OperationVariables> {
|
|
22
23
|
query: DocumentNode;
|
|
23
24
|
variables?: TVariables | VariableMatcher<TVariables>;
|
|
24
25
|
}
|
|
25
|
-
interface MockedResponse<out TData = Record<string, any>, out TVariables = Record<string, any>> {
|
|
26
|
+
interface MockedResponse<out TData = Record<string, any>, out TVariables extends OperationVariables = Record<string, any>> {
|
|
26
27
|
request: MockedRequest<TVariables>;
|
|
27
28
|
maxUsageCount?: number;
|
|
28
29
|
result?: FetchResult<Unmasked<TData>> | ResultFunction<FetchResult<Unmasked<TData>>, TVariables>;
|