@apollo/client 3.8.0-beta.5 → 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 +282 -242
- 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 +12 -11
- 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 +5 -5
- package/core/LocalState.js.map +1 -1
- package/core/ObservableQuery.d.ts +11 -10
- package/core/ObservableQuery.d.ts.map +1 -1
- package/core/ObservableQuery.js +17 -13
- 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 +12 -12
- package/core/QueryManager.d.ts.map +1 -1
- package/core/QueryManager.js +25 -25
- package/core/QueryManager.js.map +1 -1
- package/core/core.cjs +43 -37
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +43 -37
- 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 +73 -81
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +73 -81
- 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/invariantErrorCodes.js +71 -78
- 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 +5 -5
- 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 +2 -2
- package/link/core/core.cjs.map +1 -1
- package/link/core/core.cjs.native.js +2 -2
- 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 +2 -2
- 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 +4 -4
- package/link/http/http.cjs.map +1 -1
- package/link/http/http.cjs.native.js +4 -4
- 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 +2 -2
- 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 +6 -6
- package/link/persisted-queries/index.js.map +1 -1
- package/link/persisted-queries/persisted-queries.cjs +2 -2
- package/link/persisted-queries/persisted-queries.cjs.map +1 -1
- package/link/persisted-queries/persisted-queries.cjs.native.js +2 -2
- 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 +2 -2
- package/link/utils/utils.cjs.map +1 -1
- package/link/utils/utils.cjs.native.js +2 -2
- package/link/utils/validateOperation.d.ts +1 -1
- package/link/utils/validateOperation.d.ts.map +1 -1
- package/link/utils/validateOperation.js +2 -2
- 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 +18 -14
- package/react/cache/QueryReference.d.ts +9 -6
- package/react/cache/QueryReference.d.ts.map +1 -1
- package/react/cache/QueryReference.js +108 -52
- 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 +3 -3
- 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 +12 -5
- 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 +3 -3
- package/react/context/ApolloProvider.js.map +1 -1
- package/react/context/context.cjs +12 -5
- package/react/context/context.cjs.map +1 -1
- package/react/context/context.cjs.native.js +12 -5
- 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 +2 -2
- package/react/hoc/hoc-utils.js.map +1 -1
- package/react/hoc/hoc.cjs +2 -2
- package/react/hoc/hoc.cjs.map +1 -1
- package/react/hoc/hoc.cjs.native.js +2 -2
- 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 +3 -3
- package/react/hoc/withApollo.js.map +1 -1
- package/react/hooks/hooks.cjs +179 -140
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/hooks.cjs.native.js +179 -140
- 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 +5 -5
- 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 +16 -17
- 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 +6 -6
- 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 +5 -5
- 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 +30 -34
- 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 +6 -6
- package/react/parser/index.js.map +1 -1
- package/react/parser/parser.cjs +5 -5
- package/react/parser/parser.cjs.map +1 -1
- package/react/parser/parser.cjs.native.js +5 -5
- package/react/react.cjs +106 -50
- package/react/react.cjs.map +1 -1
- package/react/react.cjs.native.js +106 -50
- 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 +1 -1
- package/testing/core/core.cjs.map +1 -1
- package/testing/core/core.cjs.native.js +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 +4 -4
- 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 +4 -4
- package/utilities/graphql/DocumentTransform.js.map +1 -1
- package/utilities/graphql/directives.js +5 -5
- package/utilities/graphql/directives.js.map +1 -1
- package/utilities/graphql/fragments.js +4 -4
- package/utilities/graphql/fragments.js.map +1 -1
- package/utilities/graphql/getFromAST.js +10 -10
- 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 +4 -4
- 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/promises/decoration.d.ts.map +1 -1
- package/utilities/promises/decoration.js +1 -0
- package/utilities/promises/decoration.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 +22 -21
- package/utilities/utilities.cjs.map +1 -1
- package/utilities/utilities.cjs.native.js +22 -21
- 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
package/apollo-client.cjs
CHANGED
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
|
-
var process$1 = require('ts-invariant/process');
|
|
7
|
-
var graphql = require('graphql');
|
|
8
|
-
var equal = require('@wry/equality');
|
|
9
6
|
var invariant$1 = require('ts-invariant');
|
|
7
|
+
var equal = require('@wry/equality');
|
|
8
|
+
var graphql = require('graphql');
|
|
10
9
|
var zenObservableTs = require('zen-observable-ts');
|
|
11
10
|
require('symbol-observable');
|
|
12
11
|
var optimism = require('optimism');
|
|
@@ -29,12 +28,11 @@ function _interopNamespace(e) {
|
|
|
29
28
|
return Object.freeze(n);
|
|
30
29
|
}
|
|
31
30
|
|
|
32
|
-
var equal__default = /*#__PURE__*/_interopDefaultLegacy(equal);
|
|
33
31
|
var invariant__default = /*#__PURE__*/_interopDefaultLegacy(invariant$1);
|
|
32
|
+
var equal__default = /*#__PURE__*/_interopDefaultLegacy(equal);
|
|
34
33
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
35
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
36
34
|
|
|
37
|
-
var version = '3.8.0-beta.
|
|
35
|
+
var version = '3.8.0-beta.7';
|
|
38
36
|
|
|
39
37
|
function maybe(thunk) {
|
|
40
38
|
try {
|
|
@@ -46,8 +44,7 @@ function maybe(thunk) {
|
|
|
46
44
|
var global$1 = (maybe(function () { return globalThis; }) ||
|
|
47
45
|
maybe(function () { return window; }) ||
|
|
48
46
|
maybe(function () { return self; }) ||
|
|
49
|
-
maybe(function () { return global; }) ||
|
|
50
|
-
maybe(function () { return maybe.constructor("return this")(); }));
|
|
47
|
+
maybe(function () { return global; }) || maybe(function () { return maybe.constructor("return this")(); }));
|
|
51
48
|
|
|
52
49
|
var prefixCounts = new Map();
|
|
53
50
|
function makeUniqueId(prefix) {
|
|
@@ -111,17 +108,6 @@ function getErrorMsg(message, messageArgs) {
|
|
|
111
108
|
}))));
|
|
112
109
|
}
|
|
113
110
|
|
|
114
|
-
var DEV = ("__DEV__" in global$1
|
|
115
|
-
? Boolean(global$1.__DEV__)
|
|
116
|
-
: maybe(function () { return process.env.NODE_ENV; }) !== "production");
|
|
117
|
-
|
|
118
|
-
function removeTemporaryGlobals() {
|
|
119
|
-
return typeof graphql.Source === "function" ? process$1.remove() : process$1.remove();
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
var __DEV__ = DEV;
|
|
123
|
-
removeTemporaryGlobals();
|
|
124
|
-
|
|
125
111
|
function shouldInclude(_a, variables) {
|
|
126
112
|
var directives = _a.directives;
|
|
127
113
|
if (!directives || !directives.length) {
|
|
@@ -132,7 +118,7 @@ function shouldInclude(_a, variables) {
|
|
|
132
118
|
var evaledValue = false;
|
|
133
119
|
if (ifArgument.value.kind === 'Variable') {
|
|
134
120
|
evaledValue = variables && variables[ifArgument.value.name.value];
|
|
135
|
-
invariant(evaledValue !== void 0,
|
|
121
|
+
invariant(evaledValue !== void 0, 65, directive.name.value);
|
|
136
122
|
}
|
|
137
123
|
else {
|
|
138
124
|
evaledValue = ifArgument.value.value;
|
|
@@ -168,12 +154,12 @@ function getInclusionDirectives(directives) {
|
|
|
168
154
|
return;
|
|
169
155
|
var directiveArguments = directive.arguments;
|
|
170
156
|
var directiveName = directive.name.value;
|
|
171
|
-
invariant(directiveArguments && directiveArguments.length === 1,
|
|
157
|
+
invariant(directiveArguments && directiveArguments.length === 1, 66, directiveName);
|
|
172
158
|
var ifArgument = directiveArguments[0];
|
|
173
|
-
invariant(ifArgument.name && ifArgument.name.value === 'if',
|
|
159
|
+
invariant(ifArgument.name && ifArgument.name.value === 'if', 67, directiveName);
|
|
174
160
|
var ifValue = ifArgument.value;
|
|
175
161
|
invariant(ifValue &&
|
|
176
|
-
(ifValue.kind === 'Variable' || ifValue.kind === 'BooleanValue'),
|
|
162
|
+
(ifValue.kind === 'Variable' || ifValue.kind === 'BooleanValue'), 68, directiveName);
|
|
177
163
|
result.push({ directive: directive, ifArgument: ifArgument });
|
|
178
164
|
});
|
|
179
165
|
}
|
|
@@ -200,7 +186,7 @@ function getFragmentQueryDocument(document, fragmentName) {
|
|
|
200
186
|
document.definitions.forEach(function (definition) {
|
|
201
187
|
if (definition.kind === 'OperationDefinition') {
|
|
202
188
|
throw newInvariantError(
|
|
203
|
-
|
|
189
|
+
69,
|
|
204
190
|
definition.operation,
|
|
205
191
|
definition.name ? " named '".concat(definition.name.value, "'") : ''
|
|
206
192
|
);
|
|
@@ -210,7 +196,7 @@ function getFragmentQueryDocument(document, fragmentName) {
|
|
|
210
196
|
}
|
|
211
197
|
});
|
|
212
198
|
if (typeof actualFragmentName === 'undefined') {
|
|
213
|
-
invariant(fragments.length === 1,
|
|
199
|
+
invariant(fragments.length === 1, 70, fragments.length);
|
|
214
200
|
actualFragmentName = fragments[0].name.value;
|
|
215
201
|
}
|
|
216
202
|
var query = tslib.__assign(tslib.__assign({}, document), { definitions: tslib.__spreadArray([
|
|
@@ -251,7 +237,7 @@ function getFragmentFromSelection(selection, fragmentMap) {
|
|
|
251
237
|
return fragmentMap(fragmentName);
|
|
252
238
|
}
|
|
253
239
|
var fragment = fragmentMap && fragmentMap[fragmentName];
|
|
254
|
-
invariant(fragment,
|
|
240
|
+
invariant(fragment, 71, fragmentName);
|
|
255
241
|
return fragment || null;
|
|
256
242
|
}
|
|
257
243
|
default:
|
|
@@ -329,7 +315,7 @@ function valueToObjectRepresentation(argObj, name, value, variables) {
|
|
|
329
315
|
argObj[name.value] = null;
|
|
330
316
|
}
|
|
331
317
|
else {
|
|
332
|
-
throw newInvariantError(
|
|
318
|
+
throw newInvariantError(80, name.value, value.kind);
|
|
333
319
|
}
|
|
334
320
|
}
|
|
335
321
|
function storeKeyNameFromField(field, variables) {
|
|
@@ -474,16 +460,16 @@ function isInlineFragment(selection) {
|
|
|
474
460
|
}
|
|
475
461
|
|
|
476
462
|
function checkDocument(doc) {
|
|
477
|
-
invariant(doc && doc.kind === 'Document',
|
|
463
|
+
invariant(doc && doc.kind === 'Document', 72);
|
|
478
464
|
var operations = doc.definitions
|
|
479
465
|
.filter(function (d) { return d.kind !== 'FragmentDefinition'; })
|
|
480
466
|
.map(function (definition) {
|
|
481
467
|
if (definition.kind !== 'OperationDefinition') {
|
|
482
|
-
throw newInvariantError(
|
|
468
|
+
throw newInvariantError(73, definition.kind);
|
|
483
469
|
}
|
|
484
470
|
return definition;
|
|
485
471
|
});
|
|
486
|
-
invariant(operations.length <= 1,
|
|
472
|
+
invariant(operations.length <= 1, 74, operations.length);
|
|
487
473
|
return doc;
|
|
488
474
|
}
|
|
489
475
|
function getOperationDefinition(doc) {
|
|
@@ -506,14 +492,14 @@ function getFragmentDefinitions(doc) {
|
|
|
506
492
|
}
|
|
507
493
|
function getQueryDefinition(doc) {
|
|
508
494
|
var queryDef = getOperationDefinition(doc);
|
|
509
|
-
invariant(queryDef && queryDef.operation === 'query',
|
|
495
|
+
invariant(queryDef && queryDef.operation === 'query', 75);
|
|
510
496
|
return queryDef;
|
|
511
497
|
}
|
|
512
498
|
function getFragmentDefinition(doc) {
|
|
513
|
-
invariant(doc.kind === 'Document',
|
|
514
|
-
invariant(doc.definitions.length <= 1,
|
|
499
|
+
invariant(doc.kind === 'Document', 76);
|
|
500
|
+
invariant(doc.definitions.length <= 1, 77);
|
|
515
501
|
var fragmentDef = doc.definitions[0];
|
|
516
|
-
invariant(fragmentDef.kind === 'FragmentDefinition',
|
|
502
|
+
invariant(fragmentDef.kind === 'FragmentDefinition', 78);
|
|
517
503
|
return fragmentDef;
|
|
518
504
|
}
|
|
519
505
|
function getMainDefinition(queryDoc) {
|
|
@@ -536,7 +522,7 @@ function getMainDefinition(queryDoc) {
|
|
|
536
522
|
if (fragmentDefinition) {
|
|
537
523
|
return fragmentDefinition;
|
|
538
524
|
}
|
|
539
|
-
throw newInvariantError(
|
|
525
|
+
throw newInvariantError(79);
|
|
540
526
|
}
|
|
541
527
|
function getDefaultValues(definition) {
|
|
542
528
|
var defaultValues = Object.create(null);
|
|
@@ -608,7 +594,7 @@ var DocumentTransform = (function () {
|
|
|
608
594
|
return;
|
|
609
595
|
var cacheKeys = this.getCacheKey(document);
|
|
610
596
|
if (cacheKeys) {
|
|
611
|
-
invariant(Array.isArray(cacheKeys),
|
|
597
|
+
invariant(Array.isArray(cacheKeys), 64);
|
|
612
598
|
return this.stableCacheKeys.lookupArray(cacheKeys);
|
|
613
599
|
}
|
|
614
600
|
};
|
|
@@ -701,7 +687,7 @@ function removeDirectivesFromDocument(directives, doc) {
|
|
|
701
687
|
return getInUseByFragmentName(ancestor.name.value);
|
|
702
688
|
}
|
|
703
689
|
}
|
|
704
|
-
__DEV__ && invariant.error(
|
|
690
|
+
globalThis.__DEV__ !== false && invariant.error(81);
|
|
705
691
|
return null;
|
|
706
692
|
};
|
|
707
693
|
var operationCount = 0;
|
|
@@ -978,6 +964,7 @@ function createFulfilledPromise(value) {
|
|
|
978
964
|
}
|
|
979
965
|
function createRejectedPromise(reason) {
|
|
980
966
|
var promise = Promise.reject(reason);
|
|
967
|
+
promise.catch(function () { });
|
|
981
968
|
promise.status = 'rejected';
|
|
982
969
|
promise.reason = reason;
|
|
983
970
|
return promise;
|
|
@@ -1053,7 +1040,7 @@ function deepFreeze(value) {
|
|
|
1053
1040
|
return value;
|
|
1054
1041
|
}
|
|
1055
1042
|
function shallowFreeze(obj) {
|
|
1056
|
-
if (__DEV__ && !Object.isFrozen(obj)) {
|
|
1043
|
+
if (globalThis.__DEV__ !== false && !Object.isFrozen(obj)) {
|
|
1057
1044
|
try {
|
|
1058
1045
|
Object.freeze(obj);
|
|
1059
1046
|
}
|
|
@@ -1066,7 +1053,7 @@ function shallowFreeze(obj) {
|
|
|
1066
1053
|
return obj;
|
|
1067
1054
|
}
|
|
1068
1055
|
function maybeDeepFreeze(obj) {
|
|
1069
|
-
if (__DEV__) {
|
|
1056
|
+
if (globalThis.__DEV__ !== false) {
|
|
1070
1057
|
deepFreeze(obj);
|
|
1071
1058
|
}
|
|
1072
1059
|
return obj;
|
|
@@ -1378,7 +1365,7 @@ function toPromise(observable) {
|
|
|
1378
1365
|
observable.subscribe({
|
|
1379
1366
|
next: function (data) {
|
|
1380
1367
|
if (completed) {
|
|
1381
|
-
__DEV__ && invariant.warn(
|
|
1368
|
+
globalThis.__DEV__ !== false && invariant.warn(40);
|
|
1382
1369
|
}
|
|
1383
1370
|
else {
|
|
1384
1371
|
completed = true;
|
|
@@ -1421,7 +1408,7 @@ function validateOperation(operation) {
|
|
|
1421
1408
|
for (var _i = 0, _a = Object.keys(operation); _i < _a.length; _i++) {
|
|
1422
1409
|
var key = _a[_i];
|
|
1423
1410
|
if (OPERATION_FIELDS.indexOf(key) < 0) {
|
|
1424
|
-
throw newInvariantError(
|
|
1411
|
+
throw newInvariantError(41, key);
|
|
1425
1412
|
}
|
|
1426
1413
|
}
|
|
1427
1414
|
return operation;
|
|
@@ -1528,7 +1515,7 @@ var ApolloLink = (function () {
|
|
|
1528
1515
|
ApolloLink.concat = function (first, second) {
|
|
1529
1516
|
var firstLink = toLink(first);
|
|
1530
1517
|
if (isTerminating(firstLink)) {
|
|
1531
|
-
__DEV__ && invariant.warn(
|
|
1518
|
+
globalThis.__DEV__ !== false && invariant.warn(33, firstLink);
|
|
1532
1519
|
return firstLink;
|
|
1533
1520
|
}
|
|
1534
1521
|
var nextLink = toLink(second);
|
|
@@ -1552,7 +1539,7 @@ var ApolloLink = (function () {
|
|
|
1552
1539
|
return ApolloLink.concat(this, next);
|
|
1553
1540
|
};
|
|
1554
1541
|
ApolloLink.prototype.request = function (operation, forward) {
|
|
1555
|
-
throw newInvariantError(
|
|
1542
|
+
throw newInvariantError(34);
|
|
1556
1543
|
};
|
|
1557
1544
|
ApolloLink.prototype.onError = function (error, observer) {
|
|
1558
1545
|
if (observer && observer.error) {
|
|
@@ -1927,7 +1914,7 @@ var serializeFetchParameter = function (p, label) {
|
|
|
1927
1914
|
serialized = JSON.stringify(p);
|
|
1928
1915
|
}
|
|
1929
1916
|
catch (e) {
|
|
1930
|
-
var parseError = newInvariantError(
|
|
1917
|
+
var parseError = newInvariantError(37, label, e.message);
|
|
1931
1918
|
parseError.parseError = e;
|
|
1932
1919
|
throw parseError;
|
|
1933
1920
|
}
|
|
@@ -2010,7 +1997,7 @@ function removeDuplicateHeaders(headers, preserveHeaderCase) {
|
|
|
2010
1997
|
|
|
2011
1998
|
var checkFetcher = function (fetcher) {
|
|
2012
1999
|
if (!fetcher && typeof fetch === 'undefined') {
|
|
2013
|
-
throw newInvariantError(
|
|
2000
|
+
throw newInvariantError(35);
|
|
2014
2001
|
}
|
|
2015
2002
|
};
|
|
2016
2003
|
|
|
@@ -2082,7 +2069,7 @@ var backupFetch = maybe(function () { return fetch; });
|
|
|
2082
2069
|
var createHttpLink = function (linkOptions) {
|
|
2083
2070
|
if (linkOptions === void 0) { linkOptions = {}; }
|
|
2084
2071
|
var _a = linkOptions.uri, uri = _a === void 0 ? '/graphql' : _a, preferredFetch = linkOptions.fetch, _b = linkOptions.print, print = _b === void 0 ? defaultPrinter : _b, includeExtensions = linkOptions.includeExtensions, preserveHeaderCase = linkOptions.preserveHeaderCase, useGETForQueries = linkOptions.useGETForQueries, _c = linkOptions.includeUnusedVariables, includeUnusedVariables = _c === void 0 ? false : _c, requestOptions = tslib.__rest(linkOptions, ["uri", "fetch", "print", "includeExtensions", "preserveHeaderCase", "useGETForQueries", "includeUnusedVariables"]);
|
|
2085
|
-
if (__DEV__) {
|
|
2072
|
+
if (globalThis.__DEV__ !== false) {
|
|
2086
2073
|
checkFetcher(preferredFetch || backupFetch);
|
|
2087
2074
|
}
|
|
2088
2075
|
var linkConfig = {
|
|
@@ -2145,7 +2132,7 @@ var createHttpLink = function (linkOptions) {
|
|
|
2145
2132
|
options.headers = options.headers || {};
|
|
2146
2133
|
var acceptHeader = "multipart/mixed;";
|
|
2147
2134
|
if (isSubscription && hasDefer) {
|
|
2148
|
-
__DEV__ && invariant.warn(
|
|
2135
|
+
globalThis.__DEV__ !== false && invariant.warn(36);
|
|
2149
2136
|
}
|
|
2150
2137
|
if (isSubscription) {
|
|
2151
2138
|
acceptHeader += 'boundary=graphql;subscriptionSpec=1.0,application/json';
|
|
@@ -2897,7 +2884,7 @@ var ObjectCanon = (function () {
|
|
|
2897
2884
|
var node = this.pool.lookupArray(array);
|
|
2898
2885
|
if (!node.array) {
|
|
2899
2886
|
this.known.add(node.array = array);
|
|
2900
|
-
if (__DEV__) {
|
|
2887
|
+
if (globalThis.__DEV__ !== false) {
|
|
2901
2888
|
Object.freeze(array);
|
|
2902
2889
|
}
|
|
2903
2890
|
}
|
|
@@ -2922,7 +2909,7 @@ var ObjectCanon = (function () {
|
|
|
2922
2909
|
keys.sorted.forEach(function (key, i) {
|
|
2923
2910
|
obj_1[key] = array_1[firstValueIndex_1 + i];
|
|
2924
2911
|
});
|
|
2925
|
-
if (__DEV__) {
|
|
2912
|
+
if (globalThis.__DEV__ !== false) {
|
|
2926
2913
|
Object.freeze(obj_1);
|
|
2927
2914
|
}
|
|
2928
2915
|
}
|
|
@@ -3189,7 +3176,7 @@ var StoreReader = (function () {
|
|
|
3189
3176
|
context: context,
|
|
3190
3177
|
}), i);
|
|
3191
3178
|
}
|
|
3192
|
-
if (__DEV__) {
|
|
3179
|
+
if (globalThis.__DEV__ !== false) {
|
|
3193
3180
|
assertSelectionSetForIdValue(context.store, field, item);
|
|
3194
3181
|
}
|
|
3195
3182
|
return item;
|
|
@@ -3634,7 +3621,7 @@ var Policies = (function () {
|
|
|
3634
3621
|
if (supertypeSet.has(supertype)) {
|
|
3635
3622
|
if (!typenameSupertypeSet.has(supertype)) {
|
|
3636
3623
|
if (checkingFuzzySubtypes) {
|
|
3637
|
-
__DEV__ && invariant.warn(4, typename, supertype);
|
|
3624
|
+
globalThis.__DEV__ !== false && invariant.warn(4, typename, supertype);
|
|
3638
3625
|
}
|
|
3639
3626
|
typenameSupertypeSet.add(supertype);
|
|
3640
3627
|
}
|
|
@@ -3787,8 +3774,8 @@ function normalizeReadFieldOptions(readFieldArgs, objectOrReference, variables)
|
|
|
3787
3774
|
options.from = objectOrReference;
|
|
3788
3775
|
}
|
|
3789
3776
|
}
|
|
3790
|
-
if (__DEV__ && options.from === void 0) {
|
|
3791
|
-
__DEV__ && invariant.warn(5, stringifyForDisplay(Array.from(readFieldArgs)));
|
|
3777
|
+
if (globalThis.__DEV__ !== false && options.from === void 0) {
|
|
3778
|
+
globalThis.__DEV__ !== false && invariant.warn(5, stringifyForDisplay(Array.from(readFieldArgs)));
|
|
3792
3779
|
}
|
|
3793
3780
|
if (void 0 === options.variables) {
|
|
3794
3781
|
options.variables = variables;
|
|
@@ -3871,7 +3858,7 @@ var StoreWriter = (function () {
|
|
|
3871
3858
|
}
|
|
3872
3859
|
storeObject = applied;
|
|
3873
3860
|
}
|
|
3874
|
-
if (__DEV__ && !context.overwrite) {
|
|
3861
|
+
if (globalThis.__DEV__ !== false && !context.overwrite) {
|
|
3875
3862
|
var fieldsWithSelectionSets_1 = Object.create(null);
|
|
3876
3863
|
fieldNodeSet.forEach(function (field) {
|
|
3877
3864
|
if (field.selectionSet) {
|
|
@@ -3959,12 +3946,12 @@ var StoreWriter = (function () {
|
|
|
3959
3946
|
_a[storeFieldName] = incomingValue,
|
|
3960
3947
|
_a));
|
|
3961
3948
|
}
|
|
3962
|
-
else if (__DEV__ &&
|
|
3949
|
+
else if (globalThis.__DEV__ !== false &&
|
|
3963
3950
|
!context.clientOnly &&
|
|
3964
3951
|
!context.deferred &&
|
|
3965
3952
|
!addTypenameToDocument.added(field) &&
|
|
3966
3953
|
!policies.getReadFunction(typename, field.name.value)) {
|
|
3967
|
-
__DEV__ && invariant.error(10, resultKeyNameFromField(field), result);
|
|
3954
|
+
globalThis.__DEV__ !== false && invariant.error(10, resultKeyNameFromField(field), result);
|
|
3968
3955
|
}
|
|
3969
3956
|
});
|
|
3970
3957
|
try {
|
|
@@ -4013,7 +4000,7 @@ var StoreWriter = (function () {
|
|
|
4013
4000
|
StoreWriter.prototype.processFieldValue = function (value, field, context, mergeTree) {
|
|
4014
4001
|
var _this = this;
|
|
4015
4002
|
if (!field.selectionSet || value === null) {
|
|
4016
|
-
return __DEV__ ? cloneDeep(value) : value;
|
|
4003
|
+
return globalThis.__DEV__ !== false ? cloneDeep(value) : value;
|
|
4017
4004
|
}
|
|
4018
4005
|
if (isArray(value)) {
|
|
4019
4006
|
return value.map(function (item, i) {
|
|
@@ -4204,7 +4191,7 @@ function warnAboutDataLoss(existingRef, incomingObj, storeFieldName, store) {
|
|
|
4204
4191
|
}
|
|
4205
4192
|
});
|
|
4206
4193
|
}
|
|
4207
|
-
__DEV__ && invariant.warn(12, fieldName, parentType, childTypenames.length
|
|
4194
|
+
globalThis.__DEV__ !== false && invariant.warn(12, fieldName, parentType, childTypenames.length
|
|
4208
4195
|
? "either ensure all objects of type " + childTypenames.join(" and ") + " have an ID or a custom merge function, or "
|
|
4209
4196
|
: "", typeDotName, existing, incoming);
|
|
4210
4197
|
}
|
|
@@ -4364,7 +4351,7 @@ var InMemoryCache = (function (_super) {
|
|
|
4364
4351
|
return this.policies.identify(object)[0];
|
|
4365
4352
|
}
|
|
4366
4353
|
catch (e) {
|
|
4367
|
-
__DEV__ && invariant.warn(e);
|
|
4354
|
+
globalThis.__DEV__ !== false && invariant.warn(e);
|
|
4368
4355
|
}
|
|
4369
4356
|
};
|
|
4370
4357
|
InMemoryCache.prototype.evict = function (options) {
|
|
@@ -4527,10 +4514,11 @@ function isNetworkRequestSettled(networkStatus) {
|
|
|
4527
4514
|
function equalByQuery(query, _a, _b, variables) {
|
|
4528
4515
|
var aData = _a.data, aRest = tslib.__rest(_a, ["data"]);
|
|
4529
4516
|
var bData = _b.data, bRest = tslib.__rest(_b, ["data"]);
|
|
4530
|
-
return equal__default(aRest, bRest) &&
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4517
|
+
return (equal__default(aRest, bRest) &&
|
|
4518
|
+
equalBySelectionSet(getMainDefinition(query).selectionSet, aData, bData, {
|
|
4519
|
+
fragmentMap: createFragmentMap(getFragmentDefinitions(query)),
|
|
4520
|
+
variables: variables,
|
|
4521
|
+
}));
|
|
4534
4522
|
}
|
|
4535
4523
|
function equalBySelectionSet(selectionSet, aResult, bResult, context) {
|
|
4536
4524
|
if (aResult === bResult) {
|
|
@@ -4582,10 +4570,10 @@ function equalBySelectionSet(selectionSet, aResult, bResult, context) {
|
|
|
4582
4570
|
});
|
|
4583
4571
|
}
|
|
4584
4572
|
function selectionHasNonreactiveDirective(selection) {
|
|
4585
|
-
return !!selection.directives && selection.directives.some(directiveIsNonreactive);
|
|
4573
|
+
return (!!selection.directives && selection.directives.some(directiveIsNonreactive));
|
|
4586
4574
|
}
|
|
4587
4575
|
function directiveIsNonreactive(dir) {
|
|
4588
|
-
return dir.name.value ===
|
|
4576
|
+
return dir.name.value === 'nonreactive';
|
|
4589
4577
|
}
|
|
4590
4578
|
|
|
4591
4579
|
var assign = Object.assign, hasOwnProperty$2 = Object.hasOwnProperty;
|
|
@@ -4700,7 +4688,7 @@ var ObservableQuery = (function (_super) {
|
|
|
4700
4688
|
else {
|
|
4701
4689
|
result.partial = true;
|
|
4702
4690
|
}
|
|
4703
|
-
if (__DEV__ &&
|
|
4691
|
+
if (globalThis.__DEV__ !== false &&
|
|
4704
4692
|
!diff.complete &&
|
|
4705
4693
|
!this.options.partialRefetch &&
|
|
4706
4694
|
!result.loading &&
|
|
@@ -4760,12 +4748,12 @@ var ObservableQuery = (function (_super) {
|
|
|
4760
4748
|
else {
|
|
4761
4749
|
reobserveOptions.fetchPolicy = 'network-only';
|
|
4762
4750
|
}
|
|
4763
|
-
if (__DEV__ && variables && hasOwnProperty$2.call(variables, "variables")) {
|
|
4751
|
+
if (globalThis.__DEV__ !== false && variables && hasOwnProperty$2.call(variables, "variables")) {
|
|
4764
4752
|
var queryDef = getQueryDefinition(this.query);
|
|
4765
4753
|
var vars = queryDef.variableDefinitions;
|
|
4766
4754
|
if (!vars || !vars.some(function (v) { return v.variable.name.value === "variables"; })) {
|
|
4767
|
-
__DEV__ && invariant.warn(
|
|
4768
|
-
|
|
4755
|
+
globalThis.__DEV__ !== false && invariant.warn(
|
|
4756
|
+
18,
|
|
4769
4757
|
variables,
|
|
4770
4758
|
((_a = queryDef.name) === null || _a === void 0 ? void 0 : _a.value) || queryDef
|
|
4771
4759
|
);
|
|
@@ -4856,7 +4844,7 @@ var ObservableQuery = (function (_super) {
|
|
|
4856
4844
|
options.onError(err);
|
|
4857
4845
|
return;
|
|
4858
4846
|
}
|
|
4859
|
-
__DEV__ && invariant.error(
|
|
4847
|
+
globalThis.__DEV__ !== false && invariant.error(19, err);
|
|
4860
4848
|
},
|
|
4861
4849
|
});
|
|
4862
4850
|
this.subscriptions.add(subscription);
|
|
@@ -4869,6 +4857,10 @@ var ObservableQuery = (function (_super) {
|
|
|
4869
4857
|
ObservableQuery.prototype.setOptions = function (newOptions) {
|
|
4870
4858
|
return this.reobserve(newOptions);
|
|
4871
4859
|
};
|
|
4860
|
+
ObservableQuery.prototype.silentSetOptions = function (newOptions) {
|
|
4861
|
+
var mergedOptions = compact(this.options, newOptions || {});
|
|
4862
|
+
assign(this.options, mergedOptions);
|
|
4863
|
+
};
|
|
4872
4864
|
ObservableQuery.prototype.setVariables = function (variables) {
|
|
4873
4865
|
if (equal.equal(this.variables, variables)) {
|
|
4874
4866
|
return this.observers.size
|
|
@@ -4954,7 +4946,7 @@ var ObservableQuery = (function (_super) {
|
|
|
4954
4946
|
pollingInfo.interval === pollInterval) {
|
|
4955
4947
|
return;
|
|
4956
4948
|
}
|
|
4957
|
-
invariant(pollInterval,
|
|
4949
|
+
invariant(pollInterval, 20);
|
|
4958
4950
|
var info = pollingInfo || (this.pollingInfo = {});
|
|
4959
4951
|
info.interval = pollInterval;
|
|
4960
4952
|
var maybeFetch = function () {
|
|
@@ -5107,11 +5099,11 @@ function reobserveCacheFirst(obsQuery) {
|
|
|
5107
5099
|
return obsQuery.reobserve();
|
|
5108
5100
|
}
|
|
5109
5101
|
function defaultSubscriptionObserverErrorCallback(error) {
|
|
5110
|
-
__DEV__ && invariant.error(
|
|
5102
|
+
globalThis.__DEV__ !== false && invariant.error(21, error.message, error.stack);
|
|
5111
5103
|
}
|
|
5112
5104
|
function logMissingFieldErrors(missing) {
|
|
5113
|
-
if (__DEV__ && missing) {
|
|
5114
|
-
__DEV__ && invariant.debug(
|
|
5105
|
+
if (globalThis.__DEV__ !== false && missing) {
|
|
5106
|
+
globalThis.__DEV__ !== false && invariant.debug(22, missing);
|
|
5115
5107
|
}
|
|
5116
5108
|
}
|
|
5117
5109
|
function skipCacheDataFor(fetchPolicy) {
|
|
@@ -5293,7 +5285,7 @@ var LocalState = (function () {
|
|
|
5293
5285
|
}
|
|
5294
5286
|
else {
|
|
5295
5287
|
fragment = fragmentMap[selection.name.value];
|
|
5296
|
-
invariant(fragment,
|
|
5288
|
+
invariant(fragment, 16, selection.name.value);
|
|
5297
5289
|
}
|
|
5298
5290
|
if (fragment && fragment.typeCondition) {
|
|
5299
5291
|
typeCondition = fragment.typeCondition.name.value;
|
|
@@ -5406,7 +5398,7 @@ var LocalState = (function () {
|
|
|
5406
5398
|
},
|
|
5407
5399
|
FragmentSpread: function (spread, _, __, ___, ancestors) {
|
|
5408
5400
|
var fragment = fragmentMap[spread.name.value];
|
|
5409
|
-
invariant(fragment,
|
|
5401
|
+
invariant(fragment, 17, spread.name.value);
|
|
5410
5402
|
var fragmentSelections = collectByDefinition(fragment);
|
|
5411
5403
|
if (fragmentSelections.size > 0) {
|
|
5412
5404
|
ancestors.forEach(function (node) {
|
|
@@ -5743,7 +5735,7 @@ var QueryManager = (function () {
|
|
|
5743
5735
|
this.queries.forEach(function (_info, queryId) {
|
|
5744
5736
|
_this.stopQueryNoBroadcast(queryId);
|
|
5745
5737
|
});
|
|
5746
|
-
this.cancelPendingFetches(newInvariantError(
|
|
5738
|
+
this.cancelPendingFetches(newInvariantError(23));
|
|
5747
5739
|
};
|
|
5748
5740
|
QueryManager.prototype.cancelPendingFetches = function (error) {
|
|
5749
5741
|
this.fetchCancelFns.forEach(function (cancel) { return cancel(error); });
|
|
@@ -5757,9 +5749,9 @@ var QueryManager = (function () {
|
|
|
5757
5749
|
return tslib.__generator(this, function (_h) {
|
|
5758
5750
|
switch (_h.label) {
|
|
5759
5751
|
case 0:
|
|
5760
|
-
invariant(mutation,
|
|
5752
|
+
invariant(mutation, 24);
|
|
5761
5753
|
invariant(fetchPolicy === 'network-only' ||
|
|
5762
|
-
fetchPolicy === 'no-cache',
|
|
5754
|
+
fetchPolicy === 'no-cache', 25);
|
|
5763
5755
|
mutationId = this.generateMutationId();
|
|
5764
5756
|
mutation = this.cache.transformForLink(this.transform(mutation));
|
|
5765
5757
|
hasClientExports = this.getDocumentInfo(mutation).hasClientExports;
|
|
@@ -5995,7 +5987,7 @@ var QueryManager = (function () {
|
|
|
5995
5987
|
_this.markMutationResult(tslib.__assign(tslib.__assign({}, mutation), { result: { data: data } }), cache);
|
|
5996
5988
|
}
|
|
5997
5989
|
catch (error) {
|
|
5998
|
-
__DEV__ && invariant.error(error);
|
|
5990
|
+
globalThis.__DEV__ !== false && invariant.error(error);
|
|
5999
5991
|
}
|
|
6000
5992
|
}, mutation.mutationId);
|
|
6001
5993
|
};
|
|
@@ -6077,10 +6069,10 @@ var QueryManager = (function () {
|
|
|
6077
6069
|
QueryManager.prototype.query = function (options, queryId) {
|
|
6078
6070
|
var _this = this;
|
|
6079
6071
|
if (queryId === void 0) { queryId = this.generateQueryId(); }
|
|
6080
|
-
invariant(options.query,
|
|
6081
|
-
invariant(options.query.kind === 'Document',
|
|
6082
|
-
invariant(!options.returnPartialData,
|
|
6083
|
-
invariant(!options.pollInterval,
|
|
6072
|
+
invariant(options.query, 26);
|
|
6073
|
+
invariant(options.query.kind === 'Document', 27);
|
|
6074
|
+
invariant(!options.returnPartialData, 28);
|
|
6075
|
+
invariant(!options.pollInterval, 29);
|
|
6084
6076
|
return this.fetchQuery(queryId, tslib.__assign(tslib.__assign({}, options), { query: this.transform(options.query) })).finally(function () { return _this.stopQuery(queryId); });
|
|
6085
6077
|
};
|
|
6086
6078
|
QueryManager.prototype.generateQueryId = function () {
|
|
@@ -6105,7 +6097,7 @@ var QueryManager = (function () {
|
|
|
6105
6097
|
if (options === void 0) { options = {
|
|
6106
6098
|
discardWatches: true,
|
|
6107
6099
|
}; }
|
|
6108
|
-
this.cancelPendingFetches(newInvariantError(
|
|
6100
|
+
this.cancelPendingFetches(newInvariantError(30));
|
|
6109
6101
|
this.queries.forEach(function (queryInfo) {
|
|
6110
6102
|
if (queryInfo.observableQuery) {
|
|
6111
6103
|
queryInfo.networkStatus = exports.NetworkStatus.loading;
|
|
@@ -6178,10 +6170,10 @@ var QueryManager = (function () {
|
|
|
6178
6170
|
queries.set(queryId, oq);
|
|
6179
6171
|
});
|
|
6180
6172
|
}
|
|
6181
|
-
if (__DEV__ && queryNamesAndDocs.size) {
|
|
6173
|
+
if (globalThis.__DEV__ !== false && queryNamesAndDocs.size) {
|
|
6182
6174
|
queryNamesAndDocs.forEach(function (included, nameOrDoc) {
|
|
6183
6175
|
if (!included) {
|
|
6184
|
-
__DEV__ && invariant.warn(typeof nameOrDoc === "string" ?
|
|
6176
|
+
globalThis.__DEV__ !== false && invariant.warn(typeof nameOrDoc === "string" ? 31 : 32, nameOrDoc);
|
|
6185
6177
|
}
|
|
6186
6178
|
});
|
|
6187
6179
|
}
|
|
@@ -6497,7 +6489,7 @@ var QueryManager = (function () {
|
|
|
6497
6489
|
var resultsFromCache = function (diff, networkStatus) {
|
|
6498
6490
|
if (networkStatus === void 0) { networkStatus = queryInfo.networkStatus || exports.NetworkStatus.loading; }
|
|
6499
6491
|
var data = diff.result;
|
|
6500
|
-
if (__DEV__ &&
|
|
6492
|
+
if (globalThis.__DEV__ !== false &&
|
|
6501
6493
|
!returnPartialData &&
|
|
6502
6494
|
!equal.equal(data, {})) {
|
|
6503
6495
|
logMissingFieldErrors(diff.missing);
|
|
@@ -6600,7 +6592,7 @@ var ApolloClient = (function () {
|
|
|
6600
6592
|
}
|
|
6601
6593
|
var uri = options.uri, credentials = options.credentials, headers = options.headers, cache = options.cache, documentTransform = options.documentTransform, _a = options.ssrMode, ssrMode = _a === void 0 ? false : _a, _b = options.ssrForceFetchDelay, ssrForceFetchDelay = _b === void 0 ? 0 : _b, _c = options.connectToDevTools, connectToDevTools = _c === void 0 ? typeof window === 'object' &&
|
|
6602
6594
|
!window.__APOLLO_CLIENT__ &&
|
|
6603
|
-
__DEV__ : _c, _d = options.queryDeduplication, queryDeduplication = _d === void 0 ? true : _d, defaultOptions = options.defaultOptions, _e = options.assumeImmutableResults, assumeImmutableResults = _e === void 0 ? cache.assumeImmutableResults : _e, resolvers = options.resolvers, typeDefs = options.typeDefs, fragmentMatcher = options.fragmentMatcher, clientAwarenessName = options.name, clientAwarenessVersion = options.version;
|
|
6595
|
+
globalThis.__DEV__ !== false : _c, _d = options.queryDeduplication, queryDeduplication = _d === void 0 ? true : _d, defaultOptions = options.defaultOptions, _e = options.assumeImmutableResults, assumeImmutableResults = _e === void 0 ? cache.assumeImmutableResults : _e, resolvers = options.resolvers, typeDefs = options.typeDefs, fragmentMatcher = options.fragmentMatcher, clientAwarenessName = options.name, clientAwarenessVersion = options.version;
|
|
6604
6596
|
var link = options.link;
|
|
6605
6597
|
if (!link) {
|
|
6606
6598
|
link = uri
|
|
@@ -6624,7 +6616,7 @@ var ApolloClient = (function () {
|
|
|
6624
6616
|
if (connectToDevTools && typeof window === 'object') {
|
|
6625
6617
|
window.__APOLLO_CLIENT__ = this;
|
|
6626
6618
|
}
|
|
6627
|
-
if (!hasSuggestedDevtools && connectToDevTools && __DEV__) {
|
|
6619
|
+
if (!hasSuggestedDevtools && connectToDevTools && globalThis.__DEV__ !== false) {
|
|
6628
6620
|
hasSuggestedDevtools = true;
|
|
6629
6621
|
if (typeof window !== 'undefined' &&
|
|
6630
6622
|
window.document &&
|
|
@@ -6643,7 +6635,8 @@ var ApolloClient = (function () {
|
|
|
6643
6635
|
}
|
|
6644
6636
|
}
|
|
6645
6637
|
if (url) {
|
|
6646
|
-
__DEV__ && invariant.log(
|
|
6638
|
+
globalThis.__DEV__ !== false && invariant.log("Download the Apollo DevTools for a better development " +
|
|
6639
|
+
"experience: %s", url);
|
|
6647
6640
|
}
|
|
6648
6641
|
}
|
|
6649
6642
|
}
|
|
@@ -6706,7 +6699,7 @@ var ApolloClient = (function () {
|
|
|
6706
6699
|
if (this.defaultOptions.query) {
|
|
6707
6700
|
options = mergeOptions(this.defaultOptions.query, options);
|
|
6708
6701
|
}
|
|
6709
|
-
invariant(options.fetchPolicy !== 'cache-and-network',
|
|
6702
|
+
invariant(options.fetchPolicy !== 'cache-and-network', 14);
|
|
6710
6703
|
if (this.disableNetworkFetches && options.fetchPolicy === 'network-only') {
|
|
6711
6704
|
options = tslib.__assign(tslib.__assign({}, options), { fetchPolicy: 'cache-first' });
|
|
6712
6705
|
}
|
|
@@ -6795,7 +6788,7 @@ var ApolloClient = (function () {
|
|
|
6795
6788
|
result.queries = queries;
|
|
6796
6789
|
result.results = results;
|
|
6797
6790
|
result.catch(function (error) {
|
|
6798
|
-
__DEV__ && invariant.debug(
|
|
6791
|
+
globalThis.__DEV__ !== false && invariant.debug(15, error);
|
|
6799
6792
|
});
|
|
6800
6793
|
return result;
|
|
6801
6794
|
};
|
|
@@ -6831,16 +6824,23 @@ var contextKey = canUseSymbol
|
|
|
6831
6824
|
? Symbol.for('__APOLLO_CONTEXT__')
|
|
6832
6825
|
: '__APOLLO_CONTEXT__';
|
|
6833
6826
|
function getApolloContext() {
|
|
6834
|
-
invariant('createContext' in React__namespace,
|
|
6835
|
-
var contextStorage = global$1[contextKey] || (global$1[contextKey] =
|
|
6836
|
-
|
|
6827
|
+
invariant('createContext' in React__namespace, 43);
|
|
6828
|
+
var contextStorage = global$1[contextKey] || (global$1[contextKey] = new Map());
|
|
6829
|
+
var value = contextStorage.get(React__namespace.createContext);
|
|
6830
|
+
if (!value) {
|
|
6831
|
+
value = Object.assign(React__namespace.createContext({}), {
|
|
6832
|
+
displayName: 'ApolloContext',
|
|
6833
|
+
});
|
|
6834
|
+
contextStorage.set(React__namespace.createContext, value);
|
|
6835
|
+
}
|
|
6836
|
+
return value;
|
|
6837
6837
|
}
|
|
6838
6838
|
var resetApolloContext = getApolloContext;
|
|
6839
6839
|
|
|
6840
6840
|
var ApolloConsumer = function (props) {
|
|
6841
6841
|
var ApolloContext = getApolloContext();
|
|
6842
6842
|
return (React__namespace.createElement(ApolloContext.Consumer, null, function (context) {
|
|
6843
|
-
invariant(context && context.client,
|
|
6843
|
+
invariant(context && context.client, 42);
|
|
6844
6844
|
return props.children(context.client);
|
|
6845
6845
|
}));
|
|
6846
6846
|
};
|
|
@@ -6852,14 +6852,14 @@ var ApolloProvider = function (_a) {
|
|
|
6852
6852
|
var context = React__namespace.useMemo(function () {
|
|
6853
6853
|
return tslib.__assign(tslib.__assign({}, parentContext), { client: client || parentContext.client, suspenseCache: suspenseCache || parentContext.suspenseCache });
|
|
6854
6854
|
}, [parentContext, client, suspenseCache]);
|
|
6855
|
-
invariant(context.client,
|
|
6855
|
+
invariant(context.client, 44);
|
|
6856
6856
|
return (React__namespace.createElement(ApolloContext.Provider, { value: context }, children));
|
|
6857
6857
|
};
|
|
6858
6858
|
|
|
6859
6859
|
function useApolloClient(override) {
|
|
6860
|
-
var context =
|
|
6860
|
+
var context = React__namespace.useContext(getApolloContext());
|
|
6861
6861
|
var client = override || context.client;
|
|
6862
|
-
invariant(!!client,
|
|
6862
|
+
invariant(!!client, 47);
|
|
6863
6863
|
return client;
|
|
6864
6864
|
}
|
|
6865
6865
|
|
|
@@ -6868,11 +6868,11 @@ var uSESKey = "useSyncExternalStore";
|
|
|
6868
6868
|
var realHook$1 = React__namespace[uSESKey];
|
|
6869
6869
|
var useSyncExternalStore = realHook$1 || (function (subscribe, getSnapshot, getServerSnapshot) {
|
|
6870
6870
|
var value = getSnapshot();
|
|
6871
|
-
if (__DEV__ &&
|
|
6871
|
+
if (globalThis.__DEV__ !== false &&
|
|
6872
6872
|
!didWarnUncachedGetSnapshot &&
|
|
6873
6873
|
value !== getSnapshot()) {
|
|
6874
6874
|
didWarnUncachedGetSnapshot = true;
|
|
6875
|
-
__DEV__ && invariant.error(
|
|
6875
|
+
globalThis.__DEV__ !== false && invariant.error(57);
|
|
6876
6876
|
}
|
|
6877
6877
|
var _a = React__namespace.useState({ inst: { value: value, getSnapshot: getSnapshot } }), inst = _a[0].inst, forceUpdate = _a[1];
|
|
6878
6878
|
if (canUseLayoutEffect) {
|
|
@@ -6935,7 +6935,7 @@ function parser(document) {
|
|
|
6935
6935
|
if (cached)
|
|
6936
6936
|
return cached;
|
|
6937
6937
|
var variables, type, name;
|
|
6938
|
-
invariant(!!document && !!document.kind,
|
|
6938
|
+
invariant(!!document && !!document.kind, 58, document);
|
|
6939
6939
|
var fragments = [];
|
|
6940
6940
|
var queries = [];
|
|
6941
6941
|
var mutations = [];
|
|
@@ -6961,10 +6961,10 @@ function parser(document) {
|
|
|
6961
6961
|
}
|
|
6962
6962
|
}
|
|
6963
6963
|
invariant(!fragments.length ||
|
|
6964
|
-
(queries.length || mutations.length || subscriptions.length),
|
|
6964
|
+
(queries.length || mutations.length || subscriptions.length), 59);
|
|
6965
6965
|
invariant(
|
|
6966
6966
|
queries.length + mutations.length + subscriptions.length <= 1,
|
|
6967
|
-
|
|
6967
|
+
60,
|
|
6968
6968
|
document,
|
|
6969
6969
|
queries.length,
|
|
6970
6970
|
subscriptions.length,
|
|
@@ -6978,7 +6978,7 @@ function parser(document) {
|
|
|
6978
6978
|
: mutations.length
|
|
6979
6979
|
? mutations
|
|
6980
6980
|
: subscriptions;
|
|
6981
|
-
invariant(definitions.length === 1,
|
|
6981
|
+
invariant(definitions.length === 1, 61, document, definitions.length);
|
|
6982
6982
|
var definition = definitions[0];
|
|
6983
6983
|
variables = definition.variableDefinitions || [];
|
|
6984
6984
|
if (definition.name && definition.name.kind === 'Name') {
|
|
@@ -6997,7 +6997,7 @@ function verifyDocumentType(document, type) {
|
|
|
6997
6997
|
var usedOperationName = operationName(operation.type);
|
|
6998
6998
|
invariant(
|
|
6999
6999
|
operation.type === type,
|
|
7000
|
-
|
|
7000
|
+
62,
|
|
7001
7001
|
requiredOperationName,
|
|
7002
7002
|
requiredOperationName,
|
|
7003
7003
|
usedOperationName
|
|
@@ -7010,14 +7010,14 @@ function useQuery(query, options) {
|
|
|
7010
7010
|
return useInternalState(useApolloClient(options.client), query).useQuery(options);
|
|
7011
7011
|
}
|
|
7012
7012
|
function useInternalState(client, query) {
|
|
7013
|
-
var stateRef =
|
|
7013
|
+
var stateRef = React__namespace.useRef();
|
|
7014
7014
|
if (!stateRef.current ||
|
|
7015
7015
|
client !== stateRef.current.client ||
|
|
7016
7016
|
query !== stateRef.current.query) {
|
|
7017
7017
|
stateRef.current = new InternalState(client, query, stateRef.current);
|
|
7018
7018
|
}
|
|
7019
7019
|
var state = stateRef.current;
|
|
7020
|
-
var _a =
|
|
7020
|
+
var _a = React__namespace.useState(0); _a[0]; var setTick = _a[1];
|
|
7021
7021
|
state.forceUpdate = function () {
|
|
7022
7022
|
setTick(function (tick) { return tick + 1; });
|
|
7023
7023
|
};
|
|
@@ -7048,7 +7048,7 @@ var InternalState = (function () {
|
|
|
7048
7048
|
}
|
|
7049
7049
|
}
|
|
7050
7050
|
InternalState.prototype.forceUpdate = function () {
|
|
7051
|
-
__DEV__ && invariant.warn(
|
|
7051
|
+
globalThis.__DEV__ !== false && invariant.warn(48);
|
|
7052
7052
|
};
|
|
7053
7053
|
InternalState.prototype.executeQuery = function (options) {
|
|
7054
7054
|
var _this = this;
|
|
@@ -7078,10 +7078,10 @@ var InternalState = (function () {
|
|
|
7078
7078
|
};
|
|
7079
7079
|
InternalState.prototype.useQuery = function (options) {
|
|
7080
7080
|
var _this = this;
|
|
7081
|
-
this.renderPromises =
|
|
7081
|
+
this.renderPromises = React__namespace.useContext(getApolloContext()).renderPromises;
|
|
7082
7082
|
this.useOptions(options);
|
|
7083
7083
|
var obsQuery = this.useObservableQuery();
|
|
7084
|
-
var result = useSyncExternalStore(
|
|
7084
|
+
var result = useSyncExternalStore(React__namespace.useCallback(function () {
|
|
7085
7085
|
if (_this.renderPromises) {
|
|
7086
7086
|
return function () { };
|
|
7087
7087
|
}
|
|
@@ -7211,7 +7211,7 @@ var InternalState = (function () {
|
|
|
7211
7211
|
&& this.renderPromises.getSSRObservable(this.watchQueryOptions)
|
|
7212
7212
|
|| this.observable
|
|
7213
7213
|
|| this.client.watchQuery(this.getObsQueryOptions());
|
|
7214
|
-
this.obsQueryFields =
|
|
7214
|
+
this.obsQueryFields = React__namespace.useMemo(function () { return ({
|
|
7215
7215
|
refetch: obsQuery.refetch.bind(obsQuery),
|
|
7216
7216
|
reobserve: obsQuery.reobserve.bind(obsQuery),
|
|
7217
7217
|
fetchMore: obsQuery.fetchMore.bind(obsQuery),
|
|
@@ -7253,7 +7253,7 @@ var InternalState = (function () {
|
|
|
7253
7253
|
_this.onCompleted(result.data);
|
|
7254
7254
|
}
|
|
7255
7255
|
}).catch(function (error) {
|
|
7256
|
-
__DEV__ && invariant.warn(error);
|
|
7256
|
+
globalThis.__DEV__ !== false && invariant.warn(error);
|
|
7257
7257
|
});
|
|
7258
7258
|
}
|
|
7259
7259
|
};
|
|
@@ -7305,9 +7305,9 @@ var EAGER_METHODS = [
|
|
|
7305
7305
|
];
|
|
7306
7306
|
function useLazyQuery(query, options) {
|
|
7307
7307
|
var _a;
|
|
7308
|
-
var execOptionsRef =
|
|
7309
|
-
var optionsRef =
|
|
7310
|
-
var queryRef =
|
|
7308
|
+
var execOptionsRef = React__namespace.useRef();
|
|
7309
|
+
var optionsRef = React__namespace.useRef();
|
|
7310
|
+
var queryRef = React__namespace.useRef();
|
|
7311
7311
|
var merged = mergeOptions(options, execOptionsRef.current || {});
|
|
7312
7312
|
var document = (_a = merged === null || merged === void 0 ? void 0 : merged.query) !== null && _a !== void 0 ? _a : query;
|
|
7313
7313
|
optionsRef.current = merged;
|
|
@@ -7319,7 +7319,7 @@ function useLazyQuery(query, options) {
|
|
|
7319
7319
|
var result = Object.assign(useQueryResult, {
|
|
7320
7320
|
called: !!execOptionsRef.current,
|
|
7321
7321
|
});
|
|
7322
|
-
var eagerMethods =
|
|
7322
|
+
var eagerMethods = React__namespace.useMemo(function () {
|
|
7323
7323
|
var eagerMethods = {};
|
|
7324
7324
|
var _loop_1 = function (key) {
|
|
7325
7325
|
var method = result[key];
|
|
@@ -7338,7 +7338,7 @@ function useLazyQuery(query, options) {
|
|
|
7338
7338
|
return eagerMethods;
|
|
7339
7339
|
}, []);
|
|
7340
7340
|
Object.assign(result, eagerMethods);
|
|
7341
|
-
var execute =
|
|
7341
|
+
var execute = React__namespace.useCallback(function (executeOptions) {
|
|
7342
7342
|
execOptionsRef.current = executeOptions ? tslib.__assign(tslib.__assign({}, executeOptions), { fetchPolicy: executeOptions.fetchPolicy || initialFetchPolicy }) : {
|
|
7343
7343
|
fetchPolicy: initialFetchPolicy,
|
|
7344
7344
|
};
|
|
@@ -7355,12 +7355,12 @@ function useLazyQuery(query, options) {
|
|
|
7355
7355
|
function useMutation(mutation, options) {
|
|
7356
7356
|
var client = useApolloClient(options === null || options === void 0 ? void 0 : options.client);
|
|
7357
7357
|
verifyDocumentType(mutation, exports.DocumentType.Mutation);
|
|
7358
|
-
var _a =
|
|
7358
|
+
var _a = React__namespace.useState({
|
|
7359
7359
|
called: false,
|
|
7360
7360
|
loading: false,
|
|
7361
7361
|
client: client,
|
|
7362
7362
|
}), result = _a[0], setResult = _a[1];
|
|
7363
|
-
var ref =
|
|
7363
|
+
var ref = React__namespace.useRef({
|
|
7364
7364
|
result: result,
|
|
7365
7365
|
mutationId: 0,
|
|
7366
7366
|
isMounted: true,
|
|
@@ -7371,7 +7371,7 @@ function useMutation(mutation, options) {
|
|
|
7371
7371
|
{
|
|
7372
7372
|
Object.assign(ref.current, { client: client, options: options, mutation: mutation });
|
|
7373
7373
|
}
|
|
7374
|
-
var execute =
|
|
7374
|
+
var execute = React__namespace.useCallback(function (executeOptions) {
|
|
7375
7375
|
if (executeOptions === void 0) { executeOptions = {}; }
|
|
7376
7376
|
var _a = ref.current, options = _a.options, mutation = _a.mutation;
|
|
7377
7377
|
var baseOptions = tslib.__assign(tslib.__assign({}, options), { mutation: mutation });
|
|
@@ -7432,12 +7432,12 @@ function useMutation(mutation, options) {
|
|
|
7432
7432
|
throw error;
|
|
7433
7433
|
});
|
|
7434
7434
|
}, []);
|
|
7435
|
-
var reset =
|
|
7435
|
+
var reset = React__namespace.useCallback(function () {
|
|
7436
7436
|
if (ref.current.isMounted) {
|
|
7437
7437
|
setResult({ called: false, loading: false, client: client });
|
|
7438
7438
|
}
|
|
7439
7439
|
}, []);
|
|
7440
|
-
|
|
7440
|
+
React__namespace.useEffect(function () {
|
|
7441
7441
|
ref.current.isMounted = true;
|
|
7442
7442
|
return function () {
|
|
7443
7443
|
ref.current.isMounted = false;
|
|
@@ -7447,10 +7447,10 @@ function useMutation(mutation, options) {
|
|
|
7447
7447
|
}
|
|
7448
7448
|
|
|
7449
7449
|
function useSubscription(subscription, options) {
|
|
7450
|
-
var hasIssuedDeprecationWarningRef =
|
|
7450
|
+
var hasIssuedDeprecationWarningRef = React__namespace.useRef(false);
|
|
7451
7451
|
var client = useApolloClient(options === null || options === void 0 ? void 0 : options.client);
|
|
7452
7452
|
verifyDocumentType(subscription, exports.DocumentType.Subscription);
|
|
7453
|
-
var _a =
|
|
7453
|
+
var _a = React__namespace.useState({
|
|
7454
7454
|
loading: !(options === null || options === void 0 ? void 0 : options.skip),
|
|
7455
7455
|
error: void 0,
|
|
7456
7456
|
data: void 0,
|
|
@@ -7459,13 +7459,13 @@ function useSubscription(subscription, options) {
|
|
|
7459
7459
|
if (!hasIssuedDeprecationWarningRef.current) {
|
|
7460
7460
|
hasIssuedDeprecationWarningRef.current = true;
|
|
7461
7461
|
if (options === null || options === void 0 ? void 0 : options.onSubscriptionData) {
|
|
7462
|
-
__DEV__ && invariant.warn(options.onData ?
|
|
7462
|
+
globalThis.__DEV__ !== false && invariant.warn(options.onData ? 50 : 51);
|
|
7463
7463
|
}
|
|
7464
7464
|
if (options === null || options === void 0 ? void 0 : options.onSubscriptionComplete) {
|
|
7465
|
-
__DEV__ && invariant.warn(options.onComplete ?
|
|
7465
|
+
globalThis.__DEV__ !== false && invariant.warn(options.onComplete ? 52 : 53);
|
|
7466
7466
|
}
|
|
7467
7467
|
}
|
|
7468
|
-
var _b =
|
|
7468
|
+
var _b = React__namespace.useState(function () {
|
|
7469
7469
|
if (options === null || options === void 0 ? void 0 : options.skip) {
|
|
7470
7470
|
return null;
|
|
7471
7471
|
}
|
|
@@ -7476,14 +7476,14 @@ function useSubscription(subscription, options) {
|
|
|
7476
7476
|
context: options === null || options === void 0 ? void 0 : options.context,
|
|
7477
7477
|
});
|
|
7478
7478
|
}), observable = _b[0], setObservable = _b[1];
|
|
7479
|
-
var canResetObservableRef =
|
|
7480
|
-
|
|
7479
|
+
var canResetObservableRef = React__namespace.useRef(false);
|
|
7480
|
+
React__namespace.useEffect(function () {
|
|
7481
7481
|
return function () {
|
|
7482
7482
|
canResetObservableRef.current = true;
|
|
7483
7483
|
};
|
|
7484
7484
|
}, []);
|
|
7485
|
-
var ref =
|
|
7486
|
-
|
|
7485
|
+
var ref = React__namespace.useRef({ client: client, subscription: subscription, options: options });
|
|
7486
|
+
React__namespace.useEffect(function () {
|
|
7487
7487
|
var _a, _b, _c, _d;
|
|
7488
7488
|
var shouldResubscribe = options === null || options === void 0 ? void 0 : options.shouldResubscribe;
|
|
7489
7489
|
if (typeof shouldResubscribe === 'function') {
|
|
@@ -7524,7 +7524,7 @@ function useSubscription(subscription, options) {
|
|
|
7524
7524
|
}
|
|
7525
7525
|
Object.assign(ref.current, { client: client, subscription: subscription, options: options });
|
|
7526
7526
|
}, [client, subscription, options, canResetObservableRef.current]);
|
|
7527
|
-
|
|
7527
|
+
React__namespace.useEffect(function () {
|
|
7528
7528
|
if (!observable) {
|
|
7529
7529
|
return;
|
|
7530
7530
|
}
|
|
@@ -7591,8 +7591,8 @@ function useSubscription(subscription, options) {
|
|
|
7591
7591
|
|
|
7592
7592
|
function useReactiveVar(rv) {
|
|
7593
7593
|
var value = rv();
|
|
7594
|
-
var setValue =
|
|
7595
|
-
|
|
7594
|
+
var setValue = React__namespace.useState(value)[1];
|
|
7595
|
+
React__namespace.useEffect(function () {
|
|
7596
7596
|
var probablySameValue = rv();
|
|
7597
7597
|
if (value !== probablySameValue) {
|
|
7598
7598
|
setValue(probablySameValue);
|
|
@@ -7608,7 +7608,7 @@ function useFragment(options) {
|
|
|
7608
7608
|
var cache = useApolloClient().cache;
|
|
7609
7609
|
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"]);
|
|
7610
7610
|
var diffOptions = tslib.__assign(tslib.__assign({}, rest), { returnPartialData: true, id: typeof from === "string" ? from : cache.identify(from), query: cache["getFragmentDoc"](fragment, fragmentName), optimistic: optimistic });
|
|
7611
|
-
var resultRef =
|
|
7611
|
+
var resultRef = React__namespace.useRef();
|
|
7612
7612
|
var latestDiff = cache.diff(diffOptions);
|
|
7613
7613
|
var getSnapshot = function () {
|
|
7614
7614
|
var latestDiffToResult = diffToResult(latestDiff);
|
|
@@ -7638,25 +7638,15 @@ function diffToResult(diff) {
|
|
|
7638
7638
|
}
|
|
7639
7639
|
|
|
7640
7640
|
function useDeepMemo(memoFn, deps) {
|
|
7641
|
-
var ref =
|
|
7641
|
+
var ref = React__namespace.useRef();
|
|
7642
7642
|
if (!ref.current || !equal.equal(ref.current.deps, deps)) {
|
|
7643
7643
|
ref.current = { value: memoFn(), deps: deps };
|
|
7644
7644
|
}
|
|
7645
7645
|
return ref.current.value;
|
|
7646
7646
|
}
|
|
7647
7647
|
|
|
7648
|
-
function useStrictModeSafeCleanupEffect(cleanup) {
|
|
7649
|
-
var timeout;
|
|
7650
|
-
React.useEffect(function () {
|
|
7651
|
-
clearTimeout(timeout);
|
|
7652
|
-
return function () {
|
|
7653
|
-
timeout = setTimeout(cleanup);
|
|
7654
|
-
};
|
|
7655
|
-
}, []);
|
|
7656
|
-
}
|
|
7657
|
-
|
|
7658
7648
|
var useKey = 'use';
|
|
7659
|
-
var realHook =
|
|
7649
|
+
var realHook = React__namespace[useKey];
|
|
7660
7650
|
var __use = realHook ||
|
|
7661
7651
|
function __use(promise) {
|
|
7662
7652
|
var statefulPromise = wrapPromiseWithState(promise);
|
|
@@ -7671,9 +7661,9 @@ var __use = realHook ||
|
|
|
7671
7661
|
};
|
|
7672
7662
|
|
|
7673
7663
|
function useSuspenseCache(override) {
|
|
7674
|
-
var context =
|
|
7664
|
+
var context = React__namespace.useContext(getApolloContext());
|
|
7675
7665
|
var suspenseCache = override || context.suspenseCache;
|
|
7676
|
-
invariant(suspenseCache,
|
|
7666
|
+
invariant(suspenseCache, 54);
|
|
7677
7667
|
return suspenseCache;
|
|
7678
7668
|
}
|
|
7679
7669
|
|
|
@@ -7688,26 +7678,29 @@ function useSuspenseQuery(query, options) {
|
|
|
7688
7678
|
var queryRef = suspenseCache.getQueryRef(cacheKey, function () {
|
|
7689
7679
|
return client.watchQuery(watchQueryOptions);
|
|
7690
7680
|
});
|
|
7691
|
-
var
|
|
7692
|
-
var _b = React.useState(function () { return new Map([[queryRef.key, queryRef.promise]]); }), promiseCache = _b[0], setPromiseCache = _b[1];
|
|
7681
|
+
var _b = React__namespace.useState(function () { return new Map([[queryRef.key, queryRef.promise]]); }), promiseCache = _b[0], setPromiseCache = _b[1];
|
|
7693
7682
|
var promise = promiseCache.get(queryRef.key);
|
|
7694
|
-
if (
|
|
7695
|
-
promise = queryRef.
|
|
7683
|
+
if (queryRef.didChangeOptions(watchQueryOptions)) {
|
|
7684
|
+
promise = queryRef.applyOptions(watchQueryOptions);
|
|
7696
7685
|
promiseCache.set(queryRef.key, promise);
|
|
7697
7686
|
}
|
|
7698
7687
|
if (!promise) {
|
|
7699
7688
|
promise = queryRef.promise;
|
|
7700
7689
|
promiseCache.set(queryRef.key, promise);
|
|
7701
7690
|
}
|
|
7702
|
-
|
|
7703
|
-
|
|
7704
|
-
|
|
7691
|
+
React__namespace.useEffect(function () {
|
|
7692
|
+
var dispose = queryRef.retain();
|
|
7693
|
+
var removeListener = queryRef.listen(function (promise) {
|
|
7705
7694
|
setPromiseCache(function (promiseCache) {
|
|
7706
7695
|
return new Map(promiseCache).set(queryRef.key, promise);
|
|
7707
7696
|
});
|
|
7708
7697
|
});
|
|
7698
|
+
return function () {
|
|
7699
|
+
removeListener();
|
|
7700
|
+
dispose();
|
|
7701
|
+
};
|
|
7709
7702
|
}, [queryRef]);
|
|
7710
|
-
var skipResult =
|
|
7703
|
+
var skipResult = React__namespace.useMemo(function () {
|
|
7711
7704
|
var error = toApolloError(queryRef.result);
|
|
7712
7705
|
return {
|
|
7713
7706
|
loading: false,
|
|
@@ -7716,23 +7709,23 @@ function useSuspenseQuery(query, options) {
|
|
|
7716
7709
|
error: error,
|
|
7717
7710
|
};
|
|
7718
7711
|
}, [queryRef.result]);
|
|
7719
|
-
var result =
|
|
7720
|
-
var fetchMore =
|
|
7712
|
+
var result = fetchPolicy === 'standby' ? skipResult : __use(promise);
|
|
7713
|
+
var fetchMore = React__namespace.useCallback(function (options) {
|
|
7721
7714
|
var promise = queryRef.fetchMore(options);
|
|
7722
7715
|
setPromiseCache(function (previousPromiseCache) {
|
|
7723
|
-
return new Map(previousPromiseCache).set(queryRef.key, promise);
|
|
7716
|
+
return new Map(previousPromiseCache).set(queryRef.key, queryRef.promise);
|
|
7724
7717
|
});
|
|
7725
7718
|
return promise;
|
|
7726
7719
|
}, [queryRef]);
|
|
7727
|
-
var refetch =
|
|
7720
|
+
var refetch = React__namespace.useCallback(function (variables) {
|
|
7728
7721
|
var promise = queryRef.refetch(variables);
|
|
7729
7722
|
setPromiseCache(function (previousPromiseCache) {
|
|
7730
|
-
return new Map(previousPromiseCache).set(queryRef.key, promise);
|
|
7723
|
+
return new Map(previousPromiseCache).set(queryRef.key, queryRef.promise);
|
|
7731
7724
|
});
|
|
7732
7725
|
return promise;
|
|
7733
7726
|
}, [queryRef]);
|
|
7734
|
-
var subscribeToMore =
|
|
7735
|
-
return
|
|
7727
|
+
var subscribeToMore = React__namespace.useCallback(function (options) { return queryRef.observable.subscribeToMore(options); }, [queryRef]);
|
|
7728
|
+
return React__namespace.useMemo(function () {
|
|
7736
7729
|
return {
|
|
7737
7730
|
client: client,
|
|
7738
7731
|
data: result.data,
|
|
@@ -7758,11 +7751,11 @@ function validateFetchPolicy(fetchPolicy) {
|
|
|
7758
7751
|
'no-cache',
|
|
7759
7752
|
'cache-and-network',
|
|
7760
7753
|
];
|
|
7761
|
-
invariant(supportedFetchPolicies.includes(fetchPolicy),
|
|
7754
|
+
invariant(supportedFetchPolicies.includes(fetchPolicy), 55, fetchPolicy);
|
|
7762
7755
|
}
|
|
7763
7756
|
function validatePartialDataReturn(fetchPolicy, returnPartialData) {
|
|
7764
7757
|
if (fetchPolicy === 'no-cache' && returnPartialData) {
|
|
7765
|
-
__DEV__ && invariant.warn(
|
|
7758
|
+
globalThis.__DEV__ !== false && invariant.warn(56);
|
|
7766
7759
|
}
|
|
7767
7760
|
}
|
|
7768
7761
|
function toApolloError(result) {
|
|
@@ -7770,13 +7763,6 @@ function toApolloError(result) {
|
|
|
7770
7763
|
? new ApolloError({ graphQLErrors: result.errors })
|
|
7771
7764
|
: result.error;
|
|
7772
7765
|
}
|
|
7773
|
-
function useTrackedQueryRefs(queryRef) {
|
|
7774
|
-
var trackedQueryRefs = React.useRef(new Set());
|
|
7775
|
-
trackedQueryRefs.current.add(queryRef);
|
|
7776
|
-
useStrictModeSafeCleanupEffect(function () {
|
|
7777
|
-
trackedQueryRefs.current.forEach(function (sub) { return sub.dispose(); });
|
|
7778
|
-
});
|
|
7779
|
-
}
|
|
7780
7766
|
function useWatchQueryOptions(_a) {
|
|
7781
7767
|
var client = _a.client, query = _a.query, options = _a.options;
|
|
7782
7768
|
return useDeepMemo(function () {
|
|
@@ -7785,7 +7771,7 @@ function useWatchQueryOptions(_a) {
|
|
|
7785
7771
|
((_a = client.defaultOptions.watchQuery) === null || _a === void 0 ? void 0 : _a.fetchPolicy) ||
|
|
7786
7772
|
'cache-first';
|
|
7787
7773
|
var watchQueryOptions = tslib.__assign(tslib.__assign({}, options), { fetchPolicy: fetchPolicy, query: query, notifyOnNetworkStatusChange: false, nextFetchPolicy: void 0 });
|
|
7788
|
-
if (__DEV__) {
|
|
7774
|
+
if (globalThis.__DEV__ !== false) {
|
|
7789
7775
|
validateOptions(watchQueryOptions);
|
|
7790
7776
|
}
|
|
7791
7777
|
if (options.skip) {
|
|
@@ -7796,16 +7782,25 @@ function useWatchQueryOptions(_a) {
|
|
|
7796
7782
|
}
|
|
7797
7783
|
|
|
7798
7784
|
var QUERY_REFERENCE_SYMBOL = Symbol();
|
|
7785
|
+
var OBSERVED_CHANGED_OPTIONS = [
|
|
7786
|
+
'canonizeResults',
|
|
7787
|
+
'context',
|
|
7788
|
+
'errorPolicy',
|
|
7789
|
+
'fetchPolicy',
|
|
7790
|
+
'refetchWritePolicy',
|
|
7791
|
+
'returnPartialData',
|
|
7792
|
+
];
|
|
7799
7793
|
var InternalQueryReference = (function () {
|
|
7800
7794
|
function InternalQueryReference(observable, options) {
|
|
7801
7795
|
var _this = this;
|
|
7802
7796
|
var _a;
|
|
7803
7797
|
this.listeners = new Set();
|
|
7804
|
-
this.
|
|
7805
|
-
this.
|
|
7798
|
+
this.status = 'loading';
|
|
7799
|
+
this.references = 0;
|
|
7806
7800
|
this.listen = this.listen.bind(this);
|
|
7807
7801
|
this.handleNext = this.handleNext.bind(this);
|
|
7808
7802
|
this.handleError = this.handleError.bind(this);
|
|
7803
|
+
this.initiateFetch = this.initiateFetch.bind(this);
|
|
7809
7804
|
this.dispose = this.dispose.bind(this);
|
|
7810
7805
|
this.observable = observable;
|
|
7811
7806
|
this.result = observable.getCurrentResult(false);
|
|
@@ -7815,21 +7810,25 @@ var InternalQueryReference = (function () {
|
|
|
7815
7810
|
}
|
|
7816
7811
|
if (isNetworkRequestSettled(this.result.networkStatus) ||
|
|
7817
7812
|
(this.result.data &&
|
|
7818
|
-
(!this.result.partial || this.
|
|
7813
|
+
(!this.result.partial || this.watchQueryOptions.returnPartialData))) {
|
|
7819
7814
|
this.promise = createFulfilledPromise(this.result);
|
|
7820
|
-
this.
|
|
7821
|
-
this.refetching = false;
|
|
7815
|
+
this.status = 'idle';
|
|
7822
7816
|
}
|
|
7823
|
-
|
|
7824
|
-
next: this.handleNext,
|
|
7825
|
-
error: this.handleError,
|
|
7826
|
-
});
|
|
7827
|
-
if (!this.promise) {
|
|
7817
|
+
else {
|
|
7828
7818
|
this.promise = new Promise(function (resolve, reject) {
|
|
7829
7819
|
_this.resolve = resolve;
|
|
7830
7820
|
_this.reject = reject;
|
|
7831
7821
|
});
|
|
7832
7822
|
}
|
|
7823
|
+
this.subscription = observable
|
|
7824
|
+
.filter(function (_a) {
|
|
7825
|
+
var data = _a.data;
|
|
7826
|
+
return !equal.equal(data, {});
|
|
7827
|
+
})
|
|
7828
|
+
.subscribe({
|
|
7829
|
+
next: this.handleNext,
|
|
7830
|
+
error: this.handleError,
|
|
7831
|
+
});
|
|
7833
7832
|
this.autoDisposeTimeoutId = setTimeout(this.dispose, (_a = options.autoDisposeTimeoutMs) !== null && _a !== void 0 ? _a : 30000);
|
|
7834
7833
|
}
|
|
7835
7834
|
Object.defineProperty(InternalQueryReference.prototype, "watchQueryOptions", {
|
|
@@ -7839,28 +7838,61 @@ var InternalQueryReference = (function () {
|
|
|
7839
7838
|
enumerable: false,
|
|
7840
7839
|
configurable: true
|
|
7841
7840
|
});
|
|
7842
|
-
InternalQueryReference.prototype.
|
|
7841
|
+
InternalQueryReference.prototype.retain = function () {
|
|
7843
7842
|
var _this = this;
|
|
7843
|
+
this.references++;
|
|
7844
7844
|
clearTimeout(this.autoDisposeTimeoutId);
|
|
7845
|
+
var disposed = false;
|
|
7846
|
+
return function () {
|
|
7847
|
+
if (disposed) {
|
|
7848
|
+
return;
|
|
7849
|
+
}
|
|
7850
|
+
disposed = true;
|
|
7851
|
+
_this.references--;
|
|
7852
|
+
setTimeout(function () {
|
|
7853
|
+
if (!_this.references) {
|
|
7854
|
+
_this.dispose();
|
|
7855
|
+
}
|
|
7856
|
+
});
|
|
7857
|
+
};
|
|
7858
|
+
};
|
|
7859
|
+
InternalQueryReference.prototype.didChangeOptions = function (watchQueryOptions) {
|
|
7860
|
+
var _this = this;
|
|
7861
|
+
return OBSERVED_CHANGED_OPTIONS.some(function (option) {
|
|
7862
|
+
return !equal.equal(_this.watchQueryOptions[option], watchQueryOptions[option]);
|
|
7863
|
+
});
|
|
7864
|
+
};
|
|
7865
|
+
InternalQueryReference.prototype.applyOptions = function (watchQueryOptions) {
|
|
7866
|
+
var _a = this.watchQueryOptions, currentFetchPolicy = _a.fetchPolicy, currentCanonizeResults = _a.canonizeResults;
|
|
7867
|
+
if (currentFetchPolicy === 'standby' &&
|
|
7868
|
+
currentFetchPolicy !== watchQueryOptions.fetchPolicy) {
|
|
7869
|
+
this.observable.reobserve(watchQueryOptions);
|
|
7870
|
+
this.initiateFetch();
|
|
7871
|
+
}
|
|
7872
|
+
else {
|
|
7873
|
+
this.observable.silentSetOptions(watchQueryOptions);
|
|
7874
|
+
if (currentCanonizeResults !== watchQueryOptions.canonizeResults) {
|
|
7875
|
+
this.result = tslib.__assign(tslib.__assign({}, this.result), this.observable.getCurrentResult());
|
|
7876
|
+
this.promise = createFulfilledPromise(this.result);
|
|
7877
|
+
}
|
|
7878
|
+
}
|
|
7879
|
+
return this.promise;
|
|
7880
|
+
};
|
|
7881
|
+
InternalQueryReference.prototype.listen = function (listener) {
|
|
7882
|
+
var _this = this;
|
|
7845
7883
|
this.listeners.add(listener);
|
|
7846
7884
|
return function () {
|
|
7847
7885
|
_this.listeners.delete(listener);
|
|
7848
7886
|
};
|
|
7849
7887
|
};
|
|
7850
7888
|
InternalQueryReference.prototype.refetch = function (variables) {
|
|
7851
|
-
this.refetching = true;
|
|
7852
7889
|
var promise = this.observable.refetch(variables);
|
|
7853
|
-
this.
|
|
7890
|
+
this.initiateFetch();
|
|
7854
7891
|
return promise;
|
|
7855
7892
|
};
|
|
7856
7893
|
InternalQueryReference.prototype.fetchMore = function (options) {
|
|
7857
7894
|
var promise = this.observable.fetchMore(options);
|
|
7858
|
-
this.
|
|
7859
|
-
return promise;
|
|
7860
|
-
};
|
|
7861
|
-
InternalQueryReference.prototype.reobserve = function (watchQueryOptions) {
|
|
7862
|
-
var promise = this.observable.reobserve(watchQueryOptions);
|
|
7863
|
-
this.promise = promise;
|
|
7895
|
+
this.initiateFetch();
|
|
7864
7896
|
return promise;
|
|
7865
7897
|
};
|
|
7866
7898
|
InternalQueryReference.prototype.dispose = function () {
|
|
@@ -7870,48 +7902,57 @@ var InternalQueryReference = (function () {
|
|
|
7870
7902
|
InternalQueryReference.prototype.onDispose = function () {
|
|
7871
7903
|
};
|
|
7872
7904
|
InternalQueryReference.prototype.handleNext = function (result) {
|
|
7873
|
-
|
|
7874
|
-
|
|
7875
|
-
|
|
7876
|
-
|
|
7877
|
-
|
|
7878
|
-
|
|
7905
|
+
var _a;
|
|
7906
|
+
switch (this.status) {
|
|
7907
|
+
case 'loading': {
|
|
7908
|
+
if (result.data === void 0) {
|
|
7909
|
+
result.data = this.result.data;
|
|
7910
|
+
}
|
|
7911
|
+
this.status = 'idle';
|
|
7912
|
+
this.result = result;
|
|
7913
|
+
(_a = this.resolve) === null || _a === void 0 ? void 0 : _a.call(this, result);
|
|
7914
|
+
break;
|
|
7879
7915
|
}
|
|
7880
|
-
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
7916
|
+
case 'idle': {
|
|
7917
|
+
if (result.data === this.result.data) {
|
|
7918
|
+
return;
|
|
7919
|
+
}
|
|
7920
|
+
if (result.data === void 0) {
|
|
7921
|
+
result.data = this.result.data;
|
|
7922
|
+
}
|
|
7923
|
+
this.result = result;
|
|
7924
|
+
this.promise = createFulfilledPromise(result);
|
|
7925
|
+
this.deliver(this.promise);
|
|
7926
|
+
break;
|
|
7885
7927
|
}
|
|
7886
|
-
return;
|
|
7887
|
-
}
|
|
7888
|
-
if (result.data === this.result.data) {
|
|
7889
|
-
return;
|
|
7890
7928
|
}
|
|
7891
|
-
this.result = result;
|
|
7892
|
-
this.promise = createFulfilledPromise(result);
|
|
7893
|
-
this.deliver(this.promise);
|
|
7894
7929
|
};
|
|
7895
7930
|
InternalQueryReference.prototype.handleError = function (error) {
|
|
7896
|
-
var
|
|
7897
|
-
this.
|
|
7898
|
-
|
|
7899
|
-
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
|
|
7931
|
+
var _a;
|
|
7932
|
+
switch (this.status) {
|
|
7933
|
+
case 'loading': {
|
|
7934
|
+
this.status = 'idle';
|
|
7935
|
+
(_a = this.reject) === null || _a === void 0 ? void 0 : _a.call(this, error);
|
|
7936
|
+
break;
|
|
7937
|
+
}
|
|
7938
|
+
case 'idle': {
|
|
7939
|
+
this.promise = createRejectedPromise(error);
|
|
7940
|
+
this.deliver(this.promise);
|
|
7903
7941
|
}
|
|
7904
|
-
return;
|
|
7905
7942
|
}
|
|
7906
|
-
this.result = result;
|
|
7907
|
-
this.promise = result.data
|
|
7908
|
-
? createFulfilledPromise(result)
|
|
7909
|
-
: createRejectedPromise(result);
|
|
7910
|
-
this.deliver(this.promise);
|
|
7911
7943
|
};
|
|
7912
7944
|
InternalQueryReference.prototype.deliver = function (promise) {
|
|
7913
7945
|
this.listeners.forEach(function (listener) { return listener(promise); });
|
|
7914
7946
|
};
|
|
7947
|
+
InternalQueryReference.prototype.initiateFetch = function () {
|
|
7948
|
+
var _this = this;
|
|
7949
|
+
this.status = 'loading';
|
|
7950
|
+
this.promise = new Promise(function (resolve, reject) {
|
|
7951
|
+
_this.resolve = resolve;
|
|
7952
|
+
_this.reject = reject;
|
|
7953
|
+
});
|
|
7954
|
+
this.promise.catch(function () { });
|
|
7955
|
+
};
|
|
7915
7956
|
return InternalQueryReference;
|
|
7916
7957
|
}());
|
|
7917
7958
|
|
|
@@ -7920,35 +7961,34 @@ function useBackgroundQuery(query, options) {
|
|
|
7920
7961
|
var suspenseCache = useSuspenseCache(options.suspenseCache);
|
|
7921
7962
|
var client = useApolloClient(options.client);
|
|
7922
7963
|
var watchQueryOptions = useWatchQueryOptions({ client: client, query: query, options: options });
|
|
7923
|
-
var
|
|
7964
|
+
var variables = watchQueryOptions.variables;
|
|
7924
7965
|
var _a = options.queryKey, queryKey = _a === void 0 ? [] : _a;
|
|
7925
7966
|
var cacheKey = [client, query, canonicalStringify(variables)].concat(queryKey);
|
|
7926
7967
|
var queryRef = suspenseCache.getQueryRef(cacheKey, function () {
|
|
7927
7968
|
return client.watchQuery(watchQueryOptions);
|
|
7928
7969
|
});
|
|
7929
|
-
var
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
var promise = queryRef.reobserve({ fetchPolicy: fetchPolicy });
|
|
7970
|
+
var _b = React__namespace.useState(function () { return new Map([[queryRef.key, queryRef.promise]]); }), promiseCache = _b[0], setPromiseCache = _b[1];
|
|
7971
|
+
if (queryRef.didChangeOptions(watchQueryOptions)) {
|
|
7972
|
+
var promise = queryRef.applyOptions(watchQueryOptions);
|
|
7933
7973
|
promiseCache.set(queryRef.key, promise);
|
|
7934
7974
|
}
|
|
7935
|
-
|
|
7936
|
-
var fetchMore =
|
|
7975
|
+
React__namespace.useEffect(function () { return queryRef.retain(); }, [queryRef]);
|
|
7976
|
+
var fetchMore = React__namespace.useCallback(function (options) {
|
|
7937
7977
|
var promise = queryRef.fetchMore(options);
|
|
7938
7978
|
setPromiseCache(function (promiseCache) {
|
|
7939
|
-
return new Map(promiseCache).set(queryRef.key, promise);
|
|
7979
|
+
return new Map(promiseCache).set(queryRef.key, queryRef.promise);
|
|
7940
7980
|
});
|
|
7941
7981
|
return promise;
|
|
7942
7982
|
}, [queryRef]);
|
|
7943
|
-
var refetch =
|
|
7983
|
+
var refetch = React__namespace.useCallback(function (variables) {
|
|
7944
7984
|
var promise = queryRef.refetch(variables);
|
|
7945
7985
|
setPromiseCache(function (promiseCache) {
|
|
7946
|
-
return new Map(promiseCache).set(queryRef.key, promise);
|
|
7986
|
+
return new Map(promiseCache).set(queryRef.key, queryRef.promise);
|
|
7947
7987
|
});
|
|
7948
7988
|
return promise;
|
|
7949
7989
|
}, [queryRef]);
|
|
7950
7990
|
queryRef.promiseCache = promiseCache;
|
|
7951
|
-
return
|
|
7991
|
+
return React__namespace.useMemo(function () {
|
|
7952
7992
|
var _a;
|
|
7953
7993
|
return [
|
|
7954
7994
|
(_a = {}, _a[QUERY_REFERENCE_SYMBOL] = queryRef, _a),
|
|
@@ -7961,10 +8001,10 @@ function useBackgroundQuery(query, options) {
|
|
|
7961
8001
|
}
|
|
7962
8002
|
|
|
7963
8003
|
function useReadQuery(queryRef) {
|
|
7964
|
-
var _a =
|
|
8004
|
+
var _a = React__namespace.useState(0), forceUpdate = _a[1];
|
|
7965
8005
|
var internalQueryRef = queryRef[QUERY_REFERENCE_SYMBOL];
|
|
7966
|
-
invariant__default(internalQueryRef.promiseCache,
|
|
7967
|
-
var skipResult =
|
|
8006
|
+
invariant__default(internalQueryRef.promiseCache, 49);
|
|
8007
|
+
var skipResult = React__namespace.useMemo(function () {
|
|
7968
8008
|
var error = toApolloError(internalQueryRef.result);
|
|
7969
8009
|
return {
|
|
7970
8010
|
loading: false,
|
|
@@ -7978,7 +8018,7 @@ function useReadQuery(queryRef) {
|
|
|
7978
8018
|
promise = internalQueryRef.promise;
|
|
7979
8019
|
internalQueryRef.promiseCache.set(internalQueryRef.key, promise);
|
|
7980
8020
|
}
|
|
7981
|
-
|
|
8021
|
+
React__namespace.useEffect(function () {
|
|
7982
8022
|
return internalQueryRef.listen(function (promise) {
|
|
7983
8023
|
internalQueryRef.promiseCache.set(internalQueryRef.key, promise);
|
|
7984
8024
|
forceUpdate(function (prevState) { return prevState + 1; });
|
|
@@ -7987,7 +8027,7 @@ function useReadQuery(queryRef) {
|
|
|
7987
8027
|
var result = internalQueryRef.watchQueryOptions.fetchPolicy === 'standby'
|
|
7988
8028
|
? skipResult
|
|
7989
8029
|
: __use(promise);
|
|
7990
|
-
return
|
|
8030
|
+
return React__namespace.useMemo(function () {
|
|
7991
8031
|
return {
|
|
7992
8032
|
data: result.data,
|
|
7993
8033
|
networkStatus: result.networkStatus,
|