@apollo/client 3.8.0-beta.6 → 3.8.0-beta.7
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/apollo-client.cjs +201 -189
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/cache/cache.cjs +12 -12
- package/cache/cache.cjs.map +1 -1
- package/cache/cache.cjs.native.js +12 -12
- package/cache/core/cache.d.ts +3 -3
- package/cache/core/cache.d.ts.map +1 -1
- package/cache/core/cache.js +1 -1
- package/cache/core/cache.js.map +1 -1
- package/cache/core/types/Cache.d.ts +3 -3
- package/cache/core/types/Cache.d.ts.map +1 -1
- package/cache/core/types/Cache.js.map +1 -1
- package/cache/core/types/DataProxy.d.ts +2 -2
- package/cache/core/types/DataProxy.d.ts.map +1 -1
- package/cache/core/types/DataProxy.js.map +1 -1
- package/cache/core/types/common.d.ts +2 -2
- package/cache/core/types/common.d.ts.map +1 -1
- package/cache/core/types/common.js.map +1 -1
- package/cache/index.d.ts +14 -14
- package/cache/index.d.ts.map +1 -1
- package/cache/index.js +13 -13
- package/cache/index.js.map +1 -1
- package/cache/inmemory/entityStore.d.ts +5 -5
- package/cache/inmemory/entityStore.d.ts.map +1 -1
- package/cache/inmemory/entityStore.js +3 -3
- package/cache/inmemory/entityStore.js.map +1 -1
- package/cache/inmemory/fragmentRegistry.js.map +1 -1
- package/cache/inmemory/helpers.d.ts +5 -5
- package/cache/inmemory/helpers.d.ts.map +1 -1
- package/cache/inmemory/helpers.js +1 -1
- package/cache/inmemory/helpers.js.map +1 -1
- package/cache/inmemory/inMemoryCache.d.ts +8 -8
- package/cache/inmemory/inMemoryCache.d.ts.map +1 -1
- package/cache/inmemory/inMemoryCache.js +13 -13
- package/cache/inmemory/inMemoryCache.js.map +1 -1
- package/cache/inmemory/key-extractor.d.ts +1 -1
- package/cache/inmemory/key-extractor.d.ts.map +1 -1
- package/cache/inmemory/key-extractor.js.map +1 -1
- package/cache/inmemory/object-canon.d.ts.map +1 -1
- package/cache/inmemory/object-canon.js +2 -3
- package/cache/inmemory/object-canon.js.map +1 -1
- package/cache/inmemory/policies.d.ts +6 -6
- package/cache/inmemory/policies.d.ts.map +1 -1
- package/cache/inmemory/policies.js +9 -9
- package/cache/inmemory/policies.js.map +1 -1
- package/cache/inmemory/reactiveVars.d.ts +1 -1
- package/cache/inmemory/reactiveVars.d.ts.map +1 -1
- package/cache/inmemory/reactiveVars.js.map +1 -1
- package/cache/inmemory/readFromStore.d.ts +6 -6
- package/cache/inmemory/readFromStore.d.ts.map +1 -1
- package/cache/inmemory/readFromStore.js +7 -7
- package/cache/inmemory/readFromStore.js.map +1 -1
- package/cache/inmemory/types.d.ts +6 -6
- package/cache/inmemory/types.d.ts.map +1 -1
- package/cache/inmemory/types.js.map +1 -1
- package/cache/inmemory/writeToStore.d.ts +6 -6
- package/cache/inmemory/writeToStore.d.ts.map +1 -1
- package/cache/inmemory/writeToStore.js +10 -10
- package/cache/inmemory/writeToStore.js.map +1 -1
- package/config/jest/setup.d.ts +1 -1
- package/config/jest/setup.d.ts.map +1 -1
- package/config/jest/setup.js +2 -2
- package/config/jest/setup.js.map +1 -1
- package/core/ApolloClient.d.ts +10 -10
- package/core/ApolloClient.d.ts.map +1 -1
- package/core/ApolloClient.js +10 -10
- package/core/ApolloClient.js.map +1 -1
- package/core/LocalState.d.ts +5 -5
- package/core/LocalState.d.ts.map +1 -1
- package/core/LocalState.js +3 -3
- package/core/LocalState.js.map +1 -1
- package/core/ObservableQuery.d.ts +10 -10
- package/core/ObservableQuery.d.ts.map +1 -1
- package/core/ObservableQuery.js +11 -11
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryInfo.d.ts +9 -9
- package/core/QueryInfo.d.ts.map +1 -1
- package/core/QueryInfo.js +4 -4
- package/core/QueryInfo.js.map +1 -1
- package/core/QueryManager.d.ts +10 -10
- package/core/QueryManager.d.ts.map +1 -1
- package/core/QueryManager.js +17 -17
- package/core/QueryManager.js.map +1 -1
- package/core/core.cjs +25 -24
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +25 -24
- package/core/equalByQuery.d.ts +2 -2
- package/core/equalByQuery.d.ts.map +1 -1
- package/core/equalByQuery.js +9 -8
- package/core/equalByQuery.js.map +1 -1
- package/core/index.d.ts +13 -13
- package/core/index.d.ts.map +1 -1
- package/core/index.js +12 -13
- package/core/index.js.map +1 -1
- package/core/types.d.ts +10 -10
- package/core/types.d.ts.map +1 -1
- package/core/types.js.map +1 -1
- package/core/watchQueryOptions.d.ts +4 -4
- package/core/watchQueryOptions.d.ts.map +1 -1
- package/core/watchQueryOptions.js.map +1 -1
- package/dev/dev.cjs +2 -3
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +2 -3
- package/dev/index.d.ts +3 -3
- package/dev/index.d.ts.map +1 -1
- package/dev/index.js +3 -3
- package/dev/index.js.map +1 -1
- package/dev/loadDevMessages.js +2 -2
- package/dev/loadDevMessages.js.map +1 -1
- package/dev/loadErrorMessageHandler.d.ts +1 -1
- package/dev/loadErrorMessageHandler.d.ts.map +1 -1
- package/dev/loadErrorMessageHandler.js +2 -2
- package/dev/loadErrorMessageHandler.js.map +1 -1
- package/dev/loadErrorMessages.js +2 -2
- package/dev/loadErrorMessages.js.map +1 -1
- package/errors/errors.cjs.map +1 -1
- package/errors/index.d.ts +4 -4
- package/errors/index.d.ts.map +1 -1
- package/errors/index.js +2 -2
- package/errors/index.js.map +1 -1
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js +2 -2
- package/index.js.map +1 -1
- package/link/batch/batch.cjs.map +1 -1
- package/link/batch/batchLink.d.ts +5 -5
- package/link/batch/batchLink.d.ts.map +1 -1
- package/link/batch/batchLink.js +3 -3
- package/link/batch/batchLink.js.map +1 -1
- package/link/batch/batching.d.ts +2 -2
- package/link/batch/batching.d.ts.map +1 -1
- package/link/batch/batching.js +1 -1
- package/link/batch/batching.js.map +1 -1
- package/link/batch/index.d.ts +1 -1
- package/link/batch/index.d.ts.map +1 -1
- package/link/batch/index.js +1 -1
- package/link/batch/index.js.map +1 -1
- package/link/batch-http/batch-http.cjs.map +1 -1
- package/link/batch-http/batchHttpLink.d.ts +5 -5
- package/link/batch-http/batchHttpLink.d.ts.map +1 -1
- package/link/batch-http/batchHttpLink.js +5 -5
- package/link/batch-http/batchHttpLink.js.map +1 -1
- package/link/batch-http/index.d.ts +1 -1
- package/link/batch-http/index.d.ts.map +1 -1
- package/link/batch-http/index.js +1 -1
- package/link/batch-http/index.js.map +1 -1
- package/link/context/context.cjs.map +1 -1
- package/link/context/index.d.ts +3 -3
- package/link/context/index.d.ts.map +1 -1
- package/link/context/index.js +2 -2
- package/link/context/index.js.map +1 -1
- package/link/core/ApolloLink.d.ts +3 -3
- package/link/core/ApolloLink.d.ts.map +1 -1
- package/link/core/ApolloLink.js +4 -4
- package/link/core/ApolloLink.js.map +1 -1
- package/link/core/concat.d.ts +1 -1
- package/link/core/concat.d.ts.map +1 -1
- package/link/core/concat.js +1 -1
- package/link/core/concat.js.map +1 -1
- package/link/core/core.cjs +1 -1
- package/link/core/core.cjs.map +1 -1
- package/link/core/core.cjs.native.js +1 -1
- package/link/core/empty.d.ts +1 -1
- package/link/core/empty.d.ts.map +1 -1
- package/link/core/empty.js +1 -1
- package/link/core/empty.js.map +1 -1
- package/link/core/execute.d.ts +1 -1
- package/link/core/execute.d.ts.map +1 -1
- package/link/core/execute.js +1 -1
- package/link/core/execute.js.map +1 -1
- package/link/core/from.d.ts +1 -1
- package/link/core/from.d.ts.map +1 -1
- package/link/core/from.js +1 -1
- package/link/core/from.js.map +1 -1
- package/link/core/index.d.ts +8 -8
- package/link/core/index.d.ts.map +1 -1
- package/link/core/index.js +8 -8
- package/link/core/index.js.map +1 -1
- package/link/core/split.d.ts +1 -1
- package/link/core/split.d.ts.map +1 -1
- package/link/core/split.js +1 -1
- package/link/core/split.js.map +1 -1
- package/link/core/types.d.ts +2 -2
- package/link/core/types.d.ts.map +1 -1
- package/link/core/types.js.map +1 -1
- package/link/error/error.cjs.map +1 -1
- package/link/error/index.d.ts +4 -4
- package/link/error/index.d.ts.map +1 -1
- package/link/error/index.js +2 -2
- package/link/error/index.js.map +1 -1
- package/link/http/HttpLink.d.ts +3 -3
- package/link/http/HttpLink.d.ts.map +1 -1
- package/link/http/HttpLink.js +2 -2
- package/link/http/HttpLink.js.map +1 -1
- package/link/http/checkFetcher.js +1 -1
- package/link/http/checkFetcher.js.map +1 -1
- package/link/http/createHttpLink.d.ts +2 -2
- package/link/http/createHttpLink.d.ts.map +1 -1
- package/link/http/createHttpLink.js +14 -14
- package/link/http/createHttpLink.js.map +1 -1
- package/link/http/http.cjs +2 -2
- package/link/http/http.cjs.map +1 -1
- package/link/http/http.cjs.native.js +2 -2
- package/link/http/index.d.ts +10 -10
- package/link/http/index.d.ts.map +1 -1
- package/link/http/index.js +10 -10
- package/link/http/index.js.map +1 -1
- package/link/http/iterators/nodeStream.js.map +1 -1
- package/link/http/iterators/promise.js.map +1 -1
- package/link/http/iterators/reader.js.map +1 -1
- package/link/http/parseAndCheckHttpResponse.d.ts +2 -2
- package/link/http/parseAndCheckHttpResponse.d.ts.map +1 -1
- package/link/http/parseAndCheckHttpResponse.js +2 -2
- package/link/http/parseAndCheckHttpResponse.js.map +1 -1
- package/link/http/responseIterator.js.map +1 -1
- package/link/http/rewriteURIForGET.d.ts +1 -1
- package/link/http/rewriteURIForGET.d.ts.map +1 -1
- package/link/http/rewriteURIForGET.js +1 -1
- package/link/http/rewriteURIForGET.js.map +1 -1
- package/link/http/selectHttpOptionsAndBody.d.ts +2 -2
- package/link/http/selectHttpOptionsAndBody.d.ts.map +1 -1
- package/link/http/selectHttpOptionsAndBody.js +1 -1
- package/link/http/selectHttpOptionsAndBody.js.map +1 -1
- package/link/http/selectURI.d.ts +1 -1
- package/link/http/selectURI.d.ts.map +1 -1
- package/link/http/selectURI.js.map +1 -1
- package/link/http/serializeFetchParameter.d.ts +1 -1
- package/link/http/serializeFetchParameter.d.ts.map +1 -1
- package/link/http/serializeFetchParameter.js +1 -1
- package/link/http/serializeFetchParameter.js.map +1 -1
- package/link/persisted-queries/index.d.ts +3 -3
- package/link/persisted-queries/index.d.ts.map +1 -1
- package/link/persisted-queries/index.js +4 -4
- package/link/persisted-queries/index.js.map +1 -1
- package/link/persisted-queries/persisted-queries.cjs.map +1 -1
- package/link/remove-typename/index.d.ts +1 -1
- package/link/remove-typename/index.d.ts.map +1 -1
- package/link/remove-typename/index.js +1 -1
- package/link/remove-typename/index.js.map +1 -1
- package/link/remove-typename/remove-typename.cjs.map +1 -1
- package/link/remove-typename/removeTypenameFromVariables.d.ts +1 -1
- package/link/remove-typename/removeTypenameFromVariables.d.ts.map +1 -1
- package/link/remove-typename/removeTypenameFromVariables.js +2 -2
- package/link/remove-typename/removeTypenameFromVariables.js.map +1 -1
- package/link/retry/delayFunction.d.ts +1 -1
- package/link/retry/delayFunction.d.ts.map +1 -1
- package/link/retry/delayFunction.js.map +1 -1
- package/link/retry/index.d.ts +1 -1
- package/link/retry/index.d.ts.map +1 -1
- package/link/retry/index.js +1 -1
- package/link/retry/index.js.map +1 -1
- package/link/retry/retry.cjs.map +1 -1
- package/link/retry/retryFunction.d.ts +1 -1
- package/link/retry/retryFunction.d.ts.map +1 -1
- package/link/retry/retryFunction.js.map +1 -1
- package/link/retry/retryLink.d.ts +5 -5
- package/link/retry/retryLink.d.ts.map +1 -1
- package/link/retry/retryLink.js +4 -4
- package/link/retry/retryLink.js.map +1 -1
- package/link/schema/index.d.ts +3 -3
- package/link/schema/index.d.ts.map +1 -1
- package/link/schema/index.js +2 -2
- package/link/schema/index.js.map +1 -1
- package/link/schema/schema.cjs.map +1 -1
- package/link/subscriptions/index.d.ts +3 -3
- package/link/subscriptions/index.d.ts.map +1 -1
- package/link/subscriptions/index.js +1 -1
- package/link/subscriptions/index.js.map +1 -1
- package/link/subscriptions/subscriptions.cjs.map +1 -1
- package/link/utils/createOperation.d.ts +1 -1
- package/link/utils/createOperation.d.ts.map +1 -1
- package/link/utils/createOperation.js.map +1 -1
- package/link/utils/fromError.d.ts +1 -1
- package/link/utils/fromError.d.ts.map +1 -1
- package/link/utils/fromError.js +1 -1
- package/link/utils/fromError.js.map +1 -1
- package/link/utils/fromPromise.d.ts +1 -1
- package/link/utils/fromPromise.d.ts.map +1 -1
- package/link/utils/fromPromise.js +1 -1
- package/link/utils/fromPromise.js.map +1 -1
- package/link/utils/index.d.ts +9 -9
- package/link/utils/index.d.ts.map +1 -1
- package/link/utils/index.js +9 -9
- package/link/utils/index.js.map +1 -1
- package/link/utils/toPromise.d.ts +1 -1
- package/link/utils/toPromise.d.ts.map +1 -1
- package/link/utils/toPromise.js +2 -2
- package/link/utils/toPromise.js.map +1 -1
- package/link/utils/transformOperation.d.ts +1 -1
- package/link/utils/transformOperation.d.ts.map +1 -1
- package/link/utils/transformOperation.js +1 -1
- package/link/utils/transformOperation.js.map +1 -1
- package/link/utils/utils.cjs +1 -1
- package/link/utils/utils.cjs.map +1 -1
- package/link/utils/utils.cjs.native.js +1 -1
- package/link/utils/validateOperation.d.ts +1 -1
- package/link/utils/validateOperation.d.ts.map +1 -1
- package/link/utils/validateOperation.js +1 -1
- package/link/utils/validateOperation.js.map +1 -1
- package/link/ws/index.d.ts +3 -3
- package/link/ws/index.d.ts.map +1 -1
- package/link/ws/index.js +1 -1
- package/link/ws/index.js.map +1 -1
- package/link/ws/ws.cjs.map +1 -1
- package/package.json +14 -10
- package/react/cache/QueryReference.d.ts +7 -6
- package/react/cache/QueryReference.d.ts.map +1 -1
- package/react/cache/QueryReference.js +84 -53
- package/react/cache/QueryReference.js.map +1 -1
- package/react/cache/SuspenseCache.d.ts +3 -3
- package/react/cache/SuspenseCache.d.ts.map +1 -1
- package/react/cache/SuspenseCache.js +2 -2
- package/react/cache/SuspenseCache.js.map +1 -1
- package/react/cache/index.d.ts +1 -1
- package/react/cache/index.d.ts.map +1 -1
- package/react/cache/index.js +1 -1
- package/react/cache/index.js.map +1 -1
- package/react/components/Mutation.d.ts +3 -3
- package/react/components/Mutation.d.ts.map +1 -1
- package/react/components/Mutation.js +1 -1
- package/react/components/Mutation.js.map +1 -1
- package/react/components/Query.d.ts +2 -2
- package/react/components/Query.d.ts.map +1 -1
- package/react/components/Query.js +1 -1
- package/react/components/Query.js.map +1 -1
- package/react/components/Subscription.d.ts +2 -2
- package/react/components/Subscription.d.ts.map +1 -1
- package/react/components/Subscription.js +1 -1
- package/react/components/Subscription.js.map +1 -1
- package/react/components/components.cjs.map +1 -1
- package/react/components/index.d.ts +4 -4
- package/react/components/index.d.ts.map +1 -1
- package/react/components/index.js +4 -4
- package/react/components/index.js.map +1 -1
- package/react/components/types.d.ts +2 -2
- package/react/components/types.d.ts.map +1 -1
- package/react/components/types.js.map +1 -1
- package/react/context/ApolloConsumer.d.ts +1 -1
- package/react/context/ApolloConsumer.d.ts.map +1 -1
- package/react/context/ApolloConsumer.js +2 -2
- package/react/context/ApolloConsumer.js.map +1 -1
- package/react/context/ApolloContext.d.ts +4 -5
- package/react/context/ApolloContext.d.ts.map +1 -1
- package/react/context/ApolloContext.js +11 -4
- package/react/context/ApolloContext.js.map +1 -1
- package/react/context/ApolloProvider.d.ts +2 -2
- package/react/context/ApolloProvider.d.ts.map +1 -1
- package/react/context/ApolloProvider.js +2 -2
- package/react/context/ApolloProvider.js.map +1 -1
- package/react/context/context.cjs +9 -2
- package/react/context/context.cjs.map +1 -1
- package/react/context/context.cjs.native.js +9 -2
- package/react/context/index.d.ts +4 -4
- package/react/context/index.d.ts.map +1 -1
- package/react/context/index.js +4 -4
- package/react/context/index.js.map +1 -1
- package/react/hoc/graphql.d.ts +2 -2
- package/react/hoc/graphql.d.ts.map +1 -1
- package/react/hoc/graphql.js +4 -4
- package/react/hoc/graphql.js.map +1 -1
- package/react/hoc/hoc-utils.d.ts +2 -2
- package/react/hoc/hoc-utils.d.ts.map +1 -1
- package/react/hoc/hoc-utils.js +1 -1
- package/react/hoc/hoc-utils.js.map +1 -1
- package/react/hoc/hoc.cjs.map +1 -1
- package/react/hoc/index.d.ts +7 -7
- package/react/hoc/index.d.ts.map +1 -1
- package/react/hoc/index.js +7 -7
- package/react/hoc/index.js.map +1 -1
- package/react/hoc/mutation-hoc.d.ts +3 -3
- package/react/hoc/mutation-hoc.d.ts.map +1 -1
- package/react/hoc/mutation-hoc.js +3 -3
- package/react/hoc/mutation-hoc.js.map +1 -1
- package/react/hoc/query-hoc.d.ts +1 -1
- package/react/hoc/query-hoc.d.ts.map +1 -1
- package/react/hoc/query-hoc.js +3 -3
- package/react/hoc/query-hoc.js.map +1 -1
- package/react/hoc/subscription-hoc.d.ts +1 -1
- package/react/hoc/subscription-hoc.d.ts.map +1 -1
- package/react/hoc/subscription-hoc.js +3 -3
- package/react/hoc/subscription-hoc.js.map +1 -1
- package/react/hoc/types.d.ts +4 -4
- package/react/hoc/types.d.ts.map +1 -1
- package/react/hoc/types.js.map +1 -1
- package/react/hoc/withApollo.d.ts +1 -1
- package/react/hoc/withApollo.d.ts.map +1 -1
- package/react/hoc/withApollo.js +2 -2
- package/react/hoc/withApollo.js.map +1 -1
- package/react/hooks/hooks.cjs +146 -129
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/hooks.cjs.native.js +146 -129
- package/react/hooks/index.d.ts +11 -11
- package/react/hooks/index.d.ts.map +1 -1
- package/react/hooks/index.js +11 -11
- package/react/hooks/index.js.map +1 -1
- package/react/hooks/internal/__use.js +2 -2
- package/react/hooks/internal/__use.js.map +1 -1
- package/react/hooks/internal/index.d.ts +3 -4
- package/react/hooks/internal/index.d.ts.map +1 -1
- package/react/hooks/internal/index.js +3 -4
- package/react/hooks/internal/index.js.map +1 -1
- package/react/hooks/internal/useDeepMemo.js +2 -2
- package/react/hooks/internal/useDeepMemo.js.map +1 -1
- package/react/hooks/internal/useIsomorphicLayoutEffect.d.ts +2 -2
- package/react/hooks/internal/useIsomorphicLayoutEffect.d.ts.map +1 -1
- package/react/hooks/internal/useIsomorphicLayoutEffect.js +4 -4
- package/react/hooks/internal/useIsomorphicLayoutEffect.js.map +1 -1
- package/react/hooks/useApolloClient.d.ts +1 -1
- package/react/hooks/useApolloClient.d.ts.map +1 -1
- package/react/hooks/useApolloClient.js +4 -4
- package/react/hooks/useApolloClient.js.map +1 -1
- package/react/hooks/useBackgroundQuery.d.ts +5 -5
- package/react/hooks/useBackgroundQuery.d.ts.map +1 -1
- package/react/hooks/useBackgroundQuery.js +13 -13
- package/react/hooks/useBackgroundQuery.js.map +1 -1
- package/react/hooks/useFragment.d.ts +4 -4
- package/react/hooks/useFragment.d.ts.map +1 -1
- package/react/hooks/useFragment.js +2 -2
- package/react/hooks/useFragment.js.map +1 -1
- package/react/hooks/useLazyQuery.d.ts +2 -2
- package/react/hooks/useLazyQuery.d.ts.map +1 -1
- package/react/hooks/useLazyQuery.js +9 -9
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/react/hooks/useMutation.d.ts +2 -2
- package/react/hooks/useMutation.d.ts.map +1 -1
- package/react/hooks/useMutation.js +10 -10
- package/react/hooks/useMutation.js.map +1 -1
- package/react/hooks/useQuery.d.ts +4 -4
- package/react/hooks/useQuery.d.ts.map +1 -1
- package/react/hooks/useQuery.js +17 -17
- package/react/hooks/useQuery.js.map +1 -1
- package/react/hooks/useReactiveVar.d.ts +1 -1
- package/react/hooks/useReactiveVar.d.ts.map +1 -1
- package/react/hooks/useReactiveVar.js +3 -3
- package/react/hooks/useReactiveVar.js.map +1 -1
- package/react/hooks/useReadQuery.d.ts +3 -3
- package/react/hooks/useReadQuery.d.ts.map +1 -1
- package/react/hooks/useReadQuery.js +5 -5
- package/react/hooks/useReadQuery.js.map +1 -1
- package/react/hooks/useSubscription.d.ts +2 -2
- package/react/hooks/useSubscription.d.ts.map +1 -1
- package/react/hooks/useSubscription.js +14 -14
- package/react/hooks/useSubscription.js.map +1 -1
- package/react/hooks/useSuspenseCache.d.ts +1 -1
- package/react/hooks/useSuspenseCache.d.ts.map +1 -1
- package/react/hooks/useSuspenseCache.js +4 -4
- package/react/hooks/useSuspenseCache.js.map +1 -1
- package/react/hooks/useSuspenseQuery.d.ts +4 -6
- package/react/hooks/useSuspenseQuery.d.ts.map +1 -1
- package/react/hooks/useSuspenseQuery.js +26 -29
- package/react/hooks/useSuspenseQuery.js.map +1 -1
- package/react/hooks/useSyncExternalStore.js +4 -4
- package/react/hooks/useSyncExternalStore.js.map +1 -1
- package/react/index.d.ts +6 -6
- package/react/index.d.ts.map +1 -1
- package/react/index.js +6 -6
- package/react/index.js.map +1 -1
- package/react/parser/index.js +1 -1
- package/react/parser/index.js.map +1 -1
- package/react/parser/parser.cjs.map +1 -1
- package/react/react.cjs +82 -51
- package/react/react.cjs.map +1 -1
- package/react/react.cjs.native.js +82 -51
- package/react/ssr/RenderPromises.d.ts +2 -2
- package/react/ssr/RenderPromises.d.ts.map +1 -1
- package/react/ssr/RenderPromises.js.map +1 -1
- package/react/ssr/getDataFromTree.js +2 -2
- package/react/ssr/getDataFromTree.js.map +1 -1
- package/react/ssr/index.d.ts +3 -3
- package/react/ssr/index.d.ts.map +1 -1
- package/react/ssr/index.js +3 -3
- package/react/ssr/index.js.map +1 -1
- package/react/ssr/renderToStringWithData.js +1 -1
- package/react/ssr/renderToStringWithData.js.map +1 -1
- package/react/ssr/ssr.cjs.map +1 -1
- package/react/types/types.d.ts +7 -7
- package/react/types/types.d.ts.map +1 -1
- package/react/types/types.js.map +1 -1
- package/testing/core/core.cjs.map +1 -1
- package/testing/core/index.d.ts +7 -7
- package/testing/core/index.d.ts.map +1 -1
- package/testing/core/index.js +7 -7
- package/testing/core/index.js.map +1 -1
- package/testing/core/mocking/mockClient.d.ts +2 -2
- package/testing/core/mocking/mockClient.d.ts.map +1 -1
- package/testing/core/mocking/mockClient.js +3 -3
- package/testing/core/mocking/mockClient.js.map +1 -1
- package/testing/core/mocking/mockLink.d.ts +3 -3
- package/testing/core/mocking/mockLink.d.ts.map +1 -1
- package/testing/core/mocking/mockLink.js +3 -3
- package/testing/core/mocking/mockLink.js.map +1 -1
- package/testing/core/mocking/mockQueryManager.d.ts +3 -3
- package/testing/core/mocking/mockQueryManager.d.ts.map +1 -1
- package/testing/core/mocking/mockQueryManager.js +3 -3
- package/testing/core/mocking/mockQueryManager.js.map +1 -1
- package/testing/core/mocking/mockSubscriptionLink.d.ts +3 -3
- package/testing/core/mocking/mockSubscriptionLink.d.ts.map +1 -1
- package/testing/core/mocking/mockSubscriptionLink.js +2 -2
- package/testing/core/mocking/mockSubscriptionLink.js.map +1 -1
- package/testing/core/mocking/mockWatchQuery.d.ts +2 -2
- package/testing/core/mocking/mockWatchQuery.d.ts.map +1 -1
- package/testing/core/mocking/mockWatchQuery.js +1 -1
- package/testing/core/mocking/mockWatchQuery.js.map +1 -1
- package/testing/core/observableToPromise.d.ts +2 -2
- package/testing/core/observableToPromise.d.ts.map +1 -1
- package/testing/core/observableToPromise.js.map +1 -1
- package/testing/core/subscribeAndCount.d.ts +1 -1
- package/testing/core/subscribeAndCount.d.ts.map +1 -1
- package/testing/core/subscribeAndCount.js +1 -1
- package/testing/core/subscribeAndCount.js.map +1 -1
- package/testing/index.d.ts +3 -3
- package/testing/index.d.ts.map +1 -1
- package/testing/index.js +3 -3
- package/testing/index.js.map +1 -1
- package/testing/matchers/index.js +2 -2
- package/testing/matchers/index.js.map +1 -1
- package/testing/matchers/toHaveSuspenseCacheEntryUsing.d.ts +1 -1
- package/testing/matchers/toHaveSuspenseCacheEntryUsing.d.ts.map +1 -1
- package/testing/matchers/toHaveSuspenseCacheEntryUsing.js +2 -2
- package/testing/matchers/toHaveSuspenseCacheEntryUsing.js.map +1 -1
- package/testing/matchers/toMatchDocument.d.ts +1 -1
- package/testing/matchers/toMatchDocument.d.ts.map +1 -1
- package/testing/matchers/toMatchDocument.js +1 -1
- package/testing/matchers/toMatchDocument.js.map +1 -1
- package/testing/react/MockedProvider.d.ts +7 -7
- package/testing/react/MockedProvider.d.ts.map +1 -1
- package/testing/react/MockedProvider.js +5 -5
- package/testing/react/MockedProvider.js.map +1 -1
- package/testing/testing.cjs.map +1 -1
- package/utilities/common/canUse.js.map +1 -1
- package/utilities/common/compact.d.ts +1 -1
- package/utilities/common/compact.d.ts.map +1 -1
- package/utilities/common/compact.js.map +1 -1
- package/utilities/common/errorHandling.d.ts +1 -1
- package/utilities/common/errorHandling.d.ts.map +1 -1
- package/utilities/common/errorHandling.js.map +1 -1
- package/utilities/common/incrementalResult.d.ts +1 -1
- package/utilities/common/incrementalResult.d.ts.map +1 -1
- package/utilities/common/incrementalResult.js.map +1 -1
- package/utilities/common/maybeDeepFreeze.d.ts.map +1 -1
- package/utilities/common/maybeDeepFreeze.js +3 -4
- package/utilities/common/maybeDeepFreeze.js.map +1 -1
- package/utilities/common/mergeDeep.d.ts +1 -1
- package/utilities/common/mergeDeep.d.ts.map +1 -1
- package/utilities/common/mergeDeep.js.map +1 -1
- package/utilities/common/mergeOptions.d.ts +1 -1
- package/utilities/common/mergeOptions.d.ts.map +1 -1
- package/utilities/common/mergeOptions.js.map +1 -1
- package/utilities/common/omitDeep.d.ts +1 -1
- package/utilities/common/omitDeep.d.ts.map +1 -1
- package/utilities/common/omitDeep.js +1 -1
- package/utilities/common/omitDeep.js.map +1 -1
- package/utilities/common/responseIterator.js.map +1 -1
- package/utilities/common/stringifyForDisplay.js.map +1 -1
- package/utilities/common/stripTypename.d.ts +1 -1
- package/utilities/common/stripTypename.d.ts.map +1 -1
- package/utilities/common/stripTypename.js +1 -1
- package/utilities/common/stripTypename.js.map +1 -1
- package/utilities/globals/global.d.ts.map +1 -1
- package/utilities/globals/global.js.map +1 -1
- package/utilities/globals/globals.cjs +4 -16
- package/utilities/globals/globals.cjs.map +1 -1
- package/utilities/globals/globals.cjs.native.js +4 -16
- package/utilities/globals/index.d.ts +5 -6
- package/utilities/globals/index.d.ts.map +1 -1
- package/utilities/globals/index.js +2 -5
- package/utilities/globals/index.js.map +1 -1
- package/utilities/globals/invariantWrappers.d.ts +1 -1
- package/utilities/globals/invariantWrappers.d.ts.map +1 -1
- package/utilities/globals/invariantWrappers.js +3 -3
- package/utilities/globals/invariantWrappers.js.map +1 -1
- package/utilities/graphql/DocumentTransform.js +3 -3
- package/utilities/graphql/DocumentTransform.js.map +1 -1
- package/utilities/graphql/directives.js +1 -1
- package/utilities/graphql/directives.js.map +1 -1
- package/utilities/graphql/fragments.js +1 -1
- package/utilities/graphql/fragments.js.map +1 -1
- package/utilities/graphql/getFromAST.js +2 -2
- package/utilities/graphql/getFromAST.js.map +1 -1
- package/utilities/graphql/operations.d.ts +1 -1
- package/utilities/graphql/operations.d.ts.map +1 -1
- package/utilities/graphql/operations.js +1 -1
- package/utilities/graphql/operations.js.map +1 -1
- package/utilities/graphql/print.js +1 -1
- package/utilities/graphql/print.js.map +1 -1
- package/utilities/graphql/storeUtils.d.ts +1 -1
- package/utilities/graphql/storeUtils.d.ts.map +1 -1
- package/utilities/graphql/storeUtils.js +3 -3
- package/utilities/graphql/storeUtils.js.map +1 -1
- package/utilities/graphql/transform.js +7 -7
- package/utilities/graphql/transform.js.map +1 -1
- package/utilities/index.d.ts +34 -34
- package/utilities/index.d.ts.map +1 -1
- package/utilities/index.js +32 -32
- package/utilities/index.js.map +1 -1
- package/utilities/observables/Concast.d.ts +2 -2
- package/utilities/observables/Concast.d.ts.map +1 -1
- package/utilities/observables/Concast.js.map +1 -1
- package/utilities/observables/asyncMap.d.ts +1 -1
- package/utilities/observables/asyncMap.d.ts.map +1 -1
- package/utilities/observables/asyncMap.js.map +1 -1
- package/utilities/observables/iteration.d.ts +1 -1
- package/utilities/observables/iteration.d.ts.map +1 -1
- package/utilities/observables/iteration.js.map +1 -1
- package/utilities/observables/subclassing.d.ts +1 -1
- package/utilities/observables/subclassing.d.ts.map +1 -1
- package/utilities/observables/subclassing.js.map +1 -1
- package/utilities/policies/pagination.d.ts +1 -1
- package/utilities/policies/pagination.d.ts.map +1 -1
- package/utilities/policies/pagination.js +1 -1
- package/utilities/policies/pagination.js.map +1 -1
- package/utilities/types/DeepOmit.d.ts +1 -1
- package/utilities/types/DeepOmit.d.ts.map +1 -1
- package/utilities/types/DeepOmit.js.map +1 -1
- package/utilities/types/DeepPartial.d.ts +1 -1
- package/utilities/types/DeepPartial.d.ts.map +1 -1
- package/utilities/types/DeepPartial.js.map +1 -1
- package/utilities/utilities.cjs +4 -4
- package/utilities/utilities.cjs.map +1 -1
- package/utilities/utilities.cjs.native.js +4 -4
- package/version.js +1 -1
- package/react/hooks/internal/useStrictModeSafeCleanupEffect.d.ts +0 -2
- package/react/hooks/internal/useStrictModeSafeCleanupEffect.d.ts.map +0 -1
- package/react/hooks/internal/useStrictModeSafeCleanupEffect.js +0 -11
- package/react/hooks/internal/useStrictModeSafeCleanupEffect.js.map +0 -1
- package/utilities/globals/DEV.d.ts +0 -3
- package/utilities/globals/DEV.d.ts.map +0 -1
- package/utilities/globals/DEV.js +0 -4
- package/utilities/globals/DEV.js.map +0 -1
- package/utilities/globals/fix-graphql.d.ts +0 -2
- package/utilities/globals/fix-graphql.d.ts.map +0 -1
- package/utilities/globals/fix-graphql.js +0 -6
- package/utilities/globals/fix-graphql.js.map +0 -1
|
@@ -29,11 +29,10 @@ function _interopNamespace(e) {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
32
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
33
32
|
var invariant__default = /*#__PURE__*/_interopDefaultLegacy(invariant);
|
|
34
33
|
|
|
35
34
|
function useApolloClient(override) {
|
|
36
|
-
var context$1 =
|
|
35
|
+
var context$1 = React__namespace.useContext(context.getApolloContext());
|
|
37
36
|
var client = override || context$1.client;
|
|
38
37
|
globals.invariant(!!client, 47);
|
|
39
38
|
return client;
|
|
@@ -44,11 +43,11 @@ var uSESKey = "useSyncExternalStore";
|
|
|
44
43
|
var realHook$1 = React__namespace[uSESKey];
|
|
45
44
|
var useSyncExternalStore = realHook$1 || (function (subscribe, getSnapshot, getServerSnapshot) {
|
|
46
45
|
var value = getSnapshot();
|
|
47
|
-
if (
|
|
46
|
+
if (globalThis.__DEV__ !== false &&
|
|
48
47
|
!didWarnUncachedGetSnapshot &&
|
|
49
48
|
value !== getSnapshot()) {
|
|
50
49
|
didWarnUncachedGetSnapshot = true;
|
|
51
|
-
|
|
50
|
+
globalThis.__DEV__ !== false && globals.invariant.error(57);
|
|
52
51
|
}
|
|
53
52
|
var _a = React__namespace.useState({ inst: { value: value, getSnapshot: getSnapshot } }), inst = _a[0].inst, forceUpdate = _a[1];
|
|
54
53
|
if (utilities.canUseLayoutEffect) {
|
|
@@ -90,14 +89,14 @@ function useQuery(query, options) {
|
|
|
90
89
|
return useInternalState(useApolloClient(options.client), query).useQuery(options);
|
|
91
90
|
}
|
|
92
91
|
function useInternalState(client, query) {
|
|
93
|
-
var stateRef =
|
|
92
|
+
var stateRef = React__namespace.useRef();
|
|
94
93
|
if (!stateRef.current ||
|
|
95
94
|
client !== stateRef.current.client ||
|
|
96
95
|
query !== stateRef.current.query) {
|
|
97
96
|
stateRef.current = new InternalState(client, query, stateRef.current);
|
|
98
97
|
}
|
|
99
98
|
var state = stateRef.current;
|
|
100
|
-
var _a =
|
|
99
|
+
var _a = React__namespace.useState(0); _a[0]; var setTick = _a[1];
|
|
101
100
|
state.forceUpdate = function () {
|
|
102
101
|
setTick(function (tick) { return tick + 1; });
|
|
103
102
|
};
|
|
@@ -128,7 +127,7 @@ var InternalState = (function () {
|
|
|
128
127
|
}
|
|
129
128
|
}
|
|
130
129
|
InternalState.prototype.forceUpdate = function () {
|
|
131
|
-
|
|
130
|
+
globalThis.__DEV__ !== false && globals.invariant.warn(48);
|
|
132
131
|
};
|
|
133
132
|
InternalState.prototype.executeQuery = function (options) {
|
|
134
133
|
var _this = this;
|
|
@@ -158,10 +157,10 @@ var InternalState = (function () {
|
|
|
158
157
|
};
|
|
159
158
|
InternalState.prototype.useQuery = function (options) {
|
|
160
159
|
var _this = this;
|
|
161
|
-
this.renderPromises =
|
|
160
|
+
this.renderPromises = React__namespace.useContext(context.getApolloContext()).renderPromises;
|
|
162
161
|
this.useOptions(options);
|
|
163
162
|
var obsQuery = this.useObservableQuery();
|
|
164
|
-
var result = useSyncExternalStore(
|
|
163
|
+
var result = useSyncExternalStore(React__namespace.useCallback(function () {
|
|
165
164
|
if (_this.renderPromises) {
|
|
166
165
|
return function () { };
|
|
167
166
|
}
|
|
@@ -291,7 +290,7 @@ var InternalState = (function () {
|
|
|
291
290
|
&& this.renderPromises.getSSRObservable(this.watchQueryOptions)
|
|
292
291
|
|| this.observable
|
|
293
292
|
|| this.client.watchQuery(this.getObsQueryOptions());
|
|
294
|
-
this.obsQueryFields =
|
|
293
|
+
this.obsQueryFields = React__namespace.useMemo(function () { return ({
|
|
295
294
|
refetch: obsQuery.refetch.bind(obsQuery),
|
|
296
295
|
reobserve: obsQuery.reobserve.bind(obsQuery),
|
|
297
296
|
fetchMore: obsQuery.fetchMore.bind(obsQuery),
|
|
@@ -333,7 +332,7 @@ var InternalState = (function () {
|
|
|
333
332
|
_this.onCompleted(result.data);
|
|
334
333
|
}
|
|
335
334
|
}).catch(function (error) {
|
|
336
|
-
|
|
335
|
+
globalThis.__DEV__ !== false && globals.invariant.warn(error);
|
|
337
336
|
});
|
|
338
337
|
}
|
|
339
338
|
};
|
|
@@ -385,9 +384,9 @@ var EAGER_METHODS = [
|
|
|
385
384
|
];
|
|
386
385
|
function useLazyQuery(query, options) {
|
|
387
386
|
var _a;
|
|
388
|
-
var execOptionsRef =
|
|
389
|
-
var optionsRef =
|
|
390
|
-
var queryRef =
|
|
387
|
+
var execOptionsRef = React__namespace.useRef();
|
|
388
|
+
var optionsRef = React__namespace.useRef();
|
|
389
|
+
var queryRef = React__namespace.useRef();
|
|
391
390
|
var merged = utilities.mergeOptions(options, execOptionsRef.current || {});
|
|
392
391
|
var document = (_a = merged === null || merged === void 0 ? void 0 : merged.query) !== null && _a !== void 0 ? _a : query;
|
|
393
392
|
optionsRef.current = merged;
|
|
@@ -399,7 +398,7 @@ function useLazyQuery(query, options) {
|
|
|
399
398
|
var result = Object.assign(useQueryResult, {
|
|
400
399
|
called: !!execOptionsRef.current,
|
|
401
400
|
});
|
|
402
|
-
var eagerMethods =
|
|
401
|
+
var eagerMethods = React__namespace.useMemo(function () {
|
|
403
402
|
var eagerMethods = {};
|
|
404
403
|
var _loop_1 = function (key) {
|
|
405
404
|
var method = result[key];
|
|
@@ -418,7 +417,7 @@ function useLazyQuery(query, options) {
|
|
|
418
417
|
return eagerMethods;
|
|
419
418
|
}, []);
|
|
420
419
|
Object.assign(result, eagerMethods);
|
|
421
|
-
var execute =
|
|
420
|
+
var execute = React__namespace.useCallback(function (executeOptions) {
|
|
422
421
|
execOptionsRef.current = executeOptions ? tslib.__assign(tslib.__assign({}, executeOptions), { fetchPolicy: executeOptions.fetchPolicy || initialFetchPolicy }) : {
|
|
423
422
|
fetchPolicy: initialFetchPolicy,
|
|
424
423
|
};
|
|
@@ -435,12 +434,12 @@ function useLazyQuery(query, options) {
|
|
|
435
434
|
function useMutation(mutation, options) {
|
|
436
435
|
var client = useApolloClient(options === null || options === void 0 ? void 0 : options.client);
|
|
437
436
|
parser.verifyDocumentType(mutation, parser.DocumentType.Mutation);
|
|
438
|
-
var _a =
|
|
437
|
+
var _a = React__namespace.useState({
|
|
439
438
|
called: false,
|
|
440
439
|
loading: false,
|
|
441
440
|
client: client,
|
|
442
441
|
}), result = _a[0], setResult = _a[1];
|
|
443
|
-
var ref =
|
|
442
|
+
var ref = React__namespace.useRef({
|
|
444
443
|
result: result,
|
|
445
444
|
mutationId: 0,
|
|
446
445
|
isMounted: true,
|
|
@@ -451,7 +450,7 @@ function useMutation(mutation, options) {
|
|
|
451
450
|
{
|
|
452
451
|
Object.assign(ref.current, { client: client, options: options, mutation: mutation });
|
|
453
452
|
}
|
|
454
|
-
var execute =
|
|
453
|
+
var execute = React__namespace.useCallback(function (executeOptions) {
|
|
455
454
|
if (executeOptions === void 0) { executeOptions = {}; }
|
|
456
455
|
var _a = ref.current, options = _a.options, mutation = _a.mutation;
|
|
457
456
|
var baseOptions = tslib.__assign(tslib.__assign({}, options), { mutation: mutation });
|
|
@@ -512,12 +511,12 @@ function useMutation(mutation, options) {
|
|
|
512
511
|
throw error;
|
|
513
512
|
});
|
|
514
513
|
}, []);
|
|
515
|
-
var reset =
|
|
514
|
+
var reset = React__namespace.useCallback(function () {
|
|
516
515
|
if (ref.current.isMounted) {
|
|
517
516
|
setResult({ called: false, loading: false, client: client });
|
|
518
517
|
}
|
|
519
518
|
}, []);
|
|
520
|
-
|
|
519
|
+
React__namespace.useEffect(function () {
|
|
521
520
|
ref.current.isMounted = true;
|
|
522
521
|
return function () {
|
|
523
522
|
ref.current.isMounted = false;
|
|
@@ -527,10 +526,10 @@ function useMutation(mutation, options) {
|
|
|
527
526
|
}
|
|
528
527
|
|
|
529
528
|
function useSubscription(subscription, options) {
|
|
530
|
-
var hasIssuedDeprecationWarningRef =
|
|
529
|
+
var hasIssuedDeprecationWarningRef = React__namespace.useRef(false);
|
|
531
530
|
var client = useApolloClient(options === null || options === void 0 ? void 0 : options.client);
|
|
532
531
|
parser.verifyDocumentType(subscription, parser.DocumentType.Subscription);
|
|
533
|
-
var _a =
|
|
532
|
+
var _a = React__namespace.useState({
|
|
534
533
|
loading: !(options === null || options === void 0 ? void 0 : options.skip),
|
|
535
534
|
error: void 0,
|
|
536
535
|
data: void 0,
|
|
@@ -539,13 +538,13 @@ function useSubscription(subscription, options) {
|
|
|
539
538
|
if (!hasIssuedDeprecationWarningRef.current) {
|
|
540
539
|
hasIssuedDeprecationWarningRef.current = true;
|
|
541
540
|
if (options === null || options === void 0 ? void 0 : options.onSubscriptionData) {
|
|
542
|
-
|
|
541
|
+
globalThis.__DEV__ !== false && globals.invariant.warn(options.onData ? 50 : 51);
|
|
543
542
|
}
|
|
544
543
|
if (options === null || options === void 0 ? void 0 : options.onSubscriptionComplete) {
|
|
545
|
-
|
|
544
|
+
globalThis.__DEV__ !== false && globals.invariant.warn(options.onComplete ? 52 : 53);
|
|
546
545
|
}
|
|
547
546
|
}
|
|
548
|
-
var _b =
|
|
547
|
+
var _b = React__namespace.useState(function () {
|
|
549
548
|
if (options === null || options === void 0 ? void 0 : options.skip) {
|
|
550
549
|
return null;
|
|
551
550
|
}
|
|
@@ -556,14 +555,14 @@ function useSubscription(subscription, options) {
|
|
|
556
555
|
context: options === null || options === void 0 ? void 0 : options.context,
|
|
557
556
|
});
|
|
558
557
|
}), observable = _b[0], setObservable = _b[1];
|
|
559
|
-
var canResetObservableRef =
|
|
560
|
-
|
|
558
|
+
var canResetObservableRef = React__namespace.useRef(false);
|
|
559
|
+
React__namespace.useEffect(function () {
|
|
561
560
|
return function () {
|
|
562
561
|
canResetObservableRef.current = true;
|
|
563
562
|
};
|
|
564
563
|
}, []);
|
|
565
|
-
var ref =
|
|
566
|
-
|
|
564
|
+
var ref = React__namespace.useRef({ client: client, subscription: subscription, options: options });
|
|
565
|
+
React__namespace.useEffect(function () {
|
|
567
566
|
var _a, _b, _c, _d;
|
|
568
567
|
var shouldResubscribe = options === null || options === void 0 ? void 0 : options.shouldResubscribe;
|
|
569
568
|
if (typeof shouldResubscribe === 'function') {
|
|
@@ -604,7 +603,7 @@ function useSubscription(subscription, options) {
|
|
|
604
603
|
}
|
|
605
604
|
Object.assign(ref.current, { client: client, subscription: subscription, options: options });
|
|
606
605
|
}, [client, subscription, options, canResetObservableRef.current]);
|
|
607
|
-
|
|
606
|
+
React__namespace.useEffect(function () {
|
|
608
607
|
if (!observable) {
|
|
609
608
|
return;
|
|
610
609
|
}
|
|
@@ -671,8 +670,8 @@ function useSubscription(subscription, options) {
|
|
|
671
670
|
|
|
672
671
|
function useReactiveVar(rv) {
|
|
673
672
|
var value = rv();
|
|
674
|
-
var setValue =
|
|
675
|
-
|
|
673
|
+
var setValue = React__namespace.useState(value)[1];
|
|
674
|
+
React__namespace.useEffect(function () {
|
|
676
675
|
var probablySameValue = rv();
|
|
677
676
|
if (value !== probablySameValue) {
|
|
678
677
|
setValue(probablySameValue);
|
|
@@ -688,7 +687,7 @@ function useFragment(options) {
|
|
|
688
687
|
var cache = useApolloClient().cache;
|
|
689
688
|
var fragment = options.fragment, fragmentName = options.fragmentName, from = options.from, _a = options.optimistic, optimistic = _a === void 0 ? true : _a, rest = tslib.__rest(options, ["fragment", "fragmentName", "from", "optimistic"]);
|
|
690
689
|
var diffOptions = tslib.__assign(tslib.__assign({}, rest), { returnPartialData: true, id: typeof from === "string" ? from : cache.identify(from), query: cache["getFragmentDoc"](fragment, fragmentName), optimistic: optimistic });
|
|
691
|
-
var resultRef =
|
|
690
|
+
var resultRef = React__namespace.useRef();
|
|
692
691
|
var latestDiff = cache.diff(diffOptions);
|
|
693
692
|
var getSnapshot = function () {
|
|
694
693
|
var latestDiffToResult = diffToResult(latestDiff);
|
|
@@ -718,25 +717,15 @@ function diffToResult(diff) {
|
|
|
718
717
|
}
|
|
719
718
|
|
|
720
719
|
function useDeepMemo(memoFn, deps) {
|
|
721
|
-
var ref =
|
|
720
|
+
var ref = React__namespace.useRef();
|
|
722
721
|
if (!ref.current || !equality.equal(ref.current.deps, deps)) {
|
|
723
722
|
ref.current = { value: memoFn(), deps: deps };
|
|
724
723
|
}
|
|
725
724
|
return ref.current.value;
|
|
726
725
|
}
|
|
727
726
|
|
|
728
|
-
function useStrictModeSafeCleanupEffect(cleanup) {
|
|
729
|
-
var timeout;
|
|
730
|
-
React.useEffect(function () {
|
|
731
|
-
clearTimeout(timeout);
|
|
732
|
-
return function () {
|
|
733
|
-
timeout = setTimeout(cleanup);
|
|
734
|
-
};
|
|
735
|
-
}, []);
|
|
736
|
-
}
|
|
737
|
-
|
|
738
727
|
var useKey = 'use';
|
|
739
|
-
var realHook =
|
|
728
|
+
var realHook = React__namespace[useKey];
|
|
740
729
|
var __use = realHook ||
|
|
741
730
|
function __use(promise) {
|
|
742
731
|
var statefulPromise = utilities.wrapPromiseWithState(promise);
|
|
@@ -751,7 +740,7 @@ var __use = realHook ||
|
|
|
751
740
|
};
|
|
752
741
|
|
|
753
742
|
function useSuspenseCache(override) {
|
|
754
|
-
var context$1 =
|
|
743
|
+
var context$1 = React__namespace.useContext(context.getApolloContext());
|
|
755
744
|
var suspenseCache = override || context$1.suspenseCache;
|
|
756
745
|
globals.invariant(suspenseCache, 54);
|
|
757
746
|
return suspenseCache;
|
|
@@ -768,7 +757,7 @@ function useSuspenseQuery(query, options) {
|
|
|
768
757
|
var queryRef = suspenseCache.getQueryRef(cacheKey, function () {
|
|
769
758
|
return client.watchQuery(watchQueryOptions);
|
|
770
759
|
});
|
|
771
|
-
var _b =
|
|
760
|
+
var _b = React__namespace.useState(function () { return new Map([[queryRef.key, queryRef.promise]]); }), promiseCache = _b[0], setPromiseCache = _b[1];
|
|
772
761
|
var promise = promiseCache.get(queryRef.key);
|
|
773
762
|
if (queryRef.didChangeOptions(watchQueryOptions)) {
|
|
774
763
|
promise = queryRef.applyOptions(watchQueryOptions);
|
|
@@ -778,15 +767,19 @@ function useSuspenseQuery(query, options) {
|
|
|
778
767
|
promise = queryRef.promise;
|
|
779
768
|
promiseCache.set(queryRef.key, promise);
|
|
780
769
|
}
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
770
|
+
React__namespace.useEffect(function () {
|
|
771
|
+
var dispose = queryRef.retain();
|
|
772
|
+
var removeListener = queryRef.listen(function (promise) {
|
|
784
773
|
setPromiseCache(function (promiseCache) {
|
|
785
774
|
return new Map(promiseCache).set(queryRef.key, promise);
|
|
786
775
|
});
|
|
787
776
|
});
|
|
777
|
+
return function () {
|
|
778
|
+
removeListener();
|
|
779
|
+
dispose();
|
|
780
|
+
};
|
|
788
781
|
}, [queryRef]);
|
|
789
|
-
var skipResult =
|
|
782
|
+
var skipResult = React__namespace.useMemo(function () {
|
|
790
783
|
var error = toApolloError(queryRef.result);
|
|
791
784
|
return {
|
|
792
785
|
loading: false,
|
|
@@ -796,22 +789,22 @@ function useSuspenseQuery(query, options) {
|
|
|
796
789
|
};
|
|
797
790
|
}, [queryRef.result]);
|
|
798
791
|
var result = fetchPolicy === 'standby' ? skipResult : __use(promise);
|
|
799
|
-
var fetchMore =
|
|
792
|
+
var fetchMore = React__namespace.useCallback(function (options) {
|
|
800
793
|
var promise = queryRef.fetchMore(options);
|
|
801
794
|
setPromiseCache(function (previousPromiseCache) {
|
|
802
|
-
return new Map(previousPromiseCache).set(queryRef.key, promise);
|
|
795
|
+
return new Map(previousPromiseCache).set(queryRef.key, queryRef.promise);
|
|
803
796
|
});
|
|
804
797
|
return promise;
|
|
805
798
|
}, [queryRef]);
|
|
806
|
-
var refetch =
|
|
799
|
+
var refetch = React__namespace.useCallback(function (variables) {
|
|
807
800
|
var promise = queryRef.refetch(variables);
|
|
808
801
|
setPromiseCache(function (previousPromiseCache) {
|
|
809
|
-
return new Map(previousPromiseCache).set(queryRef.key, promise);
|
|
802
|
+
return new Map(previousPromiseCache).set(queryRef.key, queryRef.promise);
|
|
810
803
|
});
|
|
811
804
|
return promise;
|
|
812
805
|
}, [queryRef]);
|
|
813
|
-
var subscribeToMore =
|
|
814
|
-
return
|
|
806
|
+
var subscribeToMore = React__namespace.useCallback(function (options) { return queryRef.observable.subscribeToMore(options); }, [queryRef]);
|
|
807
|
+
return React__namespace.useMemo(function () {
|
|
815
808
|
return {
|
|
816
809
|
client: client,
|
|
817
810
|
data: result.data,
|
|
@@ -841,7 +834,7 @@ function validateFetchPolicy(fetchPolicy) {
|
|
|
841
834
|
}
|
|
842
835
|
function validatePartialDataReturn(fetchPolicy, returnPartialData) {
|
|
843
836
|
if (fetchPolicy === 'no-cache' && returnPartialData) {
|
|
844
|
-
|
|
837
|
+
globalThis.__DEV__ !== false && globals.invariant.warn(56);
|
|
845
838
|
}
|
|
846
839
|
}
|
|
847
840
|
function toApolloError(result) {
|
|
@@ -849,13 +842,6 @@ function toApolloError(result) {
|
|
|
849
842
|
? new core.ApolloError({ graphQLErrors: result.errors })
|
|
850
843
|
: result.error;
|
|
851
844
|
}
|
|
852
|
-
function useTrackedQueryRefs(queryRef) {
|
|
853
|
-
var trackedQueryRefs = React.useRef(new Set());
|
|
854
|
-
trackedQueryRefs.current.add(queryRef);
|
|
855
|
-
useStrictModeSafeCleanupEffect(function () {
|
|
856
|
-
trackedQueryRefs.current.forEach(function (sub) { return sub.dispose(); });
|
|
857
|
-
});
|
|
858
|
-
}
|
|
859
845
|
function useWatchQueryOptions(_a) {
|
|
860
846
|
var client = _a.client, query = _a.query, options = _a.options;
|
|
861
847
|
return useDeepMemo(function () {
|
|
@@ -864,7 +850,7 @@ function useWatchQueryOptions(_a) {
|
|
|
864
850
|
((_a = client.defaultOptions.watchQuery) === null || _a === void 0 ? void 0 : _a.fetchPolicy) ||
|
|
865
851
|
'cache-first';
|
|
866
852
|
var watchQueryOptions = tslib.__assign(tslib.__assign({}, options), { fetchPolicy: fetchPolicy, query: query, notifyOnNetworkStatusChange: false, nextFetchPolicy: void 0 });
|
|
867
|
-
if (
|
|
853
|
+
if (globalThis.__DEV__ !== false) {
|
|
868
854
|
validateOptions(watchQueryOptions);
|
|
869
855
|
}
|
|
870
856
|
if (options.skip) {
|
|
@@ -888,11 +874,12 @@ var OBSERVED_CHANGED_OPTIONS = [
|
|
|
888
874
|
var _this = this;
|
|
889
875
|
var _a;
|
|
890
876
|
this.listeners = new Set();
|
|
891
|
-
this.
|
|
892
|
-
this.
|
|
877
|
+
this.status = 'loading';
|
|
878
|
+
this.references = 0;
|
|
893
879
|
this.listen = this.listen.bind(this);
|
|
894
880
|
this.handleNext = this.handleNext.bind(this);
|
|
895
881
|
this.handleError = this.handleError.bind(this);
|
|
882
|
+
this.initiateFetch = this.initiateFetch.bind(this);
|
|
896
883
|
this.dispose = this.dispose.bind(this);
|
|
897
884
|
this.observable = observable;
|
|
898
885
|
this.result = observable.getCurrentResult(false);
|
|
@@ -902,21 +889,25 @@ var OBSERVED_CHANGED_OPTIONS = [
|
|
|
902
889
|
}
|
|
903
890
|
if (core.isNetworkRequestSettled(this.result.networkStatus) ||
|
|
904
891
|
(this.result.data &&
|
|
905
|
-
(!this.result.partial || this.
|
|
892
|
+
(!this.result.partial || this.watchQueryOptions.returnPartialData))) {
|
|
906
893
|
this.promise = utilities.createFulfilledPromise(this.result);
|
|
907
|
-
this.
|
|
908
|
-
this.refetching = false;
|
|
894
|
+
this.status = 'idle';
|
|
909
895
|
}
|
|
910
|
-
|
|
911
|
-
next: this.handleNext,
|
|
912
|
-
error: this.handleError,
|
|
913
|
-
});
|
|
914
|
-
if (!this.promise) {
|
|
896
|
+
else {
|
|
915
897
|
this.promise = new Promise(function (resolve, reject) {
|
|
916
898
|
_this.resolve = resolve;
|
|
917
899
|
_this.reject = reject;
|
|
918
900
|
});
|
|
919
901
|
}
|
|
902
|
+
this.subscription = observable
|
|
903
|
+
.filter(function (_a) {
|
|
904
|
+
var data = _a.data;
|
|
905
|
+
return !equality.equal(data, {});
|
|
906
|
+
})
|
|
907
|
+
.subscribe({
|
|
908
|
+
next: this.handleNext,
|
|
909
|
+
error: this.handleError,
|
|
910
|
+
});
|
|
920
911
|
this.autoDisposeTimeoutId = setTimeout(this.dispose, (_a = options.autoDisposeTimeoutMs) !== null && _a !== void 0 ? _a : 30000);
|
|
921
912
|
}
|
|
922
913
|
Object.defineProperty(InternalQueryReference.prototype, "watchQueryOptions", {
|
|
@@ -926,6 +917,24 @@ var OBSERVED_CHANGED_OPTIONS = [
|
|
|
926
917
|
enumerable: false,
|
|
927
918
|
configurable: true
|
|
928
919
|
});
|
|
920
|
+
InternalQueryReference.prototype.retain = function () {
|
|
921
|
+
var _this = this;
|
|
922
|
+
this.references++;
|
|
923
|
+
clearTimeout(this.autoDisposeTimeoutId);
|
|
924
|
+
var disposed = false;
|
|
925
|
+
return function () {
|
|
926
|
+
if (disposed) {
|
|
927
|
+
return;
|
|
928
|
+
}
|
|
929
|
+
disposed = true;
|
|
930
|
+
_this.references--;
|
|
931
|
+
setTimeout(function () {
|
|
932
|
+
if (!_this.references) {
|
|
933
|
+
_this.dispose();
|
|
934
|
+
}
|
|
935
|
+
});
|
|
936
|
+
};
|
|
937
|
+
};
|
|
929
938
|
InternalQueryReference.prototype.didChangeOptions = function (watchQueryOptions) {
|
|
930
939
|
var _this = this;
|
|
931
940
|
return OBSERVED_CHANGED_OPTIONS.some(function (option) {
|
|
@@ -933,40 +942,36 @@ var OBSERVED_CHANGED_OPTIONS = [
|
|
|
933
942
|
});
|
|
934
943
|
};
|
|
935
944
|
InternalQueryReference.prototype.applyOptions = function (watchQueryOptions) {
|
|
936
|
-
var
|
|
945
|
+
var _a = this.watchQueryOptions, currentFetchPolicy = _a.fetchPolicy, currentCanonizeResults = _a.canonizeResults;
|
|
937
946
|
if (currentFetchPolicy === 'standby' &&
|
|
938
947
|
currentFetchPolicy !== watchQueryOptions.fetchPolicy) {
|
|
939
|
-
this.
|
|
948
|
+
this.observable.reobserve(watchQueryOptions);
|
|
949
|
+
this.initiateFetch();
|
|
940
950
|
}
|
|
941
951
|
else {
|
|
942
952
|
this.observable.silentSetOptions(watchQueryOptions);
|
|
943
|
-
|
|
944
|
-
|
|
953
|
+
if (currentCanonizeResults !== watchQueryOptions.canonizeResults) {
|
|
954
|
+
this.result = tslib.__assign(tslib.__assign({}, this.result), this.observable.getCurrentResult());
|
|
955
|
+
this.promise = utilities.createFulfilledPromise(this.result);
|
|
956
|
+
}
|
|
945
957
|
}
|
|
946
958
|
return this.promise;
|
|
947
959
|
};
|
|
948
960
|
InternalQueryReference.prototype.listen = function (listener) {
|
|
949
961
|
var _this = this;
|
|
950
|
-
clearTimeout(this.autoDisposeTimeoutId);
|
|
951
962
|
this.listeners.add(listener);
|
|
952
963
|
return function () {
|
|
953
964
|
_this.listeners.delete(listener);
|
|
954
965
|
};
|
|
955
966
|
};
|
|
956
967
|
InternalQueryReference.prototype.refetch = function (variables) {
|
|
957
|
-
this.refetching = true;
|
|
958
968
|
var promise = this.observable.refetch(variables);
|
|
959
|
-
this.
|
|
969
|
+
this.initiateFetch();
|
|
960
970
|
return promise;
|
|
961
971
|
};
|
|
962
972
|
InternalQueryReference.prototype.fetchMore = function (options) {
|
|
963
973
|
var promise = this.observable.fetchMore(options);
|
|
964
|
-
this.
|
|
965
|
-
return promise;
|
|
966
|
-
};
|
|
967
|
-
InternalQueryReference.prototype.reobserve = function (watchQueryOptions) {
|
|
968
|
-
var promise = this.observable.reobserve(watchQueryOptions);
|
|
969
|
-
this.promise = promise;
|
|
974
|
+
this.initiateFetch();
|
|
970
975
|
return promise;
|
|
971
976
|
};
|
|
972
977
|
InternalQueryReference.prototype.dispose = function () {
|
|
@@ -976,45 +981,57 @@ var OBSERVED_CHANGED_OPTIONS = [
|
|
|
976
981
|
InternalQueryReference.prototype.onDispose = function () {
|
|
977
982
|
};
|
|
978
983
|
InternalQueryReference.prototype.handleNext = function (result) {
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
984
|
+
var _a;
|
|
985
|
+
switch (this.status) {
|
|
986
|
+
case 'loading': {
|
|
987
|
+
if (result.data === void 0) {
|
|
988
|
+
result.data = this.result.data;
|
|
989
|
+
}
|
|
990
|
+
this.status = 'idle';
|
|
991
|
+
this.result = result;
|
|
992
|
+
(_a = this.resolve) === null || _a === void 0 ? void 0 : _a.call(this, result);
|
|
993
|
+
break;
|
|
985
994
|
}
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
995
|
+
case 'idle': {
|
|
996
|
+
if (result.data === this.result.data) {
|
|
997
|
+
return;
|
|
998
|
+
}
|
|
999
|
+
if (result.data === void 0) {
|
|
1000
|
+
result.data = this.result.data;
|
|
1001
|
+
}
|
|
1002
|
+
this.result = result;
|
|
1003
|
+
this.promise = utilities.createFulfilledPromise(result);
|
|
1004
|
+
this.deliver(this.promise);
|
|
1005
|
+
break;
|
|
991
1006
|
}
|
|
992
|
-
return;
|
|
993
1007
|
}
|
|
994
|
-
if (result.data === this.result.data) {
|
|
995
|
-
return;
|
|
996
|
-
}
|
|
997
|
-
this.result = result;
|
|
998
|
-
this.promise = utilities.createFulfilledPromise(result);
|
|
999
|
-
this.deliver(this.promise);
|
|
1000
1008
|
};
|
|
1001
1009
|
InternalQueryReference.prototype.handleError = function (error) {
|
|
1002
|
-
var
|
|
1003
|
-
this.
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1010
|
+
var _a;
|
|
1011
|
+
switch (this.status) {
|
|
1012
|
+
case 'loading': {
|
|
1013
|
+
this.status = 'idle';
|
|
1014
|
+
(_a = this.reject) === null || _a === void 0 ? void 0 : _a.call(this, error);
|
|
1015
|
+
break;
|
|
1016
|
+
}
|
|
1017
|
+
case 'idle': {
|
|
1018
|
+
this.promise = utilities.createRejectedPromise(error);
|
|
1019
|
+
this.deliver(this.promise);
|
|
1009
1020
|
}
|
|
1010
|
-
return;
|
|
1011
1021
|
}
|
|
1012
|
-
this.promise = utilities.createRejectedPromise(error);
|
|
1013
|
-
this.deliver(this.promise);
|
|
1014
1022
|
};
|
|
1015
1023
|
InternalQueryReference.prototype.deliver = function (promise) {
|
|
1016
1024
|
this.listeners.forEach(function (listener) { return listener(promise); });
|
|
1017
1025
|
};
|
|
1026
|
+
InternalQueryReference.prototype.initiateFetch = function () {
|
|
1027
|
+
var _this = this;
|
|
1028
|
+
this.status = 'loading';
|
|
1029
|
+
this.promise = new Promise(function (resolve, reject) {
|
|
1030
|
+
_this.resolve = resolve;
|
|
1031
|
+
_this.reject = reject;
|
|
1032
|
+
});
|
|
1033
|
+
this.promise.catch(function () { });
|
|
1034
|
+
};
|
|
1018
1035
|
return InternalQueryReference;
|
|
1019
1036
|
})());
|
|
1020
1037
|
|
|
@@ -1029,28 +1046,28 @@ function useBackgroundQuery(query, options) {
|
|
|
1029
1046
|
var queryRef = suspenseCache.getQueryRef(cacheKey, function () {
|
|
1030
1047
|
return client.watchQuery(watchQueryOptions);
|
|
1031
1048
|
});
|
|
1032
|
-
var _b =
|
|
1049
|
+
var _b = React__namespace.useState(function () { return new Map([[queryRef.key, queryRef.promise]]); }), promiseCache = _b[0], setPromiseCache = _b[1];
|
|
1033
1050
|
if (queryRef.didChangeOptions(watchQueryOptions)) {
|
|
1034
1051
|
var promise = queryRef.applyOptions(watchQueryOptions);
|
|
1035
1052
|
promiseCache.set(queryRef.key, promise);
|
|
1036
1053
|
}
|
|
1037
|
-
|
|
1038
|
-
var fetchMore =
|
|
1054
|
+
React__namespace.useEffect(function () { return queryRef.retain(); }, [queryRef]);
|
|
1055
|
+
var fetchMore = React__namespace.useCallback(function (options) {
|
|
1039
1056
|
var promise = queryRef.fetchMore(options);
|
|
1040
1057
|
setPromiseCache(function (promiseCache) {
|
|
1041
|
-
return new Map(promiseCache).set(queryRef.key, promise);
|
|
1058
|
+
return new Map(promiseCache).set(queryRef.key, queryRef.promise);
|
|
1042
1059
|
});
|
|
1043
1060
|
return promise;
|
|
1044
1061
|
}, [queryRef]);
|
|
1045
|
-
var refetch =
|
|
1062
|
+
var refetch = React__namespace.useCallback(function (variables) {
|
|
1046
1063
|
var promise = queryRef.refetch(variables);
|
|
1047
1064
|
setPromiseCache(function (promiseCache) {
|
|
1048
|
-
return new Map(promiseCache).set(queryRef.key, promise);
|
|
1065
|
+
return new Map(promiseCache).set(queryRef.key, queryRef.promise);
|
|
1049
1066
|
});
|
|
1050
1067
|
return promise;
|
|
1051
1068
|
}, [queryRef]);
|
|
1052
1069
|
queryRef.promiseCache = promiseCache;
|
|
1053
|
-
return
|
|
1070
|
+
return React__namespace.useMemo(function () {
|
|
1054
1071
|
var _a;
|
|
1055
1072
|
return [
|
|
1056
1073
|
(_a = {}, _a[QUERY_REFERENCE_SYMBOL] = queryRef, _a),
|
|
@@ -1063,10 +1080,10 @@ function useBackgroundQuery(query, options) {
|
|
|
1063
1080
|
}
|
|
1064
1081
|
|
|
1065
1082
|
function useReadQuery(queryRef) {
|
|
1066
|
-
var _a =
|
|
1083
|
+
var _a = React__namespace.useState(0), forceUpdate = _a[1];
|
|
1067
1084
|
var internalQueryRef = queryRef[QUERY_REFERENCE_SYMBOL];
|
|
1068
1085
|
invariant__default(internalQueryRef.promiseCache, 49);
|
|
1069
|
-
var skipResult =
|
|
1086
|
+
var skipResult = React__namespace.useMemo(function () {
|
|
1070
1087
|
var error = toApolloError(internalQueryRef.result);
|
|
1071
1088
|
return {
|
|
1072
1089
|
loading: false,
|
|
@@ -1080,7 +1097,7 @@ function useReadQuery(queryRef) {
|
|
|
1080
1097
|
promise = internalQueryRef.promise;
|
|
1081
1098
|
internalQueryRef.promiseCache.set(internalQueryRef.key, promise);
|
|
1082
1099
|
}
|
|
1083
|
-
|
|
1100
|
+
React__namespace.useEffect(function () {
|
|
1084
1101
|
return internalQueryRef.listen(function (promise) {
|
|
1085
1102
|
internalQueryRef.promiseCache.set(internalQueryRef.key, promise);
|
|
1086
1103
|
forceUpdate(function (prevState) { return prevState + 1; });
|
|
@@ -1089,7 +1106,7 @@ function useReadQuery(queryRef) {
|
|
|
1089
1106
|
var result = internalQueryRef.watchQueryOptions.fetchPolicy === 'standby'
|
|
1090
1107
|
? skipResult
|
|
1091
1108
|
: __use(promise);
|
|
1092
|
-
return
|
|
1109
|
+
return React__namespace.useMemo(function () {
|
|
1093
1110
|
return {
|
|
1094
1111
|
data: result.data,
|
|
1095
1112
|
networkStatus: result.networkStatus,
|
package/react/hooks/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import '../../utilities/globals';
|
|
2
|
-
export * from './useApolloClient';
|
|
3
|
-
export * from './useLazyQuery';
|
|
4
|
-
export * from './useMutation';
|
|
5
|
-
export { useQuery } from './useQuery';
|
|
6
|
-
export * from './useSubscription';
|
|
7
|
-
export * from './useReactiveVar';
|
|
8
|
-
export * from './useFragment';
|
|
9
|
-
export { useSuspenseQuery, UseSuspenseQueryResult, FetchMoreFunction, RefetchFunction, SubscribeToMoreFunction, } from './useSuspenseQuery';
|
|
10
|
-
export { useBackgroundQuery, UseBackgroundQueryResult, } from './useBackgroundQuery';
|
|
11
|
-
export { useReadQuery } from './useReadQuery';
|
|
1
|
+
import '../../utilities/globals/index.js';
|
|
2
|
+
export * from './useApolloClient.js';
|
|
3
|
+
export * from './useLazyQuery.js';
|
|
4
|
+
export * from './useMutation.js';
|
|
5
|
+
export { useQuery } from './useQuery.js';
|
|
6
|
+
export * from './useSubscription.js';
|
|
7
|
+
export * from './useReactiveVar.js';
|
|
8
|
+
export * from './useFragment.js';
|
|
9
|
+
export { useSuspenseQuery, UseSuspenseQueryResult, FetchMoreFunction, RefetchFunction, SubscribeToMoreFunction, } from './useSuspenseQuery.js';
|
|
10
|
+
export { useBackgroundQuery, UseBackgroundQueryResult, } from './useBackgroundQuery.js';
|
|
11
|
+
export { useReadQuery } from './useReadQuery.js';
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAE1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,EACf,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
|