@apollo/client 4.0.0-alpha.1 → 4.0.0-alpha.10
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/.changeset/afraid-moons-arrive.md +5 -0
- package/.changeset/beige-mirrors-talk.md +15 -0
- package/.changeset/cool-kiwis-hunt.md +15 -0
- package/.changeset/cuddly-spiders-tie.md +5 -0
- package/.changeset/dirty-eagles-poke.md +5 -0
- package/.changeset/early-eggs-develop.md +22 -0
- package/.changeset/eighty-squids-fix.md +15 -0
- package/.changeset/eleven-kangaroos-jump.md +5 -0
- package/.changeset/forty-shrimps-fry.md +5 -0
- package/.changeset/forty-tomatoes-punch.md +5 -0
- package/.changeset/four-countries-clean.md +24 -0
- package/.changeset/four-ghosts-watch.md +5 -0
- package/.changeset/funny-jeans-invent.md +16 -0
- package/.changeset/funny-terms-deny.md +5 -0
- package/.changeset/fuzzy-tips-sit.md +5 -0
- package/.changeset/gentle-badgers-train.md +5 -0
- package/.changeset/giant-apes-thank.md +5 -0
- package/.changeset/giant-bags-share.md +5 -0
- package/.changeset/gorgeous-chefs-tap.md +5 -0
- package/.changeset/great-roses-jog.md +15 -0
- package/.changeset/grumpy-vans-type.md +5 -0
- package/.changeset/hip-vans-act.md +5 -0
- package/.changeset/hungry-bikes-cough.md +5 -0
- package/.changeset/itchy-chefs-run.md +23 -0
- package/.changeset/khaki-keys-deliver.md +5 -0
- package/.changeset/khaki-spies-work.md +11 -0
- package/.changeset/large-plants-know.md +5 -0
- package/.changeset/light-apes-rescue.md +5 -0
- package/.changeset/little-spoons-kick.md +7 -0
- package/.changeset/loud-cows-raise.md +7 -0
- package/.changeset/many-buses-allow.md +5 -0
- package/.changeset/mean-lizards-think.md +5 -0
- package/.changeset/nervous-fireants-bow.md +5 -0
- package/.changeset/nervous-goats-allow.md +5 -0
- package/.changeset/nice-dots-matter.md +5 -0
- package/.changeset/ninety-bags-bake.md +17 -0
- package/.changeset/odd-chicken-hide.md +17 -0
- package/.changeset/odd-lemons-relax.md +5 -0
- package/.changeset/perfect-vans-give.md +7 -0
- package/.changeset/poor-eels-punch.md +5 -0
- package/.changeset/pre.json +63 -0
- package/.changeset/purple-bears-flash.md +5 -0
- package/.changeset/real-teachers-peel.md +5 -0
- package/.changeset/serious-moons-juggle.md +5 -0
- package/.changeset/seven-dragons-repair.md +14 -0
- package/.changeset/shaggy-pugs-add.md +52 -0
- package/.changeset/short-months-complain.md +5 -0
- package/.changeset/slimy-chicken-melt.md +5 -0
- package/.changeset/slimy-maps-press.md +5 -0
- package/.changeset/small-buttons-rhyme.md +5 -0
- package/.changeset/swift-rivers-share.md +13 -0
- package/.changeset/tall-bikes-develop.md +5 -0
- package/.changeset/tame-points-work.md +11 -0
- package/.changeset/tender-swans-flash.md +16 -0
- package/.changeset/thick-books-grin.md +5 -0
- package/.changeset/thin-peas-hear.md +16 -0
- package/.changeset/tidy-pandas-punch.md +5 -0
- package/.changeset/tough-rockets-allow.md +5 -0
- package/.changeset/tricky-tables-shave.md +5 -0
- package/.changeset/unlucky-kiwis-sell.md +5 -0
- package/.changeset/warm-ties-sit.md +7 -0
- package/.changeset/wicked-forks-double.md +33 -0
- package/.changeset/young-phones-fold.md +5 -0
- package/.changeset/young-snails-grin.md +5 -0
- package/CHANGELOG.md +476 -0
- package/__cjs/cache/core/cache.cjs +2 -2
- package/__cjs/cache/core/cache.cjs.map +1 -1
- package/__cjs/cache/core/cache.d.cts +18 -18
- package/__cjs/cache/core/types/Cache.cjs.map +1 -1
- package/__cjs/cache/core/types/Cache.d.cts +9 -16
- package/__cjs/cache/core/types/DataProxy.d.cts +8 -23
- package/__cjs/cache/core/types/common.cjs +1 -0
- package/__cjs/cache/core/types/common.cjs.map +1 -1
- package/__cjs/cache/index.cjs +4 -4
- package/__cjs/cache/index.cjs.map +1 -1
- package/__cjs/cache/index.d.cts +3 -3
- package/__cjs/cache/inmemory/entityStore.cjs +9 -8
- package/__cjs/cache/inmemory/entityStore.cjs.map +1 -1
- package/__cjs/cache/inmemory/entityStore.d.cts +3 -2
- package/__cjs/cache/inmemory/fragmentRegistry.cjs +3 -3
- package/__cjs/cache/inmemory/fragmentRegistry.cjs.map +1 -1
- package/__cjs/cache/inmemory/helpers.cjs +0 -8
- package/__cjs/cache/inmemory/helpers.cjs.map +1 -1
- package/__cjs/cache/inmemory/helpers.d.cts +3 -4
- package/__cjs/cache/inmemory/inMemoryCache.cjs +4 -12
- package/__cjs/cache/inmemory/inMemoryCache.cjs.map +1 -1
- package/__cjs/cache/inmemory/inMemoryCache.d.cts +8 -9
- package/__cjs/cache/inmemory/key-extractor.cjs +1 -1
- package/__cjs/cache/inmemory/policies.cjs +9 -9
- package/__cjs/cache/inmemory/policies.cjs.map +1 -1
- package/__cjs/cache/inmemory/policies.d.cts +1 -1
- package/__cjs/cache/inmemory/reactiveVars.cjs.map +1 -1
- package/__cjs/cache/inmemory/reactiveVars.d.cts +7 -7
- package/__cjs/cache/inmemory/readFromStore.cjs +14 -56
- package/__cjs/cache/inmemory/readFromStore.cjs.map +1 -1
- package/__cjs/cache/inmemory/readFromStore.d.cts +1 -6
- package/__cjs/cache/inmemory/types.d.cts +3 -17
- package/__cjs/cache/inmemory/writeToStore.cjs +8 -8
- package/__cjs/cache/inmemory/writeToStore.cjs.map +1 -1
- package/__cjs/cache/inmemory/writeToStore.d.cts +2 -2
- package/__cjs/config/jest/areCombinedGraphQLErrorsEqual.cjs +6 -4
- package/__cjs/config/jest/areCombinedGraphQLErrorsEqual.cjs.map +1 -1
- package/__cjs/config/jest/areCombinedProtocolErrorsEqual.cjs +3 -3
- package/__cjs/config/jest/areCombinedProtocolErrorsEqual.cjs.map +1 -1
- package/__cjs/config/jest/areMissingFieldErrorsEqual.cjs +2 -3
- package/__cjs/config/jest/areMissingFieldErrorsEqual.cjs.map +1 -1
- package/__cjs/config/jest/areServerErrorsEqual.cjs +22 -0
- package/__cjs/config/jest/areServerErrorsEqual.cjs.map +1 -0
- package/__cjs/config/jest/areServerErrorsEqual.d.cts +3 -0
- package/__cjs/config/jest/resolver.cjs +11 -0
- package/__cjs/config/jest/resolver.cjs.map +1 -1
- package/__cjs/config/jest/setup.cjs +18 -1
- package/__cjs/config/jest/setup.cjs.map +1 -1
- package/__cjs/core/ApolloClient.cjs +34 -17
- package/__cjs/core/ApolloClient.cjs.map +1 -1
- package/__cjs/core/ApolloClient.d.cts +35 -25
- package/__cjs/core/LocalState.cjs +2 -2
- package/__cjs/core/LocalState.cjs.map +1 -1
- package/__cjs/core/LocalState.d.cts +8 -8
- package/__cjs/core/ObservableQuery.cjs +268 -104
- package/__cjs/core/ObservableQuery.cjs.map +1 -1
- package/__cjs/core/ObservableQuery.d.cts +156 -17
- package/__cjs/core/QueryInfo.cjs +12 -86
- package/__cjs/core/QueryInfo.cjs.map +1 -1
- package/__cjs/core/QueryInfo.d.cts +2 -11
- package/__cjs/core/QueryManager.cjs +148 -104
- package/__cjs/core/QueryManager.cjs.map +1 -1
- package/__cjs/core/QueryManager.d.cts +45 -24
- package/__cjs/core/index.cjs +42 -21
- package/__cjs/core/index.cjs.map +1 -1
- package/__cjs/core/index.d.cts +12 -11
- package/__cjs/core/types.d.cts +60 -7
- package/__cjs/core/watchQueryOptions.d.cts +32 -119
- package/__cjs/errors/CombinedGraphQLErrors.cjs +30 -11
- package/__cjs/errors/CombinedGraphQLErrors.cjs.map +1 -1
- package/__cjs/errors/CombinedGraphQLErrors.d.cts +21 -2
- package/__cjs/errors/CombinedProtocolErrors.cjs +13 -6
- package/__cjs/errors/CombinedProtocolErrors.cjs.map +1 -1
- package/__cjs/errors/CombinedProtocolErrors.d.cts +9 -0
- package/__cjs/errors/LinkError.cjs +20 -0
- package/__cjs/errors/LinkError.cjs.map +1 -0
- package/__cjs/errors/LinkError.d.cts +14 -0
- package/__cjs/errors/ServerError.cjs +6 -0
- package/__cjs/errors/ServerError.cjs.map +1 -1
- package/__cjs/errors/ServerError.d.cts +2 -0
- package/__cjs/errors/ServerParseError.cjs +6 -0
- package/__cjs/errors/ServerParseError.cjs.map +1 -1
- package/__cjs/errors/ServerParseError.d.cts +2 -0
- package/__cjs/errors/UnconventionalError.cjs +6 -0
- package/__cjs/errors/UnconventionalError.cjs.map +1 -1
- package/__cjs/errors/UnconventionalError.d.cts +2 -0
- package/__cjs/errors/index.cjs +19 -4
- package/__cjs/errors/index.cjs.map +1 -1
- package/__cjs/errors/index.d.cts +2 -3
- package/__cjs/errors/isErrorLike.cjs +12 -0
- package/__cjs/errors/isErrorLike.cjs.map +1 -0
- package/__cjs/errors/isErrorLike.d.cts +3 -0
- package/__cjs/errors/utils.cjs +18 -0
- package/__cjs/errors/utils.cjs.map +1 -0
- package/__cjs/errors/utils.d.cts +3 -0
- package/__cjs/invariantErrorCodes.cjs +131 -138
- package/__cjs/link/batch/index.cjs +4 -2
- package/__cjs/link/batch/index.cjs.map +1 -1
- package/__cjs/link/batch/index.d.cts +2 -1
- package/__cjs/link/batch-http/index.cjs +3 -2
- package/__cjs/link/batch-http/index.cjs.map +1 -1
- package/__cjs/link/batch-http/index.d.cts +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 -20
- package/__cjs/link/core/ApolloLink.cjs.map +1 -1
- package/__cjs/link/core/ApolloLink.d.cts +1 -3
- package/__cjs/link/core/index.cjs.map +1 -1
- package/__cjs/link/core/index.d.cts +1 -1
- package/__cjs/link/core/types.d.cts +1 -1
- package/__cjs/link/error/index.cjs +13 -28
- package/__cjs/link/error/index.cjs.map +1 -1
- package/__cjs/link/error/index.d.cts +4 -15
- package/__cjs/link/http/checkFetcher.cjs +1 -1
- package/__cjs/link/http/createHttpLink.cjs +1 -1
- package/__cjs/link/http/createHttpLink.d.cts +2 -1
- package/__cjs/link/http/parseAndCheckHttpResponse.cjs +1 -1
- package/__cjs/link/http/serializeFetchParameter.cjs +1 -1
- package/__cjs/link/persisted-queries/index.cjs +3 -3
- package/__cjs/link/persisted-queries/index.cjs.map +1 -1
- package/__cjs/link/persisted-queries/index.d.cts +14 -3
- package/__cjs/link/remove-typename/removeTypenameFromVariables.cjs +1 -1
- package/__cjs/link/remove-typename/removeTypenameFromVariables.cjs.map +1 -1
- package/__cjs/link/remove-typename/removeTypenameFromVariables.d.cts +10 -1
- package/__cjs/link/retry/index.cjs +3 -2
- package/__cjs/link/retry/index.cjs.map +1 -1
- package/__cjs/link/retry/index.d.cts +1 -1
- package/__cjs/link/subscriptions/index.cjs +3 -1
- package/__cjs/link/subscriptions/index.cjs.map +1 -1
- package/__cjs/link/utils/validateOperation.cjs +1 -1
- package/__cjs/masking/maskDefinition.cjs +2 -2
- package/__cjs/masking/maskDefinition.cjs.map +1 -1
- package/__cjs/masking/maskDefinition.d.cts +1 -1
- package/__cjs/masking/maskFragment.cjs +2 -2
- package/__cjs/masking/maskFragment.cjs.map +1 -1
- package/__cjs/masking/maskFragment.d.cts +2 -2
- package/__cjs/masking/maskOperation.cjs +1 -1
- package/__cjs/masking/maskOperation.cjs.map +1 -1
- package/__cjs/masking/maskOperation.d.cts +2 -2
- package/__cjs/masking/utils.cjs +1 -1
- package/__cjs/react/context/ApolloConsumer.cjs +1 -1
- package/__cjs/react/context/ApolloConsumer.cjs.map +1 -1
- package/__cjs/react/context/ApolloConsumer.d.cts +7 -4
- package/__cjs/react/context/ApolloContext.cjs +1 -1
- package/__cjs/react/context/ApolloContext.cjs.map +1 -1
- package/__cjs/react/context/ApolloContext.d.cts +4 -4
- package/__cjs/react/context/ApolloProvider.cjs +1 -1
- package/__cjs/react/context/ApolloProvider.cjs.map +1 -1
- package/__cjs/react/context/ApolloProvider.d.cts +7 -5
- package/__cjs/react/hooks/internal/__use.d.cts +3 -1
- package/__cjs/react/hooks/internal/useIsomorphicLayoutEffect.d.cts +1 -1
- package/__cjs/react/hooks/internal/validateSuspenseHookOptions.cjs +28 -0
- package/__cjs/react/hooks/internal/validateSuspenseHookOptions.cjs.map +1 -0
- package/__cjs/react/hooks/internal/validateSuspenseHookOptions.d.cts +3 -0
- package/__cjs/react/hooks/internal/wrapHook.cjs +26 -5
- package/__cjs/react/hooks/internal/wrapHook.cjs.map +1 -1
- package/__cjs/react/hooks/internal/wrapHook.d.cts +7 -5
- 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 +2 -2
- package/__cjs/react/hooks/useBackgroundQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useBackgroundQuery.d.cts +143 -46
- package/__cjs/react/hooks/useFragment.cjs.map +1 -1
- package/__cjs/react/hooks/useFragment.d.cts +51 -26
- package/__cjs/react/hooks/useLazyQuery.cjs +31 -32
- package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useLazyQuery.d.cts +278 -276
- package/__cjs/react/hooks/useLoadableQuery.cjs +21 -2
- package/__cjs/react/hooks/useLoadableQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useLoadableQuery.d.cts +106 -34
- package/__cjs/react/hooks/useMutation.cjs +14 -21
- package/__cjs/react/hooks/useMutation.cjs.map +1 -1
- package/__cjs/react/hooks/useMutation.d.cts +198 -4
- package/__cjs/react/hooks/useQuery.cjs +87 -206
- package/__cjs/react/hooks/useQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useQuery.d.cts +274 -4
- package/__cjs/react/hooks/useQueryRefHandlers.cjs.map +1 -1
- package/__cjs/react/hooks/useQueryRefHandlers.d.cts +23 -22
- package/__cjs/react/hooks/useReactiveVar.cjs.map +1 -1
- package/__cjs/react/hooks/useReactiveVar.d.cts +1 -1
- package/__cjs/react/hooks/useReadQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useReadQuery.d.cts +27 -25
- package/__cjs/react/hooks/useSubscription.cjs +9 -60
- package/__cjs/react/hooks/useSubscription.cjs.map +1 -1
- package/__cjs/react/hooks/useSubscription.d.cts +94 -3
- package/__cjs/react/hooks/useSuspenseFragment.cjs.map +1 -1
- package/__cjs/react/hooks/useSuspenseFragment.d.cts +40 -38
- package/__cjs/react/hooks/useSuspenseQuery.cjs +7 -32
- package/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useSuspenseQuery.d.cts +199 -38
- package/__cjs/react/hooks/useSyncExternalStore.cjs +1 -1
- package/__cjs/react/index.cjs +35 -11
- package/__cjs/react/index.cjs.map +1 -1
- package/__cjs/react/index.d.cts +21 -6
- package/__cjs/react/index.react-server.cjs +1 -5
- 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.map +1 -1
- package/__cjs/react/internal/cache/FragmentReference.d.cts +3 -3
- package/__cjs/react/internal/cache/QueryReference.cjs +3 -14
- package/__cjs/react/internal/cache/QueryReference.cjs.map +1 -1
- package/__cjs/react/internal/cache/QueryReference.d.cts +7 -7
- package/__cjs/react/internal/cache/SuspenseCache.cjs.map +1 -1
- package/__cjs/react/internal/cache/SuspenseCache.d.cts +3 -3
- package/__cjs/react/internal/cache/getSuspenseCache.cjs.map +1 -1
- package/__cjs/react/internal/cache/getSuspenseCache.d.cts +4 -4
- package/__cjs/react/internal/index.cjs +3 -1
- package/__cjs/react/internal/index.cjs.map +1 -1
- package/__cjs/react/internal/index.d.cts +2 -0
- package/__cjs/react/internal/types.d.cts +9 -0
- package/__cjs/react/query-preloader/createQueryPreloader.cjs +1 -0
- package/__cjs/react/query-preloader/createQueryPreloader.cjs.map +1 -1
- package/__cjs/react/query-preloader/createQueryPreloader.d.cts +6 -45
- package/__cjs/react/ssr/getDataFromTree.cjs +24 -30
- package/__cjs/react/ssr/getDataFromTree.cjs.map +1 -1
- package/__cjs/react/ssr/getDataFromTree.d.cts +12 -1
- package/__cjs/react/ssr/index.cjs +3 -3
- package/__cjs/react/ssr/index.cjs.map +1 -1
- package/__cjs/react/ssr/index.d.cts +1 -1
- package/__cjs/react/ssr/prerenderStatic.cjs +151 -0
- package/__cjs/react/ssr/prerenderStatic.cjs.map +1 -0
- package/__cjs/react/ssr/prerenderStatic.d.cts +122 -0
- package/__cjs/react/ssr/renderToStringWithData.cjs +11 -5
- package/__cjs/react/ssr/renderToStringWithData.cjs.map +1 -1
- package/__cjs/react/ssr/renderToStringWithData.d.cts +5 -0
- package/__cjs/react/ssr/useSSRQuery.cjs +60 -0
- package/__cjs/react/ssr/useSSRQuery.cjs.map +1 -0
- package/__cjs/react/ssr/useSSRQuery.d.cts +5 -0
- package/__cjs/{utilities/types/TODO.cjs → react/types/deprecated.cjs} +1 -1
- package/__cjs/react/types/deprecated.cjs.map +1 -0
- package/__cjs/react/types/deprecated.d.cts +75 -0
- package/__cjs/react/types/types.documentation.d.cts +6 -34
- package/__cjs/testing/core/index.cjs +6 -3
- package/__cjs/testing/core/index.cjs.map +1 -1
- package/__cjs/testing/core/index.d.cts +3 -3
- package/__cjs/testing/core/mocking/mockClient.cjs +3 -4
- package/__cjs/testing/core/mocking/mockClient.cjs.map +1 -1
- package/__cjs/testing/core/mocking/mockClient.d.cts +2 -3
- package/__cjs/testing/core/mocking/mockLink.cjs +118 -112
- package/__cjs/testing/core/mocking/mockLink.cjs.map +1 -1
- package/__cjs/testing/core/mocking/mockLink.d.cts +26 -7
- package/__cjs/testing/experimental/createSchemaFetch.cjs +4 -4
- package/__cjs/testing/experimental/createSchemaFetch.cjs.map +1 -1
- package/__cjs/testing/experimental/createTestSchema.cjs.map +1 -1
- package/__cjs/testing/experimental/createTestSchema.d.cts +1 -1
- package/__cjs/testing/index.cjs +13 -2
- package/__cjs/testing/index.cjs.map +1 -1
- package/__cjs/testing/index.d.cts +2 -1
- package/__cjs/testing/internal/disposables/spyOnConsole.cjs +0 -1
- package/__cjs/testing/internal/disposables/spyOnConsole.cjs.map +1 -1
- package/__cjs/testing/internal/disposables/spyOnConsole.d.cts +0 -1
- package/__cjs/testing/internal/disposables/withProdMode.d.cts +1 -1
- package/__cjs/testing/internal/incremental.cjs.map +1 -1
- package/__cjs/testing/internal/incremental.d.cts +4 -3
- package/__cjs/testing/internal/index.cjs +14 -8
- package/__cjs/testing/internal/index.cjs.map +1 -1
- package/__cjs/testing/internal/index.d.cts +4 -3
- package/__cjs/testing/internal/renderHelpers.cjs.map +1 -1
- package/__cjs/testing/internal/renderHelpers.d.cts +3 -3
- package/__cjs/testing/internal/resetApolloContext.cjs +24 -0
- package/__cjs/testing/internal/resetApolloContext.cjs.map +1 -0
- package/__cjs/testing/internal/resetApolloContext.d.cts +10 -0
- package/__cjs/testing/internal/scenarios/index.cjs +9 -7
- package/__cjs/testing/internal/scenarios/index.cjs.map +1 -1
- package/__cjs/testing/internal/scenarios/index.d.cts +14 -5
- package/__cjs/testing/matchers/arrayWithLength.cjs +15 -0
- package/__cjs/testing/matchers/arrayWithLength.cjs.map +1 -0
- package/__cjs/testing/matchers/arrayWithLength.d.cts +3 -0
- package/__cjs/testing/matchers/index.cjs +6 -18
- package/__cjs/testing/matchers/index.cjs.map +1 -1
- package/__cjs/testing/matchers/toComplete.cjs.map +1 -1
- package/__cjs/testing/matchers/toEmitAnything.cjs.map +1 -1
- package/__cjs/testing/matchers/toEmitError.cjs.map +1 -1
- package/__cjs/testing/matchers/toEmitNext.cjs.map +1 -1
- package/__cjs/testing/matchers/{toEmitFetchResult.cjs → toEmitTypedValue.cjs} +9 -7
- package/__cjs/testing/matchers/toEmitTypedValue.cjs.map +1 -0
- package/__cjs/testing/matchers/{toEmitValueStrict.d.cts → toEmitTypedValue.d.cts} +2 -2
- package/__cjs/testing/matchers/toHaveSuspenseCacheEntryUsing.cjs +2 -2
- package/__cjs/testing/matchers/toHaveSuspenseCacheEntryUsing.cjs.map +1 -1
- package/__cjs/testing/matchers/toHaveSuspenseCacheEntryUsing.d.cts +1 -1
- package/__cjs/testing/matchers/toMatchDocument.cjs.map +1 -1
- package/__cjs/testing/matchers/toMatchDocument.d.cts +1 -1
- package/__cjs/testing/matchers/toStrictEqualTyped.cjs +26 -0
- package/__cjs/testing/matchers/toStrictEqualTyped.cjs.map +1 -0
- package/__cjs/testing/matchers/toStrictEqualTyped.d.cts +3 -0
- package/__cjs/testing/matchers/utils/getSerializableProperties.cjs +23 -0
- package/__cjs/testing/matchers/utils/getSerializableProperties.cjs.map +1 -0
- package/__cjs/testing/matchers/utils/getSerializableProperties.d.cts +2 -0
- package/__cjs/testing/react/MockedProvider.cjs +11 -7
- package/__cjs/testing/react/MockedProvider.cjs.map +1 -1
- package/__cjs/testing/react/MockedProvider.d.cts +8 -6
- package/__cjs/utilities/caching/sizes.cjs +2 -2
- package/__cjs/utilities/caching/sizes.cjs.map +1 -1
- package/__cjs/utilities/caching/sizes.d.cts +2 -20
- package/__cjs/utilities/common/errorHandling.d.cts +1 -1
- package/__cjs/utilities/common/mergeOptions.cjs.map +1 -1
- package/__cjs/utilities/common/mergeOptions.d.cts +1 -1
- package/__cjs/utilities/graphql/getFromAST.cjs +15 -6
- package/__cjs/utilities/graphql/getFromAST.cjs.map +1 -1
- package/__cjs/utilities/graphql/getFromAST.d.cts +2 -2
- package/__cjs/utilities/graphql/operations.cjs.map +1 -1
- package/__cjs/utilities/graphql/operations.d.cts +1 -1
- package/__cjs/utilities/graphql/storeUtils.cjs +1 -1
- package/__cjs/utilities/graphql/transform.cjs +2 -2
- package/__cjs/utilities/index.cjs +39 -19
- package/__cjs/utilities/index.cjs.map +1 -1
- package/__cjs/utilities/index.d.cts +16 -15
- package/__cjs/utilities/internal/getMemoryInternals.cjs +0 -2
- package/__cjs/utilities/internal/getMemoryInternals.cjs.map +1 -1
- package/__cjs/utilities/internal/getMemoryInternals.d.cts +1 -2
- package/__cjs/utilities/internal/index.cjs +3 -1
- package/__cjs/utilities/internal/index.cjs.map +1 -1
- package/__cjs/utilities/internal/index.d.cts +1 -0
- package/__cjs/utilities/internal/index.production.cjs +1 -0
- package/__cjs/utilities/internal/index.production.cjs.map +1 -1
- package/__cjs/utilities/internal/toQueryResult.cjs +13 -0
- package/__cjs/utilities/internal/toQueryResult.cjs.map +1 -0
- package/__cjs/utilities/internal/toQueryResult.d.cts +3 -0
- package/__cjs/utilities/invariant/index.development.cjs +1 -0
- package/__cjs/utilities/invariant/index.development.cjs.map +1 -1
- package/__cjs/utilities/subscriptions/relay/index.cjs +2 -2
- package/__cjs/utilities/subscriptions/relay/index.cjs.map +1 -1
- package/__cjs/utilities/subscriptions/relay/index.d.cts +1 -1
- package/__cjs/utilities/types/NoInfer.d.cts +1 -1
- package/__cjs/utilities/types/{OnlyRequiredProperties.cjs → VariablesOption.cjs} +1 -1
- package/__cjs/utilities/types/VariablesOption.cjs.map +1 -0
- package/__cjs/utilities/types/VariablesOption.d.cts +25 -0
- package/__cjs/version.cjs +1 -1
- package/__cjs/version.cjs.map +1 -1
- package/__cjs/version.d.cts +1 -1
- package/cache/core/cache.d.ts +18 -18
- package/cache/core/cache.js +1 -1
- package/cache/core/cache.js.map +1 -1
- package/cache/core/types/Cache.d.ts +9 -16
- package/cache/core/types/Cache.js.map +1 -1
- package/cache/core/types/DataProxy.d.ts +8 -23
- package/cache/core/types/common.js +1 -0
- package/cache/core/types/common.js.map +1 -1
- package/cache/index.d.ts +3 -3
- package/cache/index.js +1 -1
- package/cache/index.js.map +1 -1
- package/cache/inmemory/entityStore.d.ts +3 -2
- package/cache/inmemory/entityStore.js +9 -8
- package/cache/inmemory/entityStore.js.map +1 -1
- package/cache/inmemory/fragmentRegistry.js +1 -1
- package/cache/inmemory/fragmentRegistry.js.map +1 -1
- package/cache/inmemory/helpers.d.ts +0 -1
- package/cache/inmemory/helpers.js +0 -7
- package/cache/inmemory/helpers.js.map +1 -1
- package/cache/inmemory/inMemoryCache.d.ts +8 -9
- package/cache/inmemory/inMemoryCache.js +4 -12
- package/cache/inmemory/inMemoryCache.js.map +1 -1
- package/cache/inmemory/key-extractor.js +1 -1
- package/cache/inmemory/policies.d.ts +1 -1
- package/cache/inmemory/policies.js +9 -9
- package/cache/inmemory/policies.js.map +1 -1
- package/cache/inmemory/reactiveVars.d.ts +7 -7
- package/cache/inmemory/reactiveVars.js.map +1 -1
- package/cache/inmemory/readFromStore.d.ts +1 -6
- package/cache/inmemory/readFromStore.js +14 -56
- package/cache/inmemory/readFromStore.js.map +1 -1
- package/cache/inmemory/types.d.ts +3 -17
- package/cache/inmemory/writeToStore.d.ts +2 -2
- package/cache/inmemory/writeToStore.js +8 -8
- package/cache/inmemory/writeToStore.js.map +1 -1
- package/config/jest/areCombinedGraphQLErrorsEqual.js +6 -4
- package/config/jest/areCombinedGraphQLErrorsEqual.js.map +1 -1
- package/config/jest/areCombinedProtocolErrorsEqual.js +3 -3
- package/config/jest/areCombinedProtocolErrorsEqual.js.map +1 -1
- package/config/jest/areMissingFieldErrorsEqual.js +2 -3
- package/config/jest/areMissingFieldErrorsEqual.js.map +1 -1
- package/config/jest/areServerErrorsEqual.d.ts +3 -0
- package/config/jest/areServerErrorsEqual.js +18 -0
- package/config/jest/areServerErrorsEqual.js.map +1 -0
- package/config/jest/resolver.js +12 -1
- package/config/jest/resolver.js.map +1 -1
- package/config/jest/setup.js +19 -2
- package/config/jest/setup.js.map +1 -1
- package/core/ApolloClient.d.ts +35 -25
- package/core/ApolloClient.js +35 -18
- package/core/ApolloClient.js.map +1 -1
- package/core/LocalState.d.ts +6 -6
- package/core/LocalState.js +2 -2
- package/core/LocalState.js.map +1 -1
- package/core/ObservableQuery.d.ts +156 -17
- package/core/ObservableQuery.js +267 -102
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryInfo.d.ts +2 -11
- package/core/QueryInfo.js +12 -86
- package/core/QueryInfo.js.map +1 -1
- package/core/QueryManager.d.ts +32 -21
- package/core/QueryManager.js +151 -107
- package/core/QueryManager.js.map +1 -1
- package/core/index.d.ts +12 -11
- package/core/index.js +9 -6
- package/core/index.js.map +1 -1
- package/core/types.d.ts +60 -7
- package/core/watchQueryOptions.d.ts +32 -119
- package/errors/CombinedGraphQLErrors.d.ts +21 -2
- package/errors/CombinedGraphQLErrors.js +30 -11
- package/errors/CombinedGraphQLErrors.js.map +1 -1
- package/errors/CombinedProtocolErrors.d.ts +9 -0
- package/errors/CombinedProtocolErrors.js +13 -6
- package/errors/CombinedProtocolErrors.js.map +1 -1
- package/errors/LinkError.d.ts +14 -0
- package/errors/LinkError.js +16 -0
- package/errors/LinkError.js.map +1 -0
- package/errors/ServerError.d.ts +2 -0
- package/errors/ServerError.js +6 -0
- package/errors/ServerError.js.map +1 -1
- package/errors/ServerParseError.d.ts +2 -0
- package/errors/ServerParseError.js +6 -0
- package/errors/ServerParseError.js.map +1 -1
- package/errors/UnconventionalError.d.ts +2 -0
- package/errors/UnconventionalError.js +6 -0
- package/errors/UnconventionalError.js.map +1 -1
- package/errors/index.d.ts +2 -3
- package/errors/index.js +13 -1
- package/errors/index.js.map +1 -1
- package/errors/isErrorLike.d.ts +3 -0
- package/errors/isErrorLike.js +9 -0
- package/errors/isErrorLike.js.map +1 -0
- package/errors/utils.d.ts +3 -0
- package/errors/utils.js +14 -0
- package/errors/utils.js.map +1 -0
- package/invariantErrorCodes.js +131 -138
- package/legacyEntryPoints/testing/internal/index.d.ts +1 -0
- package/legacyEntryPoints/testing/internal/index.js +1 -0
- package/legacyEntryPoints/testing/internal/internal.cjs +1 -0
- package/legacyEntryPoints/testing/internal/internal.d.cts +1 -0
- package/link/batch/index.d.ts +2 -1
- package/link/batch/index.js +1 -1
- package/link/batch/index.js.map +1 -1
- package/link/batch-http/index.d.ts +1 -1
- package/link/batch-http/index.js +1 -1
- package/link/batch-http/index.js.map +1 -1
- package/link/context/index.d.ts +1 -1
- package/link/context/index.js.map +1 -1
- package/link/core/ApolloLink.d.ts +1 -3
- package/link/core/ApolloLink.js +2 -20
- package/link/core/ApolloLink.js.map +1 -1
- package/link/core/index.d.ts +1 -1
- package/link/core/index.js.map +1 -1
- package/link/core/types.d.ts +1 -1
- package/link/error/index.d.ts +4 -15
- package/link/error/index.js +14 -29
- package/link/error/index.js.map +1 -1
- package/link/http/checkFetcher.js +1 -1
- package/link/http/createHttpLink.js +1 -1
- package/link/http/parseAndCheckHttpResponse.js +1 -1
- package/link/http/serializeFetchParameter.js +1 -1
- package/link/persisted-queries/index.d.ts +2 -2
- package/link/persisted-queries/index.js +3 -3
- package/link/persisted-queries/index.js.map +1 -1
- package/link/remove-typename/removeTypenameFromVariables.js.map +1 -1
- package/link/retry/index.d.ts +1 -1
- package/link/retry/index.js +1 -1
- package/link/retry/index.js.map +1 -1
- package/link/subscriptions/index.js +3 -1
- package/link/subscriptions/index.js.map +1 -1
- package/link/utils/validateOperation.js +1 -1
- package/masking/maskDefinition.d.ts +1 -1
- package/masking/maskDefinition.js +2 -2
- package/masking/maskDefinition.js.map +1 -1
- package/masking/maskFragment.d.ts +2 -2
- package/masking/maskFragment.js +2 -2
- package/masking/maskFragment.js.map +1 -1
- package/masking/maskOperation.d.ts +2 -2
- package/masking/maskOperation.js +1 -1
- package/masking/maskOperation.js.map +1 -1
- package/masking/utils.js +1 -1
- package/package.json +20 -40
- package/react/context/ApolloConsumer.d.ts +7 -4
- package/react/context/ApolloConsumer.js +1 -1
- package/react/context/ApolloConsumer.js.map +1 -1
- package/react/context/ApolloContext.d.ts +4 -4
- package/react/context/ApolloContext.js +1 -1
- package/react/context/ApolloContext.js.map +1 -1
- package/react/context/ApolloProvider.d.ts +7 -5
- package/react/context/ApolloProvider.js +1 -1
- package/react/context/ApolloProvider.js.map +1 -1
- package/react/hooks/internal/validateSuspenseHookOptions.d.ts +3 -0
- package/react/hooks/internal/validateSuspenseHookOptions.js +22 -0
- package/react/hooks/internal/validateSuspenseHookOptions.js.map +1 -0
- package/react/hooks/internal/wrapHook.d.ts +7 -5
- package/react/hooks/internal/wrapHook.js +24 -5
- package/react/hooks/internal/wrapHook.js.map +1 -1
- package/react/hooks/useApolloClient.d.ts +2 -2
- package/react/hooks/useApolloClient.js +1 -1
- package/react/hooks/useApolloClient.js.map +1 -1
- package/react/hooks/useBackgroundQuery.d.ts +143 -46
- package/react/hooks/useBackgroundQuery.js +2 -2
- package/react/hooks/useBackgroundQuery.js.map +1 -1
- package/react/hooks/useFragment.d.ts +51 -26
- package/react/hooks/useFragment.js.map +1 -1
- package/react/hooks/useLazyQuery.d.ts +278 -276
- package/react/hooks/useLazyQuery.js +30 -31
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/react/hooks/useLoadableQuery.d.ts +106 -34
- package/react/hooks/useLoadableQuery.js +21 -2
- package/react/hooks/useLoadableQuery.js.map +1 -1
- package/react/hooks/useMutation.d.ts +198 -4
- package/react/hooks/useMutation.js +14 -21
- package/react/hooks/useMutation.js.map +1 -1
- package/react/hooks/useQuery.d.ts +274 -4
- package/react/hooks/useQuery.js +86 -205
- package/react/hooks/useQuery.js.map +1 -1
- package/react/hooks/useQueryRefHandlers.d.ts +23 -22
- package/react/hooks/useQueryRefHandlers.js.map +1 -1
- package/react/hooks/useReactiveVar.d.ts +1 -1
- package/react/hooks/useReactiveVar.js.map +1 -1
- package/react/hooks/useReadQuery.d.ts +27 -25
- package/react/hooks/useReadQuery.js.map +1 -1
- package/react/hooks/useSubscription.d.ts +94 -9
- package/react/hooks/useSubscription.js +8 -56
- package/react/hooks/useSubscription.js.map +1 -1
- package/react/hooks/useSuspenseFragment.d.ts +40 -38
- package/react/hooks/useSuspenseFragment.js.map +1 -1
- package/react/hooks/useSuspenseQuery.d.ts +199 -38
- package/react/hooks/useSuspenseQuery.js +5 -26
- package/react/hooks/useSuspenseQuery.js.map +1 -1
- package/react/hooks/useSyncExternalStore.js +1 -1
- package/react/index.d.ts +21 -6
- package/react/index.js +17 -3
- package/react/index.js.map +1 -1
- package/react/index.react-server.d.ts +0 -1
- package/react/index.react-server.js +0 -1
- package/react/index.react-server.js.map +1 -1
- package/react/internal/cache/FragmentReference.d.ts +3 -3
- package/react/internal/cache/FragmentReference.js.map +1 -1
- package/react/internal/cache/QueryReference.d.ts +5 -5
- package/react/internal/cache/QueryReference.js +3 -14
- package/react/internal/cache/QueryReference.js.map +1 -1
- package/react/internal/cache/SuspenseCache.d.ts +3 -3
- package/react/internal/cache/SuspenseCache.js.map +1 -1
- package/react/internal/cache/getSuspenseCache.d.ts +3 -3
- package/react/internal/cache/getSuspenseCache.js.map +1 -1
- package/react/internal/index.d.ts +2 -0
- package/react/internal/index.js +2 -1
- package/react/internal/index.js.map +1 -1
- package/react/internal/types.d.ts +9 -0
- package/react/query-preloader/createQueryPreloader.d.ts +6 -45
- package/react/query-preloader/createQueryPreloader.js +1 -0
- package/react/query-preloader/createQueryPreloader.js.map +1 -1
- package/react/ssr/getDataFromTree.d.ts +12 -1
- package/react/ssr/getDataFromTree.js +24 -29
- package/react/ssr/getDataFromTree.js.map +1 -1
- package/react/ssr/index.d.ts +1 -1
- package/react/ssr/index.js +1 -1
- package/react/ssr/index.js.map +1 -1
- package/react/ssr/prerenderStatic.d.ts +122 -0
- package/react/ssr/prerenderStatic.js +147 -0
- package/react/ssr/prerenderStatic.js.map +1 -0
- package/react/ssr/renderToStringWithData.d.ts +5 -0
- package/react/ssr/renderToStringWithData.js +11 -5
- package/react/ssr/renderToStringWithData.js.map +1 -1
- package/react/ssr/useSSRQuery.d.ts +5 -0
- package/react/ssr/useSSRQuery.js +56 -0
- package/react/ssr/useSSRQuery.js.map +1 -0
- package/react/types/deprecated.d.ts +75 -0
- package/react/types/deprecated.js +2 -0
- package/react/types/deprecated.js.map +1 -0
- package/react/types/types.documentation.d.ts +6 -34
- package/testing/core/index.d.ts +3 -3
- package/testing/core/index.js +2 -2
- package/testing/core/index.js.map +1 -1
- package/testing/core/mocking/mockClient.d.ts +2 -3
- package/testing/core/mocking/mockClient.js +2 -3
- package/testing/core/mocking/mockClient.js.map +1 -1
- package/testing/core/mocking/mockLink.d.ts +26 -7
- package/testing/core/mocking/mockLink.js +117 -113
- package/testing/core/mocking/mockLink.js.map +1 -1
- package/testing/experimental/createSchemaFetch.js +2 -2
- package/testing/experimental/createSchemaFetch.js.map +1 -1
- package/testing/experimental/createTestSchema.d.ts +1 -1
- package/testing/experimental/createTestSchema.js.map +1 -1
- package/testing/index.d.ts +2 -1
- package/testing/index.js +1 -1
- package/testing/index.js.map +1 -1
- package/testing/internal/disposables/spyOnConsole.d.ts +0 -1
- package/testing/internal/disposables/spyOnConsole.js +0 -1
- package/testing/internal/disposables/spyOnConsole.js.map +1 -1
- package/testing/internal/incremental.d.ts +1 -1
- package/testing/internal/incremental.js.map +1 -1
- package/testing/internal/index.d.ts +4 -3
- package/testing/internal/index.js +4 -3
- package/testing/internal/index.js.map +1 -1
- package/testing/internal/renderHelpers.d.ts +3 -3
- package/testing/internal/renderHelpers.js.map +1 -1
- package/testing/internal/resetApolloContext.d.ts +10 -0
- package/testing/internal/resetApolloContext.js +20 -0
- package/testing/internal/resetApolloContext.js.map +1 -0
- package/testing/internal/scenarios/index.d.ts +6 -8
- package/testing/internal/scenarios/index.js +4 -2
- package/testing/internal/scenarios/index.js.map +1 -1
- package/testing/matchers/arrayWithLength.d.ts +3 -0
- package/testing/matchers/arrayWithLength.js +11 -0
- package/testing/matchers/arrayWithLength.js.map +1 -0
- package/testing/matchers/index.js +6 -18
- package/testing/matchers/index.js.map +1 -1
- package/testing/matchers/toComplete.js.map +1 -1
- package/testing/matchers/toEmitAnything.js.map +1 -1
- package/testing/matchers/toEmitError.js.map +1 -1
- package/testing/matchers/toEmitNext.js.map +1 -1
- package/testing/matchers/{toEmitValueStrict.d.ts → toEmitTypedValue.d.ts} +2 -2
- package/testing/matchers/{toEmitFetchResult.js → toEmitTypedValue.js} +7 -5
- package/testing/matchers/toEmitTypedValue.js.map +1 -0
- package/testing/matchers/toHaveSuspenseCacheEntryUsing.d.ts +1 -1
- package/testing/matchers/toHaveSuspenseCacheEntryUsing.js +1 -1
- package/testing/matchers/toHaveSuspenseCacheEntryUsing.js.map +1 -1
- package/testing/matchers/toMatchDocument.d.ts +1 -1
- package/testing/matchers/toMatchDocument.js.map +1 -1
- package/testing/matchers/toStrictEqualTyped.d.ts +3 -0
- package/testing/matchers/toStrictEqualTyped.js +22 -0
- package/testing/matchers/toStrictEqualTyped.js.map +1 -0
- package/testing/matchers/utils/getSerializableProperties.d.ts +2 -0
- package/testing/matchers/utils/getSerializableProperties.js +20 -0
- package/testing/matchers/utils/getSerializableProperties.js.map +1 -0
- package/testing/react/MockedProvider.d.ts +8 -6
- package/testing/react/MockedProvider.js +8 -4
- package/testing/react/MockedProvider.js.map +1 -1
- package/utilities/caching/sizes.d.ts +2 -20
- package/utilities/caching/sizes.js +2 -2
- package/utilities/caching/sizes.js.map +1 -1
- package/utilities/common/mergeOptions.d.ts +1 -1
- package/utilities/common/mergeOptions.js.map +1 -1
- package/utilities/graphql/getFromAST.d.ts +2 -2
- package/utilities/graphql/getFromAST.js +15 -6
- package/utilities/graphql/getFromAST.js.map +1 -1
- package/utilities/graphql/operations.d.ts +1 -1
- package/utilities/graphql/operations.js.map +1 -1
- package/utilities/graphql/storeUtils.js +1 -1
- package/utilities/graphql/transform.js +2 -2
- package/utilities/index.d.ts +16 -15
- package/utilities/index.js +12 -12
- package/utilities/index.js.map +1 -1
- package/utilities/internal/getMemoryInternals.d.ts +0 -1
- package/utilities/internal/getMemoryInternals.js +0 -2
- package/utilities/internal/getMemoryInternals.js.map +1 -1
- package/utilities/internal/index.d.ts +1 -0
- package/utilities/internal/index.js +2 -1
- package/utilities/internal/index.js.map +1 -1
- package/utilities/internal/index.production.js +1 -0
- package/utilities/internal/index.production.js.map +1 -1
- package/utilities/internal/toQueryResult.d.ts +3 -0
- package/utilities/internal/toQueryResult.js +10 -0
- package/utilities/internal/toQueryResult.js.map +1 -0
- package/utilities/invariant/index.development.js +1 -0
- package/utilities/invariant/index.development.js.map +1 -1
- package/utilities/subscriptions/relay/index.d.ts +1 -1
- package/utilities/subscriptions/relay/index.js +1 -1
- package/utilities/subscriptions/relay/index.js.map +1 -1
- package/utilities/types/NoInfer.d.ts +1 -1
- package/utilities/types/VariablesOption.d.ts +25 -0
- package/utilities/types/VariablesOption.js +2 -0
- package/utilities/types/VariablesOption.js.map +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/__cjs/cache/inmemory/object-canon.cjs +0 -180
- package/__cjs/cache/inmemory/object-canon.cjs.map +0 -1
- package/__cjs/cache/inmemory/object-canon.d.cts +0 -12
- package/__cjs/index.cjs +0 -8
- package/__cjs/index.cjs.map +0 -1
- package/__cjs/index.d.cts +0 -3
- package/__cjs/react/context/index.cjs +0 -10
- package/__cjs/react/context/index.cjs.map +0 -1
- package/__cjs/react/context/index.d.cts +0 -7
- package/__cjs/react/hooks/index.cjs +0 -27
- package/__cjs/react/hooks/index.cjs.map +0 -1
- package/__cjs/react/hooks/index.d.cts +0 -22
- package/__cjs/react/parser/index.cjs +0 -115
- package/__cjs/react/parser/index.cjs.map +0 -1
- package/__cjs/react/parser/index.d.cts +0 -18
- package/__cjs/react/ssr/RenderPromises.cjs +0 -104
- package/__cjs/react/ssr/RenderPromises.cjs.map +0 -1
- package/__cjs/react/ssr/RenderPromises.d.cts +0 -22
- package/__cjs/react/types/types.d.cts +0 -689
- package/__cjs/testing/matchers/toEmitApolloQueryResult.cjs +0 -40
- package/__cjs/testing/matchers/toEmitApolloQueryResult.cjs.map +0 -1
- package/__cjs/testing/matchers/toEmitApolloQueryResult.d.cts +0 -8
- package/__cjs/testing/matchers/toEmitFetchResult.cjs.map +0 -1
- package/__cjs/testing/matchers/toEmitFetchResult.d.cts +0 -8
- package/__cjs/testing/matchers/toEmitMatchedValue.cjs +0 -40
- package/__cjs/testing/matchers/toEmitMatchedValue.cjs.map +0 -1
- package/__cjs/testing/matchers/toEmitMatchedValue.d.cts +0 -7
- package/__cjs/testing/matchers/toEmitValue.cjs +0 -41
- package/__cjs/testing/matchers/toEmitValue.cjs.map +0 -1
- package/__cjs/testing/matchers/toEmitValue.d.cts +0 -4
- package/__cjs/testing/matchers/toEmitValueStrict.cjs +0 -46
- package/__cjs/testing/matchers/toEmitValueStrict.cjs.map +0 -1
- package/__cjs/testing/matchers/toEqualApolloQueryResult.cjs +0 -24
- package/__cjs/testing/matchers/toEqualApolloQueryResult.cjs.map +0 -1
- package/__cjs/testing/matchers/toEqualApolloQueryResult.d.cts +0 -6
- package/__cjs/testing/matchers/toEqualFetchResult.cjs +0 -24
- package/__cjs/testing/matchers/toEqualFetchResult.cjs.map +0 -1
- package/__cjs/testing/matchers/toEqualFetchResult.d.cts +0 -4
- package/__cjs/testing/matchers/toEqualLazyQueryResult.cjs +0 -40
- package/__cjs/testing/matchers/toEqualLazyQueryResult.cjs.map +0 -1
- package/__cjs/testing/matchers/toEqualLazyQueryResult.d.cts +0 -10
- package/__cjs/testing/matchers/toEqualQueryResult.cjs +0 -40
- package/__cjs/testing/matchers/toEqualQueryResult.cjs.map +0 -1
- package/__cjs/testing/matchers/toEqualQueryResult.d.cts +0 -9
- package/__cjs/utilities/types/OnlyRequiredProperties.cjs.map +0 -1
- package/__cjs/utilities/types/OnlyRequiredProperties.d.cts +0 -7
- package/__cjs/utilities/types/TODO.cjs.map +0 -1
- package/__cjs/utilities/types/TODO.d.cts +0 -3
- package/cache/inmemory/object-canon.d.ts +0 -12
- package/cache/inmemory/object-canon.js +0 -176
- package/cache/inmemory/object-canon.js.map +0 -1
- package/index.d.ts +0 -3
- package/index.js +0 -3
- package/index.js.map +0 -1
- package/legacyEntryPoints/react/context/context.cjs +0 -1
- package/legacyEntryPoints/react/context/context.d.cts +0 -1
- package/legacyEntryPoints/react/context/index.d.ts +0 -1
- package/legacyEntryPoints/react/context/index.js +0 -1
- package/legacyEntryPoints/react/hooks/hooks.cjs +0 -1
- package/legacyEntryPoints/react/hooks/hooks.d.cts +0 -1
- package/legacyEntryPoints/react/hooks/index.d.ts +0 -1
- package/legacyEntryPoints/react/hooks/index.js +0 -1
- package/legacyEntryPoints/react/parser/index.d.ts +0 -1
- package/legacyEntryPoints/react/parser/index.js +0 -1
- package/legacyEntryPoints/react/parser/parser.cjs +0 -1
- package/legacyEntryPoints/react/parser/parser.d.cts +0 -1
- package/react/context/index.d.ts +0 -7
- package/react/context/index.js +0 -4
- package/react/context/index.js.map +0 -1
- package/react/hooks/index.d.ts +0 -22
- package/react/hooks/index.js +0 -15
- package/react/hooks/index.js.map +0 -1
- package/react/parser/index.d.ts +0 -18
- package/react/parser/index.js +0 -109
- package/react/parser/index.js.map +0 -1
- package/react/ssr/RenderPromises.d.ts +0 -22
- package/react/ssr/RenderPromises.js +0 -100
- package/react/ssr/RenderPromises.js.map +0 -1
- package/react/types/types.d.ts +0 -689
- package/testing/matchers/toEmitApolloQueryResult.d.ts +0 -8
- package/testing/matchers/toEmitApolloQueryResult.js +0 -36
- package/testing/matchers/toEmitApolloQueryResult.js.map +0 -1
- package/testing/matchers/toEmitFetchResult.d.ts +0 -8
- package/testing/matchers/toEmitFetchResult.js.map +0 -1
- package/testing/matchers/toEmitMatchedValue.d.ts +0 -7
- package/testing/matchers/toEmitMatchedValue.js +0 -36
- package/testing/matchers/toEmitMatchedValue.js.map +0 -1
- package/testing/matchers/toEmitValue.d.ts +0 -4
- package/testing/matchers/toEmitValue.js +0 -37
- package/testing/matchers/toEmitValue.js.map +0 -1
- package/testing/matchers/toEmitValueStrict.js +0 -42
- package/testing/matchers/toEmitValueStrict.js.map +0 -1
- package/testing/matchers/toEqualApolloQueryResult.d.ts +0 -6
- package/testing/matchers/toEqualApolloQueryResult.js +0 -20
- package/testing/matchers/toEqualApolloQueryResult.js.map +0 -1
- package/testing/matchers/toEqualFetchResult.d.ts +0 -4
- package/testing/matchers/toEqualFetchResult.js +0 -20
- package/testing/matchers/toEqualFetchResult.js.map +0 -1
- package/testing/matchers/toEqualLazyQueryResult.d.ts +0 -10
- package/testing/matchers/toEqualLazyQueryResult.js +0 -36
- package/testing/matchers/toEqualLazyQueryResult.js.map +0 -1
- package/testing/matchers/toEqualQueryResult.d.ts +0 -9
- package/testing/matchers/toEqualQueryResult.js +0 -36
- package/testing/matchers/toEqualQueryResult.js.map +0 -1
- package/utilities/types/OnlyRequiredProperties.d.ts +0 -7
- package/utilities/types/OnlyRequiredProperties.js +0 -2
- package/utilities/types/OnlyRequiredProperties.js.map +0 -1
- package/utilities/types/TODO.d.ts +0 -3
- package/utilities/types/TODO.js +0 -2
- package/utilities/types/TODO.js.map +0 -1
- /package/__cjs/react/{types → internal}/types.cjs +0 -0
- /package/__cjs/react/{types → internal}/types.cjs.map +0 -0
- /package/react/{types → internal}/types.js +0 -0
- /package/react/{types → internal}/types.js.map +0 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { print } from "graphql";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { filter, firstValueFrom } from "rxjs";
|
|
4
|
+
import { getApolloContext } from "@apollo/client/react";
|
|
5
|
+
import { wrapperSymbol } from "@apollo/client/react/internal";
|
|
6
|
+
import { canonicalStringify } from "@apollo/client/utilities";
|
|
7
|
+
import { invariant } from "@apollo/client/utilities/invariant";
|
|
8
|
+
import { useSSRQuery } from "./useSSRQuery.js";
|
|
9
|
+
function getObservableQueryKey(query, variables = {}) {
|
|
10
|
+
const queryKey = print(query);
|
|
11
|
+
const variablesKey = canonicalStringify(variables);
|
|
12
|
+
return `${queryKey}|${variablesKey}`;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* This function will rerender your React tree until no more network requests need
|
|
16
|
+
* to be made.
|
|
17
|
+
* If you only use suspenseful hooks (and a suspense-ready `renderFunction`), this
|
|
18
|
+
* means that the tree will be rendered once.
|
|
19
|
+
* If you use non-suspenseful hooks like `useQuery`, this function will render all
|
|
20
|
+
* components, wait for all requests started by your rendered
|
|
21
|
+
* hooks to finish, and then render the tree again, until no more requests are made.
|
|
22
|
+
*
|
|
23
|
+
* After executing this function, you can use `client.extract()` to get a full set
|
|
24
|
+
* of the data that was fetched during these renders.
|
|
25
|
+
* You can then transport that data and hydrate your cache via `client.restore(extractedData)`
|
|
26
|
+
* before hydrating your React tree in the browser.
|
|
27
|
+
*/
|
|
28
|
+
export function prerenderStatic(
|
|
29
|
+
{ tree, context = {},
|
|
30
|
+
// The rendering function is configurable! We use renderToStaticMarkup as
|
|
31
|
+
// the default, because it's a little less expensive than renderToString,
|
|
32
|
+
// and legacy usage of getDataFromTree ignores the return value anyway.
|
|
33
|
+
renderFunction, signal, ignoreResults, diagnostics, maxRerenders = 50, }
|
|
34
|
+
) {
|
|
35
|
+
const availableObservableQueries = new Map();
|
|
36
|
+
let recentlyCreatedObservableQueries = new Set();
|
|
37
|
+
let renderCount = 0;
|
|
38
|
+
const internalContext = {
|
|
39
|
+
getObservableQuery(query, variables) {
|
|
40
|
+
return availableObservableQueries.get(getObservableQueryKey(query, variables));
|
|
41
|
+
},
|
|
42
|
+
onCreatedObservableQuery: (observable, query, variables) => {
|
|
43
|
+
availableObservableQueries.set(getObservableQueryKey(query, variables), observable);
|
|
44
|
+
if (observable.options.fetchPolicy !== "cache-only") {
|
|
45
|
+
recentlyCreatedObservableQueries.add(observable);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
async function process() {
|
|
50
|
+
renderCount++;
|
|
51
|
+
invariant(renderCount <= maxRerenders, 28, maxRerenders);
|
|
52
|
+
invariant(!signal?.aborted, 29);
|
|
53
|
+
// Always re-render from the rootElement, even though it might seem
|
|
54
|
+
// better to render the children of the component responsible for the
|
|
55
|
+
// promise, because it is not possible to reconstruct the full context
|
|
56
|
+
// of the original rendering (including all unknown context provider
|
|
57
|
+
// elements) for a subtree of the original component tree.
|
|
58
|
+
const ApolloContext = getApolloContext();
|
|
59
|
+
const element = (React.createElement(ApolloContext.Provider, { value: {
|
|
60
|
+
...context,
|
|
61
|
+
[wrapperSymbol]: {
|
|
62
|
+
useQuery: () => useSSRQuery.bind(internalContext),
|
|
63
|
+
},
|
|
64
|
+
} }, tree));
|
|
65
|
+
const result = await consume(await renderFunction(element));
|
|
66
|
+
if (recentlyCreatedObservableQueries.size == 0) {
|
|
67
|
+
return { result, aborted: false };
|
|
68
|
+
}
|
|
69
|
+
if (signal?.aborted) {
|
|
70
|
+
return { result, aborted: true };
|
|
71
|
+
}
|
|
72
|
+
const dataPromise = Promise.all(Array.from(recentlyCreatedObservableQueries).map(async (observable) => {
|
|
73
|
+
await firstValueFrom(observable.pipe(filter((result) => result.loading === false)));
|
|
74
|
+
recentlyCreatedObservableQueries.delete(observable);
|
|
75
|
+
}));
|
|
76
|
+
let resolveAbortPromise;
|
|
77
|
+
const abortPromise = new Promise((resolve) => {
|
|
78
|
+
resolveAbortPromise = resolve;
|
|
79
|
+
});
|
|
80
|
+
signal?.addEventListener("abort", resolveAbortPromise);
|
|
81
|
+
await Promise.race([abortPromise, dataPromise]);
|
|
82
|
+
signal?.removeEventListener("abort", resolveAbortPromise);
|
|
83
|
+
if (signal?.aborted) {
|
|
84
|
+
return { result, aborted: true };
|
|
85
|
+
}
|
|
86
|
+
return process();
|
|
87
|
+
}
|
|
88
|
+
return Promise.resolve()
|
|
89
|
+
.then(process)
|
|
90
|
+
.then((result) => diagnostics ?
|
|
91
|
+
{
|
|
92
|
+
...result,
|
|
93
|
+
diagnostics: {
|
|
94
|
+
renderCount,
|
|
95
|
+
},
|
|
96
|
+
}
|
|
97
|
+
: result)
|
|
98
|
+
.finally(() => {
|
|
99
|
+
availableObservableQueries.clear();
|
|
100
|
+
recentlyCreatedObservableQueries.clear();
|
|
101
|
+
});
|
|
102
|
+
async function consume(value) {
|
|
103
|
+
if (typeof value === "string") {
|
|
104
|
+
return ignoreResults ? "" : value;
|
|
105
|
+
}
|
|
106
|
+
if (!value.prelude) {
|
|
107
|
+
throw new Error("`getMarkupFromTree` was called with an incompatible render method.\n" +
|
|
108
|
+
'It is compatible with `renderToStaticMarkup` and `renderToString` from `"react-dom/server"`\n' +
|
|
109
|
+
'as well as `prerender` and `prerenderToNodeStream` from "react-dom/static"');
|
|
110
|
+
}
|
|
111
|
+
const prelude = value.prelude;
|
|
112
|
+
let result = "";
|
|
113
|
+
if ("getReader" in prelude) {
|
|
114
|
+
/**
|
|
115
|
+
* The "web" `ReadableStream` consuming path.
|
|
116
|
+
* This could also be done with the `AsyncIterable` branch, but we add this
|
|
117
|
+
* code for two reasons:
|
|
118
|
+
* 1. potential performance benefits if we don't need to create an `AsyncIterator` on top
|
|
119
|
+
* 2. some browsers (looking at Safari) don't support `AsyncIterable` for `ReadableStream` yet
|
|
120
|
+
* and we're not 100% sure how good this is covered on edge runtimes
|
|
121
|
+
*
|
|
122
|
+
* The extra code here doesn't really matter, since *usually* this would not
|
|
123
|
+
* be run in a browser, so we don't have to shave every single byte.
|
|
124
|
+
*/
|
|
125
|
+
const reader = prelude.getReader();
|
|
126
|
+
while (true) {
|
|
127
|
+
const { done, value } = await reader.read();
|
|
128
|
+
if (done) {
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
if (!ignoreResults) {
|
|
132
|
+
result += Buffer.from(value).toString("utf8");
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
for await (const chunk of prelude) {
|
|
138
|
+
if (!ignoreResults) {
|
|
139
|
+
result +=
|
|
140
|
+
typeof chunk === "string" ? chunk : (Buffer.from(chunk).toString("utf8"));
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return result;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=prerenderStatic.js.map
|
|
@@ -0,0 +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 { 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\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 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 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),\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 });\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;AAC9B,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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F;QACA,CAAJ,CAAA,CAAA,CAAA,CAAA,EAAW,CAAX,CAAA,CAAA,CAAA,CAAA,CAAiB;IACf;AACF;"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import type * as ReactTypes from "react";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated This function uses the legacy `renderToString` API from React.
|
|
4
|
+
* Use `prerenderStatic` instead, which can be configured to run with more modern
|
|
5
|
+
* React APIs.
|
|
6
|
+
*/
|
|
2
7
|
export declare function renderToStringWithData(component: ReactTypes.ReactElement<any>): Promise<string>;
|
|
3
8
|
//# sourceMappingURL=renderToStringWithData.d.ts.map
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { prerenderStatic } from "./prerenderStatic.js";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated This function uses the legacy `renderToString` API from React.
|
|
4
|
+
* Use `prerenderStatic` instead, which can be configured to run with more modern
|
|
5
|
+
* React APIs.
|
|
6
|
+
*/
|
|
7
|
+
export async function renderToStringWithData(component) {
|
|
8
|
+
const { result } = await prerenderStatic({
|
|
5
9
|
tree: component,
|
|
6
|
-
renderFunction: renderToString,
|
|
10
|
+
renderFunction: (await import("react-dom/server")).renderToString,
|
|
11
|
+
maxRerenders: Number.POSITIVE_INFINITY,
|
|
7
12
|
});
|
|
13
|
+
return result;
|
|
8
14
|
}
|
|
9
15
|
//# sourceMappingURL=renderToStringWithData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderToStringWithData.js","sources":["../../../src/react/ssr/renderToStringWithData.ts"],"sourcesContent":["import type * as ReactTypes from \"react\";\nimport {
|
|
1
|
+
{"version":3,"file":"renderToStringWithData.js","sources":["../../../src/react/ssr/renderToStringWithData.ts"],"sourcesContent":["import type * as ReactTypes from \"react\";\n\nimport { prerenderStatic } from \"./prerenderStatic.js\";\n\n/**\n * @deprecated This function uses the legacy `renderToString` API from React.\n * Use `prerenderStatic` instead, which can be configured to run with more modern\n * React APIs.\n */\nexport async function renderToStringWithData(\n component: ReactTypes.ReactElement<any>\n): Promise<string> {\n const { result } = await prerenderStatic({\n tree: component,\n renderFunction: (await import(\"react-dom/server\")).renderToString,\n maxRerenders: Number.POSITIVE_INFINITY,\n });\n return result;\n}\n"],"names":[],"mappings":"AAEA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAgC,CAAhC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAsD;AAEtD,CAAA,CAAA;;;;CAIA,CAAA;AACA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAsB,CAAtB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACE,CADF,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA;IAGE,CAAF,CAAA,CAAA,CAAA,EAAQ,EAAE,CAAV,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,EAAqB,CAArB,CAAA,CAAA,CAAA,EAA2B,CAA3B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA0C,CAAC;QACvC,CAAJ,CAAA,CAAA,CAAQ,EAAE,CAAV,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmB;QACf,CAAJ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,EAAE,CAAC,CAArB,CAAA,CAAA,CAAA,EAA2B,CAA3B,CAAA,CAAA,CAAA,CAAA,CAAiC,CAAC,CAAlC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoD,CAAC,CAAC,CAAC,CAAvD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqE;QACjE,CAAJ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgB,EAAE,CAAlB,CAAA,CAAA,CAAA,CAAA,CAAwB,CAAC,CAAzB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA0C;IAC1C,CAAG,CAAC;IACF,CAAF,CAAA,CAAA,CAAA,CAAA,EAAS,CAAT,CAAA,CAAA,CAAA,CAAA,CAAe;AACf;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DocumentNode } from "graphql";
|
|
2
|
+
import { useQuery } from "@apollo/client/react";
|
|
3
|
+
import type { PrerenderStaticInternalContext } from "./prerenderStatic.js";
|
|
4
|
+
export declare const useSSRQuery: (this: PrerenderStaticInternalContext, query: DocumentNode, options?: useQuery.Options<any, any>) => useQuery.Result<any, any>;
|
|
5
|
+
//# sourceMappingURL=useSSRQuery.d.ts.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { useApolloClient, useQuery } from "@apollo/client/react";
|
|
2
|
+
export const useSSRQuery = function (query, options = {}) {
|
|
3
|
+
function notAllowed() {
|
|
4
|
+
throw new Error("This method cannot be called during SSR.");
|
|
5
|
+
}
|
|
6
|
+
const client = useApolloClient(options.client);
|
|
7
|
+
const baseResult = {
|
|
8
|
+
client,
|
|
9
|
+
refetch: notAllowed,
|
|
10
|
+
fetchMore: notAllowed,
|
|
11
|
+
subscribeToMore: notAllowed,
|
|
12
|
+
updateQuery: notAllowed,
|
|
13
|
+
startPolling: notAllowed,
|
|
14
|
+
stopPolling: notAllowed,
|
|
15
|
+
variables: options?.variables,
|
|
16
|
+
previousData: undefined,
|
|
17
|
+
};
|
|
18
|
+
if (options.skip) {
|
|
19
|
+
return withoutObservableAccess({
|
|
20
|
+
...baseResult,
|
|
21
|
+
...useQuery.skipStandbyResult,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
if (options.ssr === false) {
|
|
25
|
+
return withoutObservableAccess({
|
|
26
|
+
...baseResult,
|
|
27
|
+
...useQuery.ssrDisabledResult,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
let observable = this.getObservableQuery(query, options.variables);
|
|
31
|
+
if (!observable) {
|
|
32
|
+
observable = client.watchQuery({
|
|
33
|
+
query,
|
|
34
|
+
...options,
|
|
35
|
+
fetchPolicy: (options.fetchPolicy === "network-only" ||
|
|
36
|
+
options.fetchPolicy === "cache-and-network") ?
|
|
37
|
+
"cache-first"
|
|
38
|
+
: options.fetchPolicy,
|
|
39
|
+
});
|
|
40
|
+
this.onCreatedObservableQuery(observable, query, options.variables);
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
observable,
|
|
44
|
+
...observable.getCurrentResult(),
|
|
45
|
+
...baseResult,
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
function withoutObservableAccess(value) {
|
|
49
|
+
Object.defineProperty(value, "observable", {
|
|
50
|
+
get() {
|
|
51
|
+
throw new Error('"observable" property is not accessible on skipped hooks or hook calls with `ssr: false` during SSR');
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=useSSRQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSSRQuery.js","sources":["../../../src/react/ssr/useSSRQuery.ts"],"sourcesContent":["import type { DocumentNode } from \"graphql\";\n\nimport type { ObservableQuery } from \"@apollo/client\";\nimport { useApolloClient, useQuery } from \"@apollo/client/react\";\n\nimport type { PrerenderStaticInternalContext } from \"./prerenderStatic.js\";\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\"\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) {\n return withoutObservableAccess({\n ...baseResult,\n ...useQuery.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"],"names":[],"mappings":"AAGA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CA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CACtG;QACH,CAAC;IACL,CAAG,CAAC;IACF,CAAF,CAAA,CAAA,CAAA,CAAA,EAAS,CAAT,CAAA,CAAA,CAAA,CAAqB;AACrB;"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { ApolloCache, DefaultContext, OperationVariables } from "@apollo/client";
|
|
2
|
+
import type { useBackgroundQuery } from "../hooks/useBackgroundQuery.js";
|
|
3
|
+
import type { useFragment } from "../hooks/useFragment.js";
|
|
4
|
+
import type { useLazyQuery } from "../hooks/useLazyQuery.js";
|
|
5
|
+
import type { useLoadableQuery } from "../hooks/useLoadableQuery.js";
|
|
6
|
+
import type { useMutation } from "../hooks/useMutation.js";
|
|
7
|
+
import type { useQuery } from "../hooks/useQuery.js";
|
|
8
|
+
import type { useQueryRefHandlers } from "../hooks/useQueryRefHandlers.js";
|
|
9
|
+
import type { useReadQuery } from "../hooks/useReadQuery.js";
|
|
10
|
+
import type { useSubscription } from "../hooks/useSubscription.js";
|
|
11
|
+
import type { useSuspenseFragment } from "../hooks/useSuspenseFragment.js";
|
|
12
|
+
import type { useSuspenseQuery } from "../hooks/useSuspenseQuery.js";
|
|
13
|
+
/** @deprecated Use `useQuery.Options` instead */
|
|
14
|
+
export type QueryHookOptions<TData = unknown, TVariables extends OperationVariables = OperationVariables> = useQuery.Options<TData, TVariables>;
|
|
15
|
+
/** @deprecated Use `useQuery.Result` instead */
|
|
16
|
+
export type QueryResult<TData = unknown, TVariables extends OperationVariables = OperationVariables> = useQuery.Result<TData, TVariables>;
|
|
17
|
+
/** @deprecated Use `useLazyQuery.Options` instead */
|
|
18
|
+
export type LazyQueryHookOptions<TData = unknown, TVariables extends OperationVariables = OperationVariables> = useLazyQuery.Options<TData, TVariables>;
|
|
19
|
+
/** @deprecated Use `useLazyQuery.Result` instead */
|
|
20
|
+
export type LazyQueryResult<TData = unknown, TVariables extends OperationVariables = OperationVariables> = useLazyQuery.Result<TData, TVariables>;
|
|
21
|
+
/** @deprecated Use `useLazyQuery.ResultTuple` instead */
|
|
22
|
+
export type LazyQueryResultTuple<TData = unknown, TVariables extends OperationVariables = OperationVariables> = useLazyQuery.ResultTuple<TData, TVariables>;
|
|
23
|
+
/** @deprecated Use `useLazyQuery.ExecOptions` instead */
|
|
24
|
+
export type LazyQueryHookExecOptions<TVariables extends OperationVariables = OperationVariables> = useLazyQuery.ExecOptions<TVariables>;
|
|
25
|
+
/** @deprecated Use `useLazyQuery.ExecOptions` instead */
|
|
26
|
+
export type LazyQueryExecFunction<TData = unknown, TVariables extends OperationVariables = OperationVariables> = useLazyQuery.ExecFunction<TData, TVariables>;
|
|
27
|
+
/** @deprecated Use `useMutation.Options` instead */
|
|
28
|
+
export type MutationHookOptions<TData = unknown, TVariables = OperationVariables, TContext = DefaultContext, TCache extends ApolloCache = ApolloCache> = useMutation.Options<TData, TVariables, TContext, TCache>;
|
|
29
|
+
/** @deprecated Use `useMutation.Result` instead */
|
|
30
|
+
export type MutationResult<TData = unknown> = useMutation.Result<TData>;
|
|
31
|
+
/** @deprecated Use `useMutation.MutationFunctionOptions` instead */
|
|
32
|
+
export type MutationFunctionOptions<TData = unknown, TVariables = OperationVariables, TContext = DefaultContext, TCache extends ApolloCache = ApolloCache> = useMutation.MutationFunctionOptions<TData, TVariables, TContext, TCache>;
|
|
33
|
+
/** @deprecated Use `useMutation.ResultTuple` instead */
|
|
34
|
+
export type MutationTuple<TData, TVariables, TContext = DefaultContext, TCache extends ApolloCache = ApolloCache> = useMutation.ResultTuple<TData, TVariables, TContext, TCache>;
|
|
35
|
+
/** @deprecated Use `useSubscription.Result` instead */
|
|
36
|
+
export type SubscriptionResult<TData = unknown, TVariables extends OperationVariables = OperationVariables> = useSubscription.Result<TData>;
|
|
37
|
+
/** @deprecated Use `useSubscription.Options` instead */
|
|
38
|
+
export type SubscriptionHookOptions<TData = unknown, TVariables extends OperationVariables = OperationVariables> = useSubscription.Options<TData, TVariables>;
|
|
39
|
+
/** @deprecated Use `useSubscription.OnDataOptions` instead */
|
|
40
|
+
export type OnDataOptions<TData = unknown> = useSubscription.OnDataOptions<TData>;
|
|
41
|
+
/** @deprecated Use `useSubscription.OnSubscriptionDataOptions` instead */
|
|
42
|
+
export type OnSubscriptionDataOptions<TData = unknown> = useSubscription.OnSubscriptionDataOptions<TData>;
|
|
43
|
+
/** @deprecated Use `useFragment.Options` instead */
|
|
44
|
+
export type UseFragmentOptions<TData, TVariables> = useFragment.Options<TData, TVariables>;
|
|
45
|
+
/** @deprecated Use `useFragment.Result` instead */
|
|
46
|
+
export type UseFragmentResult<TData> = useFragment.Result<TData>;
|
|
47
|
+
/** @deprecated Use `useSuspenseQuery.Options` instead */
|
|
48
|
+
export type SuspenseQueryHookOptions<TData = unknown, TVariables extends OperationVariables = OperationVariables> = useSuspenseQuery.Options<TVariables>;
|
|
49
|
+
/** @deprecated Use `useSuspenseQuery.Result` instead */
|
|
50
|
+
export type UseSuspenseQueryResult<TData = unknown, TVariables extends OperationVariables = OperationVariables> = useSuspenseQuery.Result<TData, TVariables>;
|
|
51
|
+
/** @deprecated Use `useSuspenseQuery.FetchPolicy` instead */
|
|
52
|
+
export type SuspenseQueryHookFetchPolicy = useSuspenseQuery.FetchPolicy;
|
|
53
|
+
/** @deprecated Use `useBackgroundQuery.Options` instead */
|
|
54
|
+
export type BackgroundQueryHookOptions<TData = unknown, TVariables extends OperationVariables = OperationVariables> = useBackgroundQuery.Options<TVariables>;
|
|
55
|
+
/** @deprecated Use `useBackgroundQuery.Result` instead */
|
|
56
|
+
export type UseBackgroundQueryResult<TData = unknown, TVariables extends OperationVariables = OperationVariables> = useBackgroundQuery.Result<TData, TVariables>;
|
|
57
|
+
/** @deprecated Use `useBackgroundQuery.FetchPolicy` instead */
|
|
58
|
+
export type BackgroundQueryHookFetchPolicy = useBackgroundQuery.FetchPolicy;
|
|
59
|
+
/** @deprecated Use `useSuspenseFragment.Options` instead */
|
|
60
|
+
export type UseSuspenseFragmentOptions<TData, TVariables extends OperationVariables> = useSuspenseFragment.Options<TData, TVariables>;
|
|
61
|
+
/** @deprecated Use `useSuspenseFragment.Result` instead */
|
|
62
|
+
export type UseSuspenseFragmentResult<TData> = useSuspenseFragment.Result<TData>;
|
|
63
|
+
/** @deprecated Use `useLoadableQuery.LoadQueryFunction` instead */
|
|
64
|
+
export type LoadQueryFunction<TVariables extends OperationVariables> = useLoadableQuery.LoadQueryFunction<TVariables>;
|
|
65
|
+
/** @deprecated Use `useLoadableQuery.FetchPolicy` instead */
|
|
66
|
+
export type LoadableQueryFetchPolicy = useLoadableQuery.FetchPolicy;
|
|
67
|
+
/** @deprecated Use `useLoadableQuery.Options` instead */
|
|
68
|
+
export type LoadableQueryHookOptions = useLoadableQuery.Options;
|
|
69
|
+
/** @deprecated Use `useLoadableQuery.Result` instead */
|
|
70
|
+
export type UseLoadableQueryResult<TData = unknown, TVariables extends OperationVariables = OperationVariables> = useLoadableQuery.Result<TData, TVariables>;
|
|
71
|
+
/** @deprecated Use `useQueryRefHandlers.Result` instead */
|
|
72
|
+
export type UseQueryRefHandlersResult<TData = unknown, TVariables extends OperationVariables = OperationVariables> = useQueryRefHandlers.Result<TData, TVariables>;
|
|
73
|
+
/** @deprecated Use `useReadQuery.Result` instead */
|
|
74
|
+
export type UseReadQueryResult<TData = unknown> = useReadQuery.Result<TData>;
|
|
75
|
+
//# sourceMappingURL=deprecated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecated.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -64,7 +64,7 @@ export interface QueryOptionsDocumentation {
|
|
|
64
64
|
/**
|
|
65
65
|
* If `true`, the in-progress query's associated component re-renders whenever the network status changes or a network error occurs.
|
|
66
66
|
*
|
|
67
|
-
* The default value is `
|
|
67
|
+
* The default value is `true`.
|
|
68
68
|
*
|
|
69
69
|
* @docGroup 2. Networking options
|
|
70
70
|
*/
|
|
@@ -94,18 +94,6 @@ export interface QueryOptionsDocumentation {
|
|
|
94
94
|
* @docGroup 3. Caching options
|
|
95
95
|
*/
|
|
96
96
|
refetchWritePolicy_suspense: unknown;
|
|
97
|
-
/**
|
|
98
|
-
* Whether to canonize cache results before returning them. Canonization
|
|
99
|
-
* takes some extra time, but it speeds up future deep equality comparisons.
|
|
100
|
-
* Defaults to false.
|
|
101
|
-
*
|
|
102
|
-
* @deprecated
|
|
103
|
-
* Using `canonizeResults` can result in memory leaks so we generally do not
|
|
104
|
-
* recommend using this option anymore.
|
|
105
|
-
* A future version of Apollo Client will contain a similar feature without
|
|
106
|
-
* the risk of memory leaks.
|
|
107
|
-
*/
|
|
108
|
-
canonizeResults: unknown;
|
|
109
97
|
/**
|
|
110
98
|
* If true, the query is not executed.
|
|
111
99
|
*
|
|
@@ -210,14 +198,6 @@ export interface QueryResultDocumentation {
|
|
|
210
198
|
* @docGroup 2. Network info
|
|
211
199
|
*/
|
|
212
200
|
networkStatus: unknown;
|
|
213
|
-
/**
|
|
214
|
-
* If `true`, the associated lazy query has been executed.
|
|
215
|
-
*
|
|
216
|
-
* This field is only present on the result object returned by [`useLazyQuery`](/react/data/queries/#executing-queries-manually).
|
|
217
|
-
*
|
|
218
|
-
* @docGroup 2. Network info
|
|
219
|
-
*/
|
|
220
|
-
called: unknown;
|
|
221
201
|
/**
|
|
222
202
|
* An object containing the variables that were provided for the query.
|
|
223
203
|
*
|
|
@@ -392,7 +372,7 @@ export interface MutationOptionsDocumentation {
|
|
|
392
372
|
/**
|
|
393
373
|
* If `true`, the in-progress mutation's associated component re-renders whenever the network status changes or a network error occurs.
|
|
394
374
|
*
|
|
395
|
-
* The default value is `
|
|
375
|
+
* The default value is `true`.
|
|
396
376
|
*
|
|
397
377
|
* @docGroup 2. Networking options
|
|
398
378
|
*/
|
|
@@ -457,6 +437,10 @@ export interface MutationResultDocumentation {
|
|
|
457
437
|
* A function that you can call to reset the mutation's result to its initial, uncalled state.
|
|
458
438
|
*/
|
|
459
439
|
reset: unknown;
|
|
440
|
+
/**
|
|
441
|
+
* Custom extensions returned from the GraphQL server
|
|
442
|
+
*/
|
|
443
|
+
extensions: unknown;
|
|
460
444
|
}
|
|
461
445
|
export interface SubscriptionOptionsDocumentation {
|
|
462
446
|
/**
|
|
@@ -514,24 +498,12 @@ export interface SubscriptionOptionsDocumentation {
|
|
|
514
498
|
* @since 3.7.0
|
|
515
499
|
*/
|
|
516
500
|
onData: unknown;
|
|
517
|
-
/**
|
|
518
|
-
* 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 `subscriptionData`.
|
|
519
|
-
*
|
|
520
|
-
* @deprecated Use `onData` instead
|
|
521
|
-
*/
|
|
522
|
-
onSubscriptionData: unknown;
|
|
523
501
|
/**
|
|
524
502
|
* Allows the registration of a callback function that will be triggered each time the `useSubscription` Hook / `Subscription` component receives an error.
|
|
525
503
|
*
|
|
526
504
|
* @since 3.7.0
|
|
527
505
|
*/
|
|
528
506
|
onError: unknown;
|
|
529
|
-
/**
|
|
530
|
-
* Allows the registration of a callback function that will be triggered when the `useSubscription` Hook / `Subscription` component completes the subscription.
|
|
531
|
-
*
|
|
532
|
-
* @deprecated Use `onComplete` instead
|
|
533
|
-
*/
|
|
534
|
-
onSubscriptionComplete: unknown;
|
|
535
507
|
}
|
|
536
508
|
export interface SubscriptionResultDocumentation {
|
|
537
509
|
/**
|
package/testing/core/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export type { MockedResponse, MockLinkOptions, ResultFunction, } from "./mocking/mockLink.js";
|
|
2
|
-
export { MockLink, mockSingleLink } from "./mocking/mockLink.js";
|
|
1
|
+
export type { MockedRequest, MockedResponse, MockLinkOptions, ResultFunction, } from "./mocking/mockLink.js";
|
|
2
|
+
export { MockLink, mockSingleLink, realisticDelay, } from "./mocking/mockLink.js";
|
|
3
3
|
export { mockObservableLink, MockSubscriptionLink, } from "./mocking/mockSubscriptionLink.js";
|
|
4
4
|
export { createMockClient } from "./mocking/mockClient.js";
|
|
5
5
|
export { tick, wait } from "./wait.js";
|
|
6
|
-
export
|
|
6
|
+
export { withErrorSpy, withLogSpy, withWarningSpy } from "./withConsoleSpy.js";
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/testing/core/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { MockLink, mockSingleLink } from "./mocking/mockLink.js";
|
|
1
|
+
export { MockLink, mockSingleLink, realisticDelay, } from "./mocking/mockLink.js";
|
|
2
2
|
export { mockObservableLink, MockSubscriptionLink, } from "./mocking/mockSubscriptionLink.js";
|
|
3
3
|
export { createMockClient } from "./mocking/mockClient.js";
|
|
4
4
|
export { tick, wait } from "./wait.js";
|
|
5
|
-
export
|
|
5
|
+
export { withErrorSpy, withLogSpy, withWarningSpy } from "./withConsoleSpy.js";
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/testing/core/index.ts"],"sourcesContent":["export type {\n MockedResponse,\n MockLinkOptions,\n ResultFunction,\n} from \"./mocking/mockLink.js\";\nexport {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/testing/core/index.ts"],"sourcesContent":["export type {\n MockedRequest,\n MockedResponse,\n MockLinkOptions,\n ResultFunction,\n} from \"./mocking/mockLink.js\";\nexport {\n MockLink,\n mockSingleLink,\n realisticDelay,\n} from \"./mocking/mockLink.js\";\nexport {\n mockObservableLink,\n MockSubscriptionLink,\n} from \"./mocking/mockSubscriptionLink.js\";\nexport { createMockClient } from \"./mocking/mockClient.js\";\nexport { tick, wait } from \"./wait.js\";\nexport { withErrorSpy, withLogSpy, withWarningSpy } from \"./withConsoleSpy.js\";\n"],"names":[],"mappings":"AAMA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EACL,CADF,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACU,EACR,CAFF,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CA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AAA,CAAa,EAAE,CAAf,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAA2B,CAA3B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAsC;AACtC,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAS,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAuB,CAAvB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAmC,CAAnC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAyD,CAAzD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { DocumentNode } from "graphql";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export declare function createMockClient<TData>(data: TData, query: DocumentNode, variables?: {}): ApolloClient<NormalizedCacheObject>;
|
|
2
|
+
import { ApolloClient } from "@apollo/client";
|
|
3
|
+
export declare function createMockClient<TData>(data: TData, query: DocumentNode, variables?: {}): ApolloClient;
|
|
5
4
|
//# sourceMappingURL=mockClient.d.ts.map
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
+
import { ApolloClient } from "@apollo/client";
|
|
1
2
|
import { InMemoryCache } from "@apollo/client/cache";
|
|
2
|
-
import { ApolloClient } from "@apollo/client/core";
|
|
3
3
|
import { mockSingleLink } from "./mockLink.js";
|
|
4
|
+
// TODO: Deprecate this function
|
|
4
5
|
export function createMockClient(data, query, variables = {}) {
|
|
5
6
|
return new ApolloClient({
|
|
6
7
|
link: mockSingleLink({
|
|
7
8
|
request: { query, variables },
|
|
8
9
|
result: { data },
|
|
9
|
-
}).setOnError((error) => {
|
|
10
|
-
throw error;
|
|
11
10
|
}),
|
|
12
11
|
cache: new InMemoryCache(),
|
|
13
12
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mockClient.js","sources":["../../../../src/testing/core/mocking/mockClient.ts"],"sourcesContent":["import type { DocumentNode } from \"graphql\";\n\nimport
|
|
1
|
+
{"version":3,"file":"mockClient.js","sources":["../../../../src/testing/core/mocking/mockClient.ts"],"sourcesContent":["import type { DocumentNode } from \"graphql\";\n\nimport { ApolloClient } from \"@apollo/client\";\nimport { InMemoryCache } from \"@apollo/client/cache\";\n\nimport { mockSingleLink } from \"./mockLink.js\";\n\n// TODO: Deprecate this function\nexport function createMockClient<TData>(\n data: TData,\n query: DocumentNode,\n variables = {}\n): ApolloClient {\n return new ApolloClient({\n link: mockSingleLink({\n request: { query, variables },\n result: { data },\n }),\n cache: new InMemoryCache(),\n });\n}\n"],"names":[],"mappings":"AAEA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAA6B,CAA7B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA6C;AAC7C,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAA8B,CAA9B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoD;AAEpD,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA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