@apollo/client 4.0.0-alpha.0 → 4.0.0-alpha.2
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/clean-sheep-hide.md +6 -0
- package/.changeset/cool-bikes-shake.md +12 -0
- package/.changeset/cuddly-spiders-tie.md +5 -0
- package/.changeset/gorgeous-chefs-tap.md +5 -0
- package/.changeset/hip-vans-act.md +5 -0
- package/.changeset/nervous-goats-allow.md +5 -0
- package/.changeset/pre.json +12 -0
- package/.changeset/rare-houses-prove.md +5 -0
- package/.changeset/slimy-maps-press.md +5 -0
- package/.changeset/small-buttons-rhyme.md +5 -0
- package/.changeset/tall-bikes-develop.md +5 -0
- package/.changeset/tame-doors-shop.md +14 -0
- package/.changeset/young-phones-fold.md +5 -0
- package/CHANGELOG.md +53 -0
- package/__cjs/cache/core/cache.cjs +4 -4
- 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/inmemory/entityStore.cjs +5 -7
- package/__cjs/cache/inmemory/entityStore.cjs.map +1 -1
- package/__cjs/cache/inmemory/entityStore.d.cts +2 -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 +6 -18
- package/__cjs/cache/inmemory/inMemoryCache.cjs.map +1 -1
- package/__cjs/cache/inmemory/inMemoryCache.d.cts +8 -10
- 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 +6 -6
- 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/core/ApolloClient.cjs +5 -5
- package/__cjs/core/ApolloClient.cjs.map +1 -1
- package/__cjs/core/ApolloClient.d.cts +19 -19
- 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 +5 -5
- package/__cjs/core/ObservableQuery.cjs.map +1 -1
- package/__cjs/core/ObservableQuery.d.cts +4 -4
- package/__cjs/core/QueryInfo.cjs +0 -1
- package/__cjs/core/QueryInfo.cjs.map +1 -1
- package/__cjs/core/QueryInfo.d.cts +1 -1
- package/__cjs/core/QueryManager.cjs +12 -12
- package/__cjs/core/QueryManager.cjs.map +1 -1
- package/__cjs/core/QueryManager.d.cts +26 -16
- package/__cjs/core/types.d.cts +4 -4
- package/__cjs/core/watchQueryOptions.d.cts +10 -26
- package/__cjs/invariantErrorCodes.cjs +44 -38
- package/__cjs/link/batch/batching.cjs.map +1 -1
- package/__cjs/link/core/ApolloLink.cjs +2 -2
- package/__cjs/link/http/createHttpLink.d.cts +2 -1
- package/__cjs/link/http/parseAndCheckHttpResponse.cjs +4 -3
- package/__cjs/link/http/parseAndCheckHttpResponse.cjs.map +1 -1
- package/__cjs/link/http/serializeFetchParameter.cjs +1 -1
- package/__cjs/link/persisted-queries/index.cjs +1 -1
- package/__cjs/link/persisted-queries/index.cjs.map +1 -1
- package/__cjs/link/persisted-queries/index.d.cts +12 -1
- 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/masking/maskDefinition.cjs.map +1 -1
- package/__cjs/masking/maskDefinition.d.cts +1 -1
- package/__cjs/masking/maskFragment.cjs.map +1 -1
- package/__cjs/masking/maskFragment.d.cts +1 -1
- package/__cjs/masking/maskOperation.cjs.map +1 -1
- package/__cjs/masking/maskOperation.d.cts +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 +1 -1
- package/__cjs/react/context/ApolloContext.cjs +1 -1
- package/__cjs/react/context/ApolloContext.cjs.map +1 -1
- package/__cjs/react/context/ApolloContext.d.cts +1 -1
- package/__cjs/react/context/ApolloProvider.cjs +1 -1
- package/__cjs/react/context/ApolloProvider.cjs.map +1 -1
- package/__cjs/react/context/ApolloProvider.d.cts +3 -3
- package/__cjs/react/hooks/internal/__use.cjs +1 -1
- package/__cjs/react/hooks/internal/__use.cjs.map +1 -1
- package/__cjs/react/hooks/internal/__use.d.cts +3 -1
- package/__cjs/react/hooks/internal/useDeepMemo.cjs +3 -1
- package/__cjs/react/hooks/internal/useDeepMemo.cjs.map +1 -1
- package/__cjs/react/hooks/internal/useIsomorphicLayoutEffect.cjs +1 -1
- package/__cjs/react/hooks/internal/useIsomorphicLayoutEffect.cjs.map +1 -1
- package/__cjs/react/hooks/internal/useIsomorphicLayoutEffect.d.cts +2 -2
- package/__cjs/react/hooks/internal/useRenderGuard.cjs +1 -1
- package/__cjs/react/hooks/internal/useRenderGuard.cjs.map +1 -1
- package/__cjs/react/hooks/internal/wrapHook.cjs.map +1 -1
- package/__cjs/react/hooks/internal/wrapHook.d.cts +1 -1
- package/__cjs/react/hooks/useApolloClient.cjs +1 -1
- package/__cjs/react/hooks/useApolloClient.cjs.map +1 -1
- package/__cjs/react/hooks/useApolloClient.d.cts +1 -1
- package/__cjs/react/hooks/useBackgroundQuery.cjs +1 -1
- package/__cjs/react/hooks/useBackgroundQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useFragment.cjs +1 -1
- package/__cjs/react/hooks/useFragment.cjs.map +1 -1
- package/__cjs/react/hooks/useFragment.d.cts +3 -3
- package/__cjs/react/hooks/useLazyQuery.cjs +6 -4
- package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useLazyQuery.d.cts +4 -12
- package/__cjs/react/hooks/useLoadableQuery.cjs +1 -1
- package/__cjs/react/hooks/useLoadableQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useMutation.cjs +1 -2
- package/__cjs/react/hooks/useMutation.cjs.map +1 -1
- package/__cjs/react/hooks/useMutation.d.cts +1 -1
- package/__cjs/react/hooks/useQuery.cjs +12 -21
- package/__cjs/react/hooks/useQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useQuery.d.cts +1 -1
- package/__cjs/react/hooks/useQueryRefHandlers.cjs +1 -1
- package/__cjs/react/hooks/useQueryRefHandlers.cjs.map +1 -1
- package/__cjs/react/hooks/useReactiveVar.cjs +1 -1
- package/__cjs/react/hooks/useReactiveVar.cjs.map +1 -1
- package/__cjs/react/hooks/useReadQuery.cjs +1 -1
- package/__cjs/react/hooks/useReadQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useSubscription.cjs +2 -1
- package/__cjs/react/hooks/useSubscription.cjs.map +1 -1
- package/__cjs/react/hooks/useSubscription.d.cts +7 -1
- package/__cjs/react/hooks/useSuspenseFragment.cjs +1 -1
- package/__cjs/react/hooks/useSuspenseFragment.cjs.map +1 -1
- package/__cjs/react/hooks/useSuspenseFragment.d.cts +1 -1
- package/__cjs/react/hooks/useSuspenseQuery.cjs +1 -1
- package/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useSuspenseQuery.d.cts +2 -2
- package/__cjs/react/hooks/useSyncExternalStore.cjs +1 -1
- package/__cjs/react/hooks/useSyncExternalStore.cjs.map +1 -1
- package/__cjs/react/index.react-server.cjs +52 -0
- package/__cjs/react/index.react-server.cjs.map +1 -0
- package/__cjs/react/index.react-server.d.cts +20 -0
- 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 +1 -6
- package/__cjs/react/internal/cache/QueryReference.cjs.map +1 -1
- package/__cjs/react/internal/cache/QueryReference.d.cts +6 -6
- 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 +2 -2
- package/__cjs/react/parser/index.cjs +3 -3
- package/__cjs/react/parser/index.cjs.map +1 -1
- package/__cjs/react/query-preloader/createQueryPreloader.cjs.map +1 -1
- package/__cjs/react/query-preloader/createQueryPreloader.d.cts +1 -9
- package/__cjs/react/ssr/getDataFromTree.cjs +1 -1
- package/__cjs/react/ssr/getDataFromTree.cjs.map +1 -1
- package/__cjs/react/types/types.d.cts +31 -49
- package/__cjs/react/types/types.documentation.d.cts +0 -12
- package/__cjs/testing/core/mocking/mockClient.cjs.map +1 -1
- package/__cjs/testing/core/mocking/mockClient.d.cts +1 -2
- package/__cjs/testing/core/mocking/mockLink.cjs.map +1 -1
- package/__cjs/testing/internal/disposables/withProdMode.d.cts +1 -1
- package/__cjs/testing/internal/incremental.d.cts +3 -2
- package/__cjs/testing/internal/renderHelpers.cjs.map +1 -1
- package/__cjs/testing/internal/renderHelpers.d.cts +2 -2
- package/__cjs/testing/internal/scenarios/index.d.cts +16 -5
- package/__cjs/testing/react/MockedProvider.cjs.map +1 -1
- package/__cjs/testing/react/MockedProvider.d.cts +3 -3
- package/__cjs/utilities/common/canonicalStringify.cjs +2 -2
- package/__cjs/utilities/common/canonicalStringify.cjs.map +1 -1
- package/__cjs/utilities/common/errorHandling.d.cts +1 -1
- package/__cjs/utilities/common/maybeDeepFreeze.cjs +1 -0
- package/__cjs/utilities/common/maybeDeepFreeze.cjs.map +1 -1
- package/__cjs/utilities/common/maybeDeepFreeze.d.cts +1 -0
- package/__cjs/utilities/graphql/print.cjs +2 -2
- package/__cjs/utilities/graphql/print.cjs.map +1 -1
- package/__cjs/utilities/{caching → internal}/getMemoryInternals.cjs +1 -1
- package/__cjs/utilities/internal/getMemoryInternals.cjs.map +1 -0
- package/__cjs/utilities/{caching → internal}/getMemoryInternals.d.cts +1 -1
- package/__cjs/utilities/internal/index.cjs +6 -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 +10 -0
- package/__cjs/utilities/internal/index.production.cjs.map +1 -0
- package/__cjs/utilities/internal/index.production.d.cts +3 -0
- package/__cjs/utilities/types/NoInfer.d.cts +1 -1
- package/__cjs/version.cjs +1 -1
- package/__cjs/version.d.cts +1 -1
- package/cache/core/cache.d.ts +18 -18
- package/cache/core/cache.js +2 -2
- 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/inmemory/entityStore.d.ts +2 -2
- package/cache/inmemory/entityStore.js +5 -7
- package/cache/inmemory/entityStore.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 -10
- package/cache/inmemory/inMemoryCache.js +5 -17
- 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 +6 -6
- 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/core/ApolloClient.d.ts +19 -19
- package/core/ApolloClient.js +4 -4
- 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 +3 -3
- package/core/ObservableQuery.js +5 -5
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryInfo.d.ts +1 -1
- package/core/QueryInfo.js +0 -1
- package/core/QueryInfo.js.map +1 -1
- package/core/QueryManager.d.ts +13 -13
- package/core/QueryManager.js +11 -11
- package/core/QueryManager.js.map +1 -1
- package/core/types.d.ts +4 -4
- package/core/watchQueryOptions.d.ts +10 -26
- package/invariantErrorCodes.js +44 -38
- package/link/batch/batching.js +1 -1
- package/link/batch/batching.js.map +1 -1
- package/link/core/ApolloLink.js +2 -2
- package/link/http/parseAndCheckHttpResponse.js +4 -3
- package/link/http/parseAndCheckHttpResponse.js.map +1 -1
- package/link/http/serializeFetchParameter.js +1 -1
- package/masking/maskDefinition.d.ts +1 -1
- package/masking/maskDefinition.js.map +1 -1
- package/masking/maskFragment.d.ts +1 -1
- package/masking/maskFragment.js.map +1 -1
- package/masking/maskOperation.d.ts +1 -1
- package/masking/maskOperation.js.map +1 -1
- package/package.json +39 -17
- package/react/context/ApolloConsumer.d.ts +1 -1
- package/react/context/ApolloConsumer.js +1 -1
- package/react/context/ApolloConsumer.js.map +1 -1
- package/react/context/ApolloContext.d.ts +1 -1
- package/react/context/ApolloContext.js +1 -1
- package/react/context/ApolloContext.js.map +1 -1
- package/react/context/ApolloProvider.d.ts +3 -3
- package/react/context/ApolloProvider.js +1 -1
- package/react/context/ApolloProvider.js.map +1 -1
- package/react/hooks/internal/__use.js +1 -1
- package/react/hooks/internal/__use.js.map +1 -1
- package/react/hooks/internal/useDeepMemo.js +3 -1
- package/react/hooks/internal/useDeepMemo.js.map +1 -1
- package/react/hooks/internal/useIsomorphicLayoutEffect.d.ts +1 -1
- package/react/hooks/internal/useIsomorphicLayoutEffect.js +1 -1
- package/react/hooks/internal/useIsomorphicLayoutEffect.js.map +1 -1
- package/react/hooks/internal/useRenderGuard.js +1 -1
- package/react/hooks/internal/useRenderGuard.js.map +1 -1
- package/react/hooks/internal/wrapHook.d.ts +1 -1
- package/react/hooks/internal/wrapHook.js.map +1 -1
- package/react/hooks/useApolloClient.d.ts +1 -1
- package/react/hooks/useApolloClient.js +1 -1
- package/react/hooks/useApolloClient.js.map +1 -1
- package/react/hooks/useBackgroundQuery.js +1 -1
- package/react/hooks/useBackgroundQuery.js.map +1 -1
- package/react/hooks/useFragment.d.ts +3 -3
- package/react/hooks/useFragment.js +1 -1
- package/react/hooks/useFragment.js.map +1 -1
- package/react/hooks/useLazyQuery.d.ts +4 -12
- package/react/hooks/useLazyQuery.js +6 -4
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/react/hooks/useLoadableQuery.js +1 -1
- package/react/hooks/useLoadableQuery.js.map +1 -1
- package/react/hooks/useMutation.d.ts +1 -1
- package/react/hooks/useMutation.js +1 -2
- package/react/hooks/useMutation.js.map +1 -1
- package/react/hooks/useQuery.d.ts +1 -1
- package/react/hooks/useQuery.js +12 -21
- package/react/hooks/useQuery.js.map +1 -1
- package/react/hooks/useQueryRefHandlers.js +1 -1
- package/react/hooks/useQueryRefHandlers.js.map +1 -1
- package/react/hooks/useReactiveVar.js +1 -1
- package/react/hooks/useReactiveVar.js.map +1 -1
- package/react/hooks/useReadQuery.js +1 -1
- package/react/hooks/useReadQuery.js.map +1 -1
- package/react/hooks/useSubscription.d.ts +1 -1
- package/react/hooks/useSubscription.js +2 -1
- package/react/hooks/useSubscription.js.map +1 -1
- package/react/hooks/useSuspenseFragment.d.ts +1 -1
- package/react/hooks/useSuspenseFragment.js +1 -1
- package/react/hooks/useSuspenseFragment.js.map +1 -1
- package/react/hooks/useSuspenseQuery.d.ts +2 -2
- package/react/hooks/useSuspenseQuery.js +1 -1
- package/react/hooks/useSuspenseQuery.js.map +1 -1
- package/react/hooks/useSyncExternalStore.js +1 -1
- package/react/hooks/useSyncExternalStore.js.map +1 -1
- package/react/index.react-server.d.ts +20 -0
- package/react/index.react-server.js +46 -0
- package/react/index.react-server.js.map +1 -0
- 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 +1 -1
- package/react/internal/cache/QueryReference.js +1 -6
- 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 +1 -1
- package/react/internal/cache/getSuspenseCache.js.map +1 -1
- package/react/parser/index.js +1 -1
- package/react/parser/index.js.map +1 -1
- package/react/query-preloader/createQueryPreloader.d.ts +1 -9
- package/react/query-preloader/createQueryPreloader.js.map +1 -1
- package/react/ssr/getDataFromTree.js +1 -1
- package/react/ssr/getDataFromTree.js.map +1 -1
- package/react/types/types.d.ts +31 -49
- package/react/types/types.documentation.d.ts +0 -12
- package/testing/core/mocking/mockClient.d.ts +1 -2
- package/testing/core/mocking/mockClient.js.map +1 -1
- package/testing/core/mocking/mockLink.js +1 -1
- package/testing/core/mocking/mockLink.js.map +1 -1
- package/testing/internal/renderHelpers.d.ts +2 -2
- package/testing/internal/renderHelpers.js.map +1 -1
- package/testing/react/MockedProvider.d.ts +3 -3
- package/testing/react/MockedProvider.js.map +1 -1
- package/utilities/common/canonicalStringify.js +1 -1
- package/utilities/common/canonicalStringify.js.map +1 -1
- package/utilities/common/maybeDeepFreeze.d.ts +1 -0
- package/utilities/common/maybeDeepFreeze.js +1 -0
- package/utilities/common/maybeDeepFreeze.js.map +1 -1
- package/utilities/graphql/print.js +1 -1
- package/utilities/graphql/print.js.map +1 -1
- package/utilities/{caching → internal}/getMemoryInternals.js +1 -1
- package/utilities/internal/getMemoryInternals.js.map +1 -0
- package/utilities/internal/index.d.ts +1 -0
- package/utilities/internal/index.js +1 -0
- package/utilities/internal/index.js.map +1 -1
- package/utilities/internal/index.production.d.ts +3 -0
- package/utilities/internal/index.production.js +6 -0
- package/utilities/internal/index.production.js.map +1 -0
- package/utilities/types/NoInfer.d.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/__cjs/cache/inmemory/fixPolyfills.cjs +0 -10
- package/__cjs/cache/inmemory/fixPolyfills.cjs.map +0 -1
- package/__cjs/cache/inmemory/fixPolyfills.d.cts +0 -2
- package/__cjs/cache/inmemory/fixPolyfills.native.cjs +0 -53
- package/__cjs/cache/inmemory/fixPolyfills.native.cjs.map +0 -1
- package/__cjs/cache/inmemory/fixPolyfills.native.d.cts +0 -2
- 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/link/http/iterators/async.cjs +0 -19
- package/__cjs/link/http/iterators/async.cjs.map +0 -1
- package/__cjs/link/http/iterators/async.d.cts +0 -6
- package/__cjs/link/http/iterators/nodeStream.cjs +0 -75
- package/__cjs/link/http/iterators/nodeStream.cjs.map +0 -1
- package/__cjs/link/http/iterators/nodeStream.d.cts +0 -7
- package/__cjs/link/http/iterators/promise.cjs +0 -32
- package/__cjs/link/http/iterators/promise.cjs.map +0 -1
- package/__cjs/link/http/iterators/promise.d.cts +0 -6
- package/__cjs/link/http/iterators/reader.cjs +0 -19
- package/__cjs/link/http/iterators/reader.cjs.map +0 -1
- package/__cjs/link/http/iterators/reader.d.cts +0 -6
- package/__cjs/link/http/responseIterator.cjs +0 -50
- package/__cjs/link/http/responseIterator.cjs.map +0 -1
- package/__cjs/link/http/responseIterator.d.cts +0 -7
- package/__cjs/utilities/caching/getMemoryInternals.cjs.map +0 -1
- package/cache/inmemory/fixPolyfills.d.ts +0 -2
- package/cache/inmemory/fixPolyfills.js +0 -10
- package/cache/inmemory/fixPolyfills.js.map +0 -1
- package/cache/inmemory/fixPolyfills.native.d.ts +0 -2
- package/cache/inmemory/fixPolyfills.native.js +0 -53
- package/cache/inmemory/fixPolyfills.native.js.map +0 -1
- 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/link/http/iterators/async.d.ts +0 -6
- package/link/http/iterators/async.js +0 -16
- package/link/http/iterators/async.js.map +0 -1
- package/link/http/iterators/nodeStream.d.ts +0 -7
- package/link/http/iterators/nodeStream.js +0 -72
- package/link/http/iterators/nodeStream.js.map +0 -1
- package/link/http/iterators/promise.d.ts +0 -6
- package/link/http/iterators/promise.js +0 -29
- package/link/http/iterators/promise.js.map +0 -1
- package/link/http/iterators/reader.d.ts +0 -6
- package/link/http/iterators/reader.js +0 -16
- package/link/http/iterators/reader.js.map +0 -1
- package/link/http/responseIterator.d.ts +0 -7
- package/link/http/responseIterator.js +0 -46
- package/link/http/responseIterator.js.map +0 -1
- package/utilities/caching/getMemoryInternals.js.map +0 -1
- /package/utilities/{caching → internal}/getMemoryInternals.d.ts +0 -0
|
@@ -18,6 +18,16 @@ interface MutationStoreValue {
|
|
|
18
18
|
error: Error | null;
|
|
19
19
|
}
|
|
20
20
|
type UpdateQueries<TData> = MutationOptions<TData, any, any>["updateQueries"];
|
|
21
|
+
interface TransformCacheEntry {
|
|
22
|
+
hasClientExports: boolean;
|
|
23
|
+
hasForcedResolvers: boolean;
|
|
24
|
+
hasNonreactiveDirective: boolean;
|
|
25
|
+
nonReactiveQuery: DocumentNode;
|
|
26
|
+
clientQuery: DocumentNode | null;
|
|
27
|
+
serverQuery: DocumentNode | null;
|
|
28
|
+
defaultVars: OperationVariables;
|
|
29
|
+
asQuery: DocumentNode;
|
|
30
|
+
}
|
|
21
31
|
interface MaskFragmentOptions<TData> {
|
|
22
32
|
fragment: DocumentNode;
|
|
23
33
|
data: TData;
|
|
@@ -29,8 +39,8 @@ interface MaskOperationOptions<TData> {
|
|
|
29
39
|
id: string;
|
|
30
40
|
fetchPolicy?: WatchQueryFetchPolicy;
|
|
31
41
|
}
|
|
32
|
-
interface QueryManagerOptions
|
|
33
|
-
cache: ApolloCache
|
|
42
|
+
interface QueryManagerOptions {
|
|
43
|
+
cache: ApolloCache;
|
|
34
44
|
link: ApolloLink;
|
|
35
45
|
defaultOptions: DefaultOptions;
|
|
36
46
|
documentTransform: DocumentTransform | null | undefined;
|
|
@@ -38,13 +48,13 @@ interface QueryManagerOptions<TStore> {
|
|
|
38
48
|
onBroadcast: undefined | (() => void);
|
|
39
49
|
ssrMode: boolean;
|
|
40
50
|
clientAwareness: Record<string, string>;
|
|
41
|
-
localState: LocalState
|
|
51
|
+
localState: LocalState;
|
|
42
52
|
assumeImmutableResults: boolean;
|
|
43
53
|
defaultContext: Partial<DefaultContext> | undefined;
|
|
44
54
|
dataMasking: boolean;
|
|
45
55
|
}
|
|
46
|
-
export declare class QueryManager
|
|
47
|
-
cache: ApolloCache
|
|
56
|
+
export declare class QueryManager {
|
|
57
|
+
cache: ApolloCache;
|
|
48
58
|
link: ApolloLink;
|
|
49
59
|
defaultOptions: DefaultOptions;
|
|
50
60
|
readonly assumeImmutableResults: boolean;
|
|
@@ -61,15 +71,15 @@ export declare class QueryManager<TStore> {
|
|
|
61
71
|
};
|
|
62
72
|
private queries;
|
|
63
73
|
protected fetchCancelFns: Map<string, (error: any) => any>;
|
|
64
|
-
constructor(options: QueryManagerOptions
|
|
74
|
+
constructor(options: QueryManagerOptions);
|
|
65
75
|
/**
|
|
66
76
|
* Call this method to terminate any active query processes, making it safe
|
|
67
77
|
* to dispose of this QueryManager instance.
|
|
68
78
|
*/
|
|
69
79
|
stop(): void;
|
|
70
80
|
private cancelPendingFetches;
|
|
71
|
-
mutate<TData, TVariables extends OperationVariables, TContext extends Record<string, any>, TCache extends ApolloCache
|
|
72
|
-
markMutationResult<TData, TVariables, TContext, TCache extends ApolloCache
|
|
81
|
+
mutate<TData, TVariables extends OperationVariables, TContext extends Record<string, any>, TCache extends ApolloCache>({ mutation, variables, optimisticResponse, updateQueries, refetchQueries, awaitRefetchQueries, update: updateWithProxyFn, onQueryUpdated, fetchPolicy, errorPolicy, keepRootFields, context, }: MutationOptions<TData, TVariables, TContext>): Promise<FetchResult<MaybeMasked<TData>>>;
|
|
82
|
+
markMutationResult<TData, TVariables extends OperationVariables, TContext, TCache extends ApolloCache>(mutation: {
|
|
73
83
|
mutationId: string;
|
|
74
84
|
result: FetchResult<TData>;
|
|
75
85
|
document: DocumentNode;
|
|
@@ -84,8 +94,8 @@ export declare class QueryManager<TStore> {
|
|
|
84
94
|
removeOptimistic?: string;
|
|
85
95
|
onQueryUpdated?: OnQueryUpdated<any>;
|
|
86
96
|
keepRootFields?: boolean;
|
|
87
|
-
}, cache?: ApolloCache
|
|
88
|
-
markMutationOptimistic<TData, TVariables, TContext, TCache extends ApolloCache
|
|
97
|
+
}, cache?: ApolloCache): Promise<FetchResult<TData>>;
|
|
98
|
+
markMutationOptimistic<TData, TVariables extends OperationVariables, TContext, TCache extends ApolloCache>(optimisticResponse: any, mutation: {
|
|
89
99
|
mutationId: string;
|
|
90
100
|
document: DocumentNode;
|
|
91
101
|
variables?: TVariables;
|
|
@@ -97,9 +107,9 @@ export declare class QueryManager<TStore> {
|
|
|
97
107
|
keepRootFields?: boolean;
|
|
98
108
|
}): boolean;
|
|
99
109
|
fetchQuery<TData, TVars extends OperationVariables>(queryId: string, options: WatchQueryOptions<TVars, TData>, networkStatus?: NetworkStatus): Promise<ApolloQueryResult<TData>>;
|
|
100
|
-
transform(document: DocumentNode):
|
|
110
|
+
transform(document: DocumentNode): DocumentNode;
|
|
101
111
|
private transformCache;
|
|
102
|
-
getDocumentInfo(document: DocumentNode):
|
|
112
|
+
getDocumentInfo(document: DocumentNode): TransformCacheEntry;
|
|
103
113
|
private getVariables;
|
|
104
114
|
watchQuery<T, TVariables extends OperationVariables = OperationVariables>(options: WatchQueryOptions<TVariables, T>): ObservableQuery<T, TVariables>;
|
|
105
115
|
query<TData, TVars extends OperationVariables = OperationVariables>(options: QueryOptions<TVars, TData>, queryId?: string): Promise<ApolloQueryResult<MaybeMasked<TData>>>;
|
|
@@ -113,21 +123,21 @@ export declare class QueryManager<TStore> {
|
|
|
113
123
|
getObservableQueries(include?: InternalRefetchQueriesInclude): Map<string, ObservableQuery<any, OperationVariables>>;
|
|
114
124
|
reFetchObservableQueries(includeStandby?: boolean): Promise<ApolloQueryResult<any>[]>;
|
|
115
125
|
setObservableQuery(observableQuery: ObservableQuery<any, any>): void;
|
|
116
|
-
startGraphQLSubscription<
|
|
126
|
+
startGraphQLSubscription<TData = unknown>(options: SubscriptionOptions): Observable<FetchResult<TData>>;
|
|
117
127
|
stopQuery(queryId: string): void;
|
|
118
128
|
removeQuery(queryId: string): void;
|
|
119
129
|
broadcastQueries(): void;
|
|
120
|
-
getLocalState(): LocalState
|
|
130
|
+
getLocalState(): LocalState;
|
|
121
131
|
protected inFlightLinkObservables: Trie<{
|
|
122
132
|
observable?: Observable<FetchResult<any>>;
|
|
123
133
|
}>;
|
|
124
134
|
private getObservableFromLink;
|
|
125
135
|
private getResultsFromLink;
|
|
126
136
|
fetchObservableWithInfo<TData, TVars extends OperationVariables>(queryId: string, options: WatchQueryOptions<TVars, TData>, networkStatus?: NetworkStatus, query?: DocumentNode | import("@graphql-typed-document-node/core").TypedDocumentNode<TData, TVars>, emitLoadingState?: boolean): ObservableAndInfo<TData>;
|
|
127
|
-
refetchQueries<TResult>({ updateCache, include, optimistic, removeOptimistic, onQueryUpdated, }: InternalRefetchQueriesOptions<ApolloCache
|
|
137
|
+
refetchQueries<TResult>({ updateCache, include, optimistic, removeOptimistic, onQueryUpdated, }: InternalRefetchQueriesOptions<ApolloCache, TResult>): InternalRefetchQueriesMap<TResult>;
|
|
128
138
|
private noCacheWarningsByQueryId;
|
|
129
139
|
maskOperation<TData = unknown>(options: MaskOperationOptions<TData>): MaybeMasked<TData>;
|
|
130
|
-
maskFragment<TData = unknown>(options: MaskFragmentOptions<TData>):
|
|
140
|
+
maskFragment<TData = unknown>(options: MaskFragmentOptions<TData>): TData;
|
|
131
141
|
private fetchQueryByPolicy;
|
|
132
142
|
private getQuery;
|
|
133
143
|
private prepareContext;
|
package/__cjs/core/types.d.cts
CHANGED
|
@@ -55,7 +55,7 @@ export type InternalRefetchQueryDescriptor = RefetchQueryDescriptor | QueryOptio
|
|
|
55
55
|
type RefetchQueriesIncludeShorthand = "all" | "active";
|
|
56
56
|
export type RefetchQueriesInclude = RefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand;
|
|
57
57
|
export type InternalRefetchQueriesInclude = InternalRefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand;
|
|
58
|
-
export interface RefetchQueriesOptions<TCache extends ApolloCache
|
|
58
|
+
export interface RefetchQueriesOptions<TCache extends ApolloCache, TResult> {
|
|
59
59
|
updateCache?: (cache: TCache) => void;
|
|
60
60
|
include?: RefetchQueriesInclude;
|
|
61
61
|
optimistic?: boolean;
|
|
@@ -66,7 +66,7 @@ export interface RefetchQueriesResult<TResult> extends Promise<RefetchQueriesPro
|
|
|
66
66
|
queries: ObservableQuery<any>[];
|
|
67
67
|
results: InternalRefetchQueriesResult<TResult>[];
|
|
68
68
|
}
|
|
69
|
-
export interface InternalRefetchQueriesOptions<TCache extends ApolloCache
|
|
69
|
+
export interface InternalRefetchQueriesOptions<TCache extends ApolloCache, TResult> extends Omit<RefetchQueriesOptions<TCache, TResult>, "include"> {
|
|
70
70
|
include?: InternalRefetchQueriesInclude;
|
|
71
71
|
removeOptimistic?: string;
|
|
72
72
|
}
|
|
@@ -107,8 +107,8 @@ export type MutationQueryReducersMap<T = {
|
|
|
107
107
|
*/
|
|
108
108
|
export type MutationUpdaterFn<T = {
|
|
109
109
|
[key: string]: any;
|
|
110
|
-
}> = (cache: ApolloCache
|
|
111
|
-
export type MutationUpdaterFunction<TData, TVariables, TContext, TCache extends ApolloCache
|
|
110
|
+
}> = (cache: ApolloCache, mutationResult: FetchResult<T>) => void;
|
|
111
|
+
export type MutationUpdaterFunction<TData, TVariables, TContext, TCache extends ApolloCache> = (cache: TCache, result: Omit<FetchResult<Unmasked<TData>>, "context">, options: {
|
|
112
112
|
context?: TContext;
|
|
113
113
|
variables?: TVariables;
|
|
114
114
|
}) => void;
|
|
@@ -30,7 +30,7 @@ export type ErrorPolicy = "none" | "ignore" | "all";
|
|
|
30
30
|
/**
|
|
31
31
|
* Query options.
|
|
32
32
|
*/
|
|
33
|
-
export interface QueryOptions<TVariables = OperationVariables, TData =
|
|
33
|
+
export interface QueryOptions<TVariables = OperationVariables, TData = unknown> {
|
|
34
34
|
/**
|
|
35
35
|
* A GraphQL query string parsed into an AST with the gql template literal.
|
|
36
36
|
*
|
|
@@ -111,19 +111,11 @@ export interface QueryOptions<TVariables = OperationVariables, TData = any> {
|
|
|
111
111
|
* 3. Caching options
|
|
112
112
|
*/
|
|
113
113
|
returnPartialData?: boolean;
|
|
114
|
-
/**
|
|
115
|
-
* Whether to canonize cache results before returning them. Canonization takes some extra time, but it speeds up future deep equality comparisons. Defaults to false.
|
|
116
|
-
*
|
|
117
|
-
* @deprecated
|
|
118
|
-
*
|
|
119
|
-
* Using `canonizeResults` can result in memory leaks so we generally do not recommend using this option anymore. A future version of Apollo Client will contain a similar feature without the risk of memory leaks.
|
|
120
|
-
*/
|
|
121
|
-
canonizeResults?: boolean;
|
|
122
114
|
}
|
|
123
115
|
/**
|
|
124
116
|
* Watched query options.
|
|
125
117
|
*/
|
|
126
|
-
export interface WatchQueryOptions<TVariables extends OperationVariables = OperationVariables, TData =
|
|
118
|
+
export interface WatchQueryOptions<TVariables extends OperationVariables = OperationVariables, TData = unknown> extends SharedWatchQueryOptions<TVariables, TData> {
|
|
127
119
|
/**
|
|
128
120
|
* A GraphQL query string parsed into an AST with the gql template literal.
|
|
129
121
|
*
|
|
@@ -231,14 +223,6 @@ export interface SharedWatchQueryOptions<TVariables extends OperationVariables,
|
|
|
231
223
|
*/
|
|
232
224
|
returnPartialData?: boolean;
|
|
233
225
|
/**
|
|
234
|
-
* Whether to canonize cache results before returning them. Canonization takes some extra time, but it speeds up future deep equality comparisons. Defaults to false.
|
|
235
|
-
*
|
|
236
|
-
* @deprecated
|
|
237
|
-
*
|
|
238
|
-
* Using `canonizeResults` can result in memory leaks so we generally do not recommend using this option anymore. A future version of Apollo Client will contain a similar feature without the risk of memory leaks.
|
|
239
|
-
*/
|
|
240
|
-
canonizeResults?: boolean;
|
|
241
|
-
/**
|
|
242
226
|
* A callback function that's called whenever a refetch attempt occurs while polling. If the function returns `true`, the refetch is skipped and not reattempted until the next poll interval.
|
|
243
227
|
*
|
|
244
228
|
* @docGroup
|
|
@@ -253,7 +237,7 @@ export interface NextFetchPolicyContext<TData, TVariables extends OperationVaria
|
|
|
253
237
|
options: WatchQueryOptions<TVariables, TData>;
|
|
254
238
|
initialFetchPolicy: WatchQueryFetchPolicy;
|
|
255
239
|
}
|
|
256
|
-
export interface FetchMoreQueryOptions<TVariables, TData =
|
|
240
|
+
export interface FetchMoreQueryOptions<TVariables, TData = unknown> {
|
|
257
241
|
/**
|
|
258
242
|
* A GraphQL query string parsed into an AST with the gql template literal.
|
|
259
243
|
*
|
|
@@ -290,7 +274,7 @@ export type UpdateQueryOptions<TData, TVariables> = {
|
|
|
290
274
|
complete: false;
|
|
291
275
|
previousData: DeepPartial<Unmasked<TData>> | undefined;
|
|
292
276
|
});
|
|
293
|
-
export interface UpdateQueryMapFn<TData =
|
|
277
|
+
export interface UpdateQueryMapFn<TData = unknown, TVariables = OperationVariables> {
|
|
294
278
|
(
|
|
295
279
|
/**
|
|
296
280
|
* @deprecated This value is not type-safe and may contain partial data. This
|
|
@@ -299,7 +283,7 @@ export interface UpdateQueryMapFn<TData = any, TVariables = OperationVariables>
|
|
|
299
283
|
*/
|
|
300
284
|
unsafePreviousData: Unmasked<TData>, options: UpdateQueryOptions<TData, TVariables>): Unmasked<TData> | void;
|
|
301
285
|
}
|
|
302
|
-
export type SubscribeToMoreUpdateQueryFn<TData =
|
|
286
|
+
export type SubscribeToMoreUpdateQueryFn<TData = unknown, TVariables extends OperationVariables = OperationVariables, TSubscriptionData = TData> = {
|
|
303
287
|
(
|
|
304
288
|
/**
|
|
305
289
|
* @deprecated This value is not type-safe and may contain partial data. This
|
|
@@ -312,7 +296,7 @@ export type SubscribeToMoreUpdateQueryFn<TData = any, TVariables extends Operati
|
|
|
312
296
|
};
|
|
313
297
|
}): Unmasked<TData> | void;
|
|
314
298
|
};
|
|
315
|
-
export interface SubscribeToMoreOptions<TData =
|
|
299
|
+
export interface SubscribeToMoreOptions<TData = unknown, TSubscriptionVariables extends OperationVariables = OperationVariables, TSubscriptionData = TData, TVariables extends OperationVariables = TSubscriptionVariables> {
|
|
316
300
|
document: DocumentNode | TypedDocumentNode<TSubscriptionData, TSubscriptionVariables>;
|
|
317
301
|
variables?: TSubscriptionVariables;
|
|
318
302
|
updateQuery?: SubscribeToMoreUpdateQueryFn<TData, TVariables, TSubscriptionData>;
|
|
@@ -322,7 +306,7 @@ export interface SubscribeToMoreOptions<TData = any, TSubscriptionVariables exte
|
|
|
322
306
|
export interface SubscribeToMoreFunction<TData, TVariables extends OperationVariables = OperationVariables> {
|
|
323
307
|
<TSubscriptionData = TData, TSubscriptionVariables extends OperationVariables = TVariables>(options: SubscribeToMoreOptions<TData, TSubscriptionVariables, TSubscriptionData, TVariables>): () => void;
|
|
324
308
|
}
|
|
325
|
-
export interface SubscriptionOptions<TVariables = OperationVariables, TData =
|
|
309
|
+
export interface SubscriptionOptions<TVariables = OperationVariables, TData = unknown> {
|
|
326
310
|
/**
|
|
327
311
|
* A GraphQL document, often created with `gql` from the `graphql-tag` package, that contains a single subscription inside of it.
|
|
328
312
|
*/
|
|
@@ -348,7 +332,7 @@ export interface SubscriptionOptions<TVariables = OperationVariables, TData = an
|
|
|
348
332
|
*/
|
|
349
333
|
extensions?: Record<string, any>;
|
|
350
334
|
}
|
|
351
|
-
interface MutationBaseOptions<TData =
|
|
335
|
+
interface MutationBaseOptions<TData = unknown, TVariables = OperationVariables, TContext = DefaultContext, TCache extends ApolloCache = ApolloCache> {
|
|
352
336
|
/**
|
|
353
337
|
* By providing either an object or a callback function that, when invoked after a mutation, allows you to return optimistic data and optionally skip updates via the `IGNORE` sentinel object, Apollo Client caches this temporary (and potentially incorrect) response until the mutation completes, enabling more responsive UI updates.
|
|
354
338
|
*
|
|
@@ -440,7 +424,7 @@ interface MutationBaseOptions<TData = any, TVariables = OperationVariables, TCon
|
|
|
440
424
|
*/
|
|
441
425
|
context?: TContext;
|
|
442
426
|
}
|
|
443
|
-
export interface MutationOptions<TData =
|
|
427
|
+
export interface MutationOptions<TData = unknown, TVariables = OperationVariables, TContext = DefaultContext, TCache extends ApolloCache = ApolloCache> extends MutationSharedOptions<TData, TVariables, TContext, TCache> {
|
|
444
428
|
/**
|
|
445
429
|
* A GraphQL document, often created with `gql` from the `graphql-tag` package, that contains a single mutation inside of it.
|
|
446
430
|
*
|
|
@@ -450,7 +434,7 @@ export interface MutationOptions<TData = any, TVariables = OperationVariables, T
|
|
|
450
434
|
*/
|
|
451
435
|
mutation: DocumentNode | TypedDocumentNode<TData, TVariables>;
|
|
452
436
|
}
|
|
453
|
-
export interface MutationSharedOptions<TData =
|
|
437
|
+
export interface MutationSharedOptions<TData = unknown, TVariables = OperationVariables, TContext = DefaultContext, TCache extends ApolloCache = ApolloCache> extends MutationBaseOptions<TData, TVariables, TContext, TCache> {
|
|
454
438
|
/**
|
|
455
439
|
* Provide `no-cache` if the mutation's result should _not_ be written to the Apollo Client cache.
|
|
456
440
|
*
|
|
@@ -304,16 +304,22 @@ const client = new ApolloClient({
|
|
|
304
304
|
},
|
|
305
305
|
|
|
306
306
|
58: {
|
|
307
|
+
file: "@apollo/client/__cjs/link/http/parseAndCheckHttpResponse.cjs",
|
|
308
|
+
condition: "response.body && typeof response.body.getReader === \"function\"",
|
|
309
|
+
message: "Unknown type for `response.body`. Please use a `fetch` implementation that is WhatWG-compliant and that uses WhatWG ReadableStreams for `body`."
|
|
310
|
+
},
|
|
311
|
+
|
|
312
|
+
59: {
|
|
307
313
|
file: "@apollo/client/__cjs/link/http/serializeFetchParameter.cjs",
|
|
308
314
|
message: `Network request failed. %s is not serializable: %s`
|
|
309
315
|
},
|
|
310
316
|
|
|
311
|
-
|
|
317
|
+
61: {
|
|
312
318
|
file: "@apollo/client/__cjs/link/core/ApolloLink.cjs",
|
|
313
319
|
message: "request is not implemented"
|
|
314
320
|
},
|
|
315
321
|
|
|
316
|
-
|
|
322
|
+
62: {
|
|
317
323
|
file: "@apollo/client/__cjs/core/ApolloClient.cjs",
|
|
318
324
|
|
|
319
325
|
message: "To initialize Apollo Client, you must specify a 'cache' property " +
|
|
@@ -321,7 +327,7 @@ const client = new ApolloClient({
|
|
|
321
327
|
"For more information, please visit: https://go.apollo.dev/c/docs"
|
|
322
328
|
},
|
|
323
329
|
|
|
324
|
-
|
|
330
|
+
63: {
|
|
325
331
|
file: "@apollo/client/__cjs/core/ApolloClient.cjs",
|
|
326
332
|
condition: "options.fetchPolicy !== \"cache-and-network\"",
|
|
327
333
|
|
|
@@ -331,48 +337,48 @@ const client = new ApolloClient({
|
|
|
331
337
|
"using a different fetchPolicy, such as cache-first or network-only."
|
|
332
338
|
},
|
|
333
339
|
|
|
334
|
-
|
|
340
|
+
65: {
|
|
335
341
|
file: "@apollo/client/__cjs/core/LocalState.cjs",
|
|
336
342
|
condition: "fragment",
|
|
337
343
|
message: `No fragment named %s`
|
|
338
344
|
},
|
|
339
345
|
|
|
340
|
-
|
|
346
|
+
66: {
|
|
341
347
|
file: "@apollo/client/__cjs/core/LocalState.cjs",
|
|
342
348
|
condition: "fragment",
|
|
343
349
|
message: `No fragment named %s`
|
|
344
350
|
},
|
|
345
351
|
|
|
346
|
-
|
|
352
|
+
68: {
|
|
347
353
|
file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
|
|
348
354
|
condition: "updateQuery",
|
|
349
355
|
message: "You must provide an `updateQuery` function when using `fetchMore` with a `no-cache` fetch policy."
|
|
350
356
|
},
|
|
351
357
|
|
|
352
|
-
|
|
358
|
+
70: {
|
|
353
359
|
file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
|
|
354
360
|
condition: "pollInterval",
|
|
355
361
|
message: "Attempted to start a polling query without a polling interval."
|
|
356
362
|
},
|
|
357
363
|
|
|
358
|
-
|
|
364
|
+
72: {
|
|
359
365
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
360
366
|
message: "QueryManager stopped while query was in flight"
|
|
361
367
|
},
|
|
362
368
|
|
|
363
|
-
|
|
369
|
+
73: {
|
|
364
370
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
365
371
|
condition: "mutation",
|
|
366
372
|
message: "mutation option is required. You must specify your GraphQL document in the mutation option."
|
|
367
373
|
},
|
|
368
374
|
|
|
369
|
-
|
|
375
|
+
74: {
|
|
370
376
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
371
377
|
condition: "fetchPolicy === \"network-only\" || fetchPolicy === \"no-cache\"",
|
|
372
378
|
message: "Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."
|
|
373
379
|
},
|
|
374
380
|
|
|
375
|
-
|
|
381
|
+
75: {
|
|
376
382
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
377
383
|
condition: "options.query",
|
|
378
384
|
|
|
@@ -380,81 +386,81 @@ const client = new ApolloClient({
|
|
|
380
386
|
"in the query option."
|
|
381
387
|
},
|
|
382
388
|
|
|
383
|
-
|
|
389
|
+
76: {
|
|
384
390
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
385
391
|
condition: "options.query.kind === \"Document\"",
|
|
386
392
|
message: 'You must wrap the query string in a "gql" tag.'
|
|
387
393
|
},
|
|
388
394
|
|
|
389
|
-
|
|
395
|
+
77: {
|
|
390
396
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
391
397
|
condition: "!options.returnPartialData",
|
|
392
398
|
message: "returnPartialData option only supported on watchQuery."
|
|
393
399
|
},
|
|
394
400
|
|
|
395
|
-
|
|
401
|
+
78: {
|
|
396
402
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
397
403
|
condition: "!options.pollInterval",
|
|
398
404
|
message: "pollInterval option only supported on watchQuery."
|
|
399
405
|
},
|
|
400
406
|
|
|
401
|
-
|
|
407
|
+
79: {
|
|
402
408
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
403
409
|
message: "Store reset while query was in flight (not completed in link chain)"
|
|
404
410
|
},
|
|
405
411
|
|
|
406
|
-
|
|
412
|
+
83: {
|
|
407
413
|
file: "@apollo/client/__cjs/cache/inmemory/entityStore.cjs",
|
|
408
414
|
condition: "typeof dataId === \"string\"",
|
|
409
415
|
message: "store.merge expects a string ID"
|
|
410
416
|
},
|
|
411
417
|
|
|
412
|
-
|
|
418
|
+
86: {
|
|
413
419
|
file: "@apollo/client/__cjs/cache/inmemory/key-extractor.cjs",
|
|
414
420
|
condition: "extracted !== void 0",
|
|
415
421
|
message: `Missing field '%s' while extracting keyFields from %s`
|
|
416
422
|
},
|
|
417
423
|
|
|
418
|
-
|
|
424
|
+
87: {
|
|
419
425
|
file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
|
|
420
426
|
condition: "!old || old === which",
|
|
421
427
|
message: `Cannot change root %s __typename more than once`
|
|
422
428
|
},
|
|
423
429
|
|
|
424
|
-
|
|
430
|
+
90: {
|
|
425
431
|
file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
|
|
426
432
|
message: "Cannot automatically merge arrays"
|
|
427
433
|
},
|
|
428
434
|
|
|
429
|
-
|
|
435
|
+
91: {
|
|
430
436
|
file: "@apollo/client/__cjs/cache/inmemory/readFromStore.cjs",
|
|
431
437
|
message: `No fragment named %s`
|
|
432
438
|
},
|
|
433
439
|
|
|
434
|
-
|
|
440
|
+
92: {
|
|
435
441
|
file: "@apollo/client/__cjs/cache/inmemory/readFromStore.cjs",
|
|
436
442
|
condition: "!(0, utilities_1.isReference)(value)",
|
|
437
443
|
message: `Missing selection set for object of type %s returned for query field %s`
|
|
438
444
|
},
|
|
439
445
|
|
|
440
|
-
|
|
446
|
+
93: {
|
|
441
447
|
file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
|
|
442
448
|
message: `Could not identify object %s`
|
|
443
449
|
},
|
|
444
450
|
|
|
445
|
-
|
|
451
|
+
95: {
|
|
446
452
|
file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
|
|
447
453
|
message: `No fragment named %s`
|
|
448
454
|
}
|
|
449
455
|
};
|
|
450
456
|
|
|
451
457
|
export const devDebug = {
|
|
452
|
-
|
|
458
|
+
64: {
|
|
453
459
|
file: "@apollo/client/__cjs/core/ApolloClient.cjs",
|
|
454
460
|
message: `In client.refetchQueries, Promise.all promise rejected with error %o`
|
|
455
461
|
},
|
|
456
462
|
|
|
457
|
-
|
|
463
|
+
71: {
|
|
458
464
|
file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
|
|
459
465
|
message: `Missing cache result fields: %o`
|
|
460
466
|
}
|
|
@@ -525,34 +531,34 @@ export const devWarn = {
|
|
|
525
531
|
message: "Multipart-subscriptions do not support @defer"
|
|
526
532
|
},
|
|
527
533
|
|
|
528
|
-
|
|
534
|
+
60: {
|
|
529
535
|
file: "@apollo/client/__cjs/link/core/ApolloLink.cjs",
|
|
530
536
|
message: `You are calling concat on a terminating link, which will have no effect %o`
|
|
531
537
|
},
|
|
532
538
|
|
|
533
|
-
|
|
539
|
+
67: {
|
|
534
540
|
file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
|
|
535
541
|
|
|
536
542
|
message: `Called refetch(%o) for query %o, which does not declare a $variables variable.
|
|
537
543
|
Did you mean to call refetch(variables) instead of refetch({ variables })?`
|
|
538
544
|
},
|
|
539
545
|
|
|
540
|
-
|
|
546
|
+
80: {
|
|
541
547
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
542
548
|
message: `Unknown query named "%s" requested in refetchQueries options.include array`
|
|
543
549
|
},
|
|
544
550
|
|
|
545
|
-
|
|
551
|
+
81: {
|
|
546
552
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
547
553
|
message: `Unknown anonymous query requested in refetchQueries options.include array`
|
|
548
554
|
},
|
|
549
555
|
|
|
550
|
-
|
|
556
|
+
82: {
|
|
551
557
|
file: "@apollo/client/__cjs/core/QueryManager.cjs",
|
|
552
558
|
message: '[%s]: Fragments masked by data masking are inaccessible when using fetch policy "no-cache". Please add `@unmask` to each fragment spread to access the data.'
|
|
553
559
|
},
|
|
554
560
|
|
|
555
|
-
|
|
561
|
+
84: {
|
|
556
562
|
file: "@apollo/client/__cjs/cache/inmemory/entityStore.cjs",
|
|
557
563
|
|
|
558
564
|
message: "cache.modify: You are trying to write a Reference that is not part of the store: %o\n" +
|
|
@@ -560,24 +566,24 @@ Did you mean to call refetch(variables) instead of refetch({ variables })?`
|
|
|
560
566
|
"`toReference(object, true)`"
|
|
561
567
|
},
|
|
562
568
|
|
|
563
|
-
|
|
569
|
+
85: {
|
|
564
570
|
file: "@apollo/client/__cjs/cache/inmemory/entityStore.cjs",
|
|
565
571
|
|
|
566
572
|
message: "cache.modify: Writing an array with a mix of both References and Objects will not result in the Objects being normalized correctly.\n" +
|
|
567
573
|
"Please convert the object instance %o to a Reference before writing it to the cache by calling `toReference(object, true)`."
|
|
568
574
|
},
|
|
569
575
|
|
|
570
|
-
|
|
576
|
+
88: {
|
|
571
577
|
file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
|
|
572
578
|
message: `Inferring subtype %s of supertype %s`
|
|
573
579
|
},
|
|
574
580
|
|
|
575
|
-
|
|
581
|
+
89: {
|
|
576
582
|
file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
|
|
577
583
|
message: `Undefined 'from' passed to readField with arguments %s`
|
|
578
584
|
},
|
|
579
585
|
|
|
580
|
-
|
|
586
|
+
96: {
|
|
581
587
|
file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
|
|
582
588
|
|
|
583
589
|
message: `Cache data may be lost when replacing the %s field of a %s object.
|
|
@@ -596,7 +602,7 @@ For more information about these options, please refer to the documentation:
|
|
|
596
602
|
`
|
|
597
603
|
},
|
|
598
604
|
|
|
599
|
-
|
|
605
|
+
97: {
|
|
600
606
|
file: "@apollo/client/__cjs/cache/core/cache.cjs",
|
|
601
607
|
message: "Could not identify object passed to `from` for '%s' fragment, either because the object is non-normalized or the key fields are missing. If you are masking this object, please ensure the key fields are requested by the parent object."
|
|
602
608
|
}
|
|
@@ -613,12 +619,12 @@ export const devError = {
|
|
|
613
619
|
message: "The result of getSnapshot should be cached to avoid an infinite loop"
|
|
614
620
|
},
|
|
615
621
|
|
|
616
|
-
|
|
622
|
+
69: {
|
|
617
623
|
file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
|
|
618
624
|
message: "Unhandled GraphQL subscription error"
|
|
619
625
|
},
|
|
620
626
|
|
|
621
|
-
|
|
627
|
+
94: {
|
|
622
628
|
file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
|
|
623
629
|
message: `Missing field '%s' while writing result %o`
|
|
624
630
|
}
|