@apollo/client 4.0.0-rc.2 → 4.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/__cjs/cache/core/cache.cjs.map +1 -1
- package/__cjs/cache/index.cjs.map +1 -1
- package/__cjs/cache/inmemory/entityStore.cjs.map +1 -1
- package/__cjs/cache/inmemory/helpers.cjs.map +1 -1
- package/__cjs/cache/inmemory/inMemoryCache.cjs.map +1 -1
- package/__cjs/cache/inmemory/key-extractor.cjs.map +1 -1
- package/__cjs/cache/inmemory/policies.cjs.map +1 -1
- package/__cjs/cache/inmemory/reactiveVars.cjs.map +1 -1
- package/__cjs/cache/inmemory/readFromStore.cjs.map +1 -1
- package/__cjs/cache/inmemory/writeToStore.cjs.map +1 -1
- package/__cjs/core/ApolloClient.cjs +20 -4
- package/__cjs/core/ApolloClient.cjs.map +1 -1
- package/__cjs/core/ApolloClient.d.cts +17 -2
- package/__cjs/core/ObservableQuery.cjs.map +1 -1
- package/__cjs/core/QueryInfo.cjs.map +1 -1
- package/__cjs/core/QueryManager.cjs.map +1 -1
- package/__cjs/core/equalByQuery.cjs.map +1 -1
- package/__cjs/core/index.cjs.map +1 -1
- package/__cjs/core/networkStatus.cjs.map +1 -1
- package/__cjs/dev/index.cjs.map +1 -1
- package/__cjs/dev/loadDevMessages.cjs.map +1 -1
- package/__cjs/dev/loadErrorMessageHandler.cjs.map +1 -1
- package/__cjs/dev/loadErrorMessages.cjs.map +1 -1
- package/__cjs/dev/setErrorMessageHandler.cjs.map +1 -1
- package/__cjs/dev/symbol.cjs.map +1 -1
- package/__cjs/errors/CombinedGraphQLErrors.cjs.map +1 -1
- package/__cjs/errors/CombinedProtocolErrors.cjs.map +1 -1
- package/__cjs/errors/LinkError.cjs.map +1 -1
- package/__cjs/errors/LocalStateError.cjs.map +1 -1
- package/__cjs/errors/ServerError.cjs.map +1 -1
- package/__cjs/errors/ServerParseError.cjs.map +1 -1
- package/__cjs/errors/UnconventionalError.cjs.map +1 -1
- package/__cjs/errors/index.cjs.map +1 -1
- package/__cjs/errors/isErrorLike.cjs.map +1 -1
- package/__cjs/errors/utils.cjs.map +1 -1
- package/__cjs/incremental/handlers/defer20220824.cjs.map +1 -1
- package/__cjs/incremental/index.cjs.map +1 -1
- package/__cjs/invariantErrorCodes.cjs.map +1 -1
- package/__cjs/link/batch/batchLink.cjs.map +1 -1
- package/__cjs/link/batch/index.cjs.map +1 -1
- package/__cjs/link/batch-http/batchHttpLink.cjs.map +1 -1
- package/__cjs/link/batch-http/index.cjs.map +1 -1
- package/__cjs/link/client-awareness/index.cjs.map +1 -1
- package/__cjs/link/core/concat.cjs.map +1 -1
- package/__cjs/link/core/empty.cjs.map +1 -1
- package/__cjs/link/core/execute.cjs.map +1 -1
- package/__cjs/link/core/from.cjs.map +1 -1
- package/__cjs/link/core/split.cjs.map +1 -1
- package/__cjs/link/http/BaseHttpLink.cjs.map +1 -1
- package/__cjs/link/http/HttpLink.cjs.map +1 -1
- package/__cjs/link/http/index.cjs.map +1 -1
- package/__cjs/link/http/parseAndCheckHttpResponse.cjs.map +1 -1
- package/__cjs/link/http/rewriteURIForGET.cjs.map +1 -1
- package/__cjs/link/http/selectHttpOptionsAndBody.cjs.map +1 -1
- package/__cjs/link/index.cjs.map +1 -1
- package/__cjs/link/remove-typename/index.cjs.map +1 -1
- package/__cjs/link/remove-typename/removeTypenameFromVariables.cjs.map +1 -1
- package/__cjs/link/retry/delayFunction.cjs.map +1 -1
- package/__cjs/link/retry/index.cjs.map +1 -1
- package/__cjs/link/retry/retryFunction.cjs.map +1 -1
- package/__cjs/link/retry/retryLink.cjs.map +1 -1
- package/__cjs/link/utils/createOperation.cjs.map +1 -1
- package/__cjs/link/utils/filterOperationVariables.cjs.map +1 -1
- package/__cjs/link/utils/index.cjs.map +1 -1
- package/__cjs/link/utils/transformOperation.cjs.map +1 -1
- package/__cjs/link/utils/validateOperation.cjs.map +1 -1
- package/__cjs/local-state/LocalState.cjs.map +1 -1
- package/__cjs/local-state/index.cjs.map +1 -1
- package/__cjs/masking/index.cjs.map +1 -1
- package/__cjs/masking/maskDefinition.cjs.map +1 -1
- package/__cjs/masking/maskFragment.cjs.map +1 -1
- package/__cjs/masking/maskOperation.cjs.map +1 -1
- package/__cjs/masking/utils.cjs.map +1 -1
- package/__cjs/react/context/ApolloContext.cjs.map +1 -1
- package/__cjs/react/hooks/constants.cjs.map +1 -1
- package/__cjs/react/hooks/internal/__use.cjs.map +1 -1
- package/__cjs/react/hooks/internal/index.cjs.map +1 -1
- package/__cjs/react/hooks/internal/useDeepMemo.cjs.map +1 -1
- package/__cjs/react/hooks/internal/useIsomorphicLayoutEffect.cjs.map +1 -1
- package/__cjs/react/hooks/internal/useRenderGuard.cjs.map +1 -1
- package/__cjs/react/hooks/internal/validateSuspenseHookOptions.cjs.map +1 -1
- package/__cjs/react/hooks/internal/wrapHook.cjs.map +1 -1
- package/__cjs/react/hooks/useApolloClient.cjs.map +1 -1
- package/__cjs/react/hooks/useBackgroundQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useFragment.cjs +8 -4
- package/__cjs/react/hooks/useFragment.cjs.map +1 -1
- package/__cjs/react/hooks/useFragment.d.cts +4 -7
- package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useLoadableQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useMutation.cjs.map +1 -1
- package/__cjs/react/hooks/useQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useQueryRefHandlers.cjs.map +1 -1
- package/__cjs/react/hooks/useReactiveVar.cjs.map +1 -1
- package/__cjs/react/hooks/useReadQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useSubscription.cjs.map +1 -1
- package/__cjs/react/hooks/useSuspenseFragment.cjs.map +1 -1
- package/__cjs/react/hooks/useSuspenseFragment.d.cts +2 -2
- package/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useSyncExternalStore.cjs.map +1 -1
- package/__cjs/react/index.cjs +2 -1
- package/__cjs/react/index.cjs.map +1 -1
- package/__cjs/react/index.d.cts +1 -0
- package/__cjs/react/index.react-server.cjs.map +1 -1
- package/__cjs/react/internal/cache/SuspenseCache.cjs.map +1 -1
- package/__cjs/react/internal/cache/getSuspenseCache.cjs.map +1 -1
- package/__cjs/react/internal/compiler-runtime/index.cjs +32 -0
- package/__cjs/react/internal/compiler-runtime/index.cjs.map +1 -0
- package/__cjs/react/internal/compiler-runtime/index.d.cts +8 -0
- package/__cjs/react/internal/index.cjs.map +1 -1
- package/__cjs/react/query-preloader/createQueryPreloader.cjs.map +1 -1
- package/__cjs/react/ssr/getDataFromTree.cjs.map +1 -1
- package/__cjs/react/ssr/index.cjs.map +1 -1
- package/__cjs/react/ssr/renderToStringWithData.cjs.map +1 -1
- package/__cjs/react/ssr/useSSRQuery.cjs.map +1 -1
- package/__cjs/testing/core/mocking/mockLink.cjs.map +1 -1
- package/__cjs/testing/index.cjs.map +1 -1
- package/__cjs/testing/react/index.cjs.map +1 -1
- package/__cjs/utilities/caching/index.cjs.map +1 -1
- package/__cjs/utilities/caching/sizes.cjs.map +1 -1
- package/__cjs/utilities/common/stripTypename.cjs.map +1 -1
- package/__cjs/utilities/environment/index.cjs.map +1 -1
- package/__cjs/utilities/environment/index.development.cjs.map +1 -1
- package/__cjs/utilities/environment/index.production.cjs.map +1 -1
- package/__cjs/utilities/graphql/isFormattedExecutionResult.cjs.map +1 -1
- package/__cjs/utilities/graphql/operations.cjs.map +1 -1
- package/__cjs/utilities/graphql/print.cjs.map +1 -1
- package/__cjs/utilities/graphql/storeUtils.cjs.map +1 -1
- package/__cjs/utilities/graphql/transform.cjs.map +1 -1
- package/__cjs/utilities/index.cjs.map +1 -1
- package/__cjs/utilities/internal/argumentsObjectFromField.cjs.map +1 -1
- package/__cjs/utilities/internal/caches.cjs.map +1 -1
- package/__cjs/utilities/internal/canUseDOM.cjs.map +1 -1
- package/__cjs/utilities/internal/checkDocument.cjs.map +1 -1
- package/__cjs/utilities/internal/cloneDeep.cjs.map +1 -1
- package/__cjs/utilities/internal/compact.cjs.map +1 -1
- package/__cjs/utilities/internal/createFragmentMap.cjs.map +1 -1
- package/__cjs/utilities/internal/createFulfilledPromise.cjs.map +1 -1
- package/__cjs/utilities/internal/createRejectedPromise.cjs.map +1 -1
- package/__cjs/utilities/internal/dealias.cjs.map +1 -1
- package/__cjs/utilities/internal/decoratePromise.cjs.map +1 -1
- package/__cjs/utilities/internal/deepFreeze.cjs.map +1 -1
- package/__cjs/utilities/internal/filterMap.cjs.map +1 -1
- package/__cjs/utilities/internal/getDefaultValues.cjs.map +1 -1
- package/__cjs/utilities/internal/getFragmentDefinition.cjs.map +1 -1
- package/__cjs/utilities/internal/getFragmentDefinitions.cjs.map +1 -1
- package/__cjs/utilities/internal/getFragmentFromSelection.cjs.map +1 -1
- package/__cjs/utilities/internal/getFragmentQueryDocument.cjs.map +1 -1
- package/__cjs/utilities/internal/getGraphQLErrorsFromResult.cjs.map +1 -1
- package/__cjs/utilities/internal/getMainDefinition.cjs.map +1 -1
- package/__cjs/utilities/internal/getMemoryInternals.cjs.map +1 -1
- package/__cjs/utilities/internal/getOperationDefinition.cjs.map +1 -1
- package/__cjs/utilities/internal/getOperationName.cjs.map +1 -1
- package/__cjs/utilities/internal/getQueryDefinition.cjs.map +1 -1
- package/__cjs/utilities/internal/getStoreKeyName.cjs.map +1 -1
- package/__cjs/utilities/internal/globals/global.cjs.map +1 -1
- package/__cjs/utilities/internal/globals/index.cjs.map +1 -1
- package/__cjs/utilities/internal/globals/maybe.cjs.map +1 -1
- package/__cjs/utilities/internal/graphQLResultHasError.cjs.map +1 -1
- package/__cjs/utilities/internal/hasDirectives.cjs.map +1 -1
- package/__cjs/utilities/internal/hasForcedResolvers.cjs.map +1 -1
- package/__cjs/utilities/internal/index.cjs.map +1 -1
- package/__cjs/utilities/internal/index.production.cjs.map +1 -1
- package/__cjs/utilities/internal/isArray.cjs.map +1 -1
- package/__cjs/utilities/internal/isDocumentNode.cjs.map +1 -1
- package/__cjs/utilities/internal/isField.cjs.map +1 -1
- package/__cjs/utilities/internal/isNonEmptyArray.cjs.map +1 -1
- package/__cjs/utilities/internal/isNonNullObject.cjs.map +1 -1
- package/__cjs/utilities/internal/isPlainObject.cjs.map +1 -1
- package/__cjs/utilities/internal/makeReference.cjs.map +1 -1
- package/__cjs/utilities/internal/makeUniqueId.cjs.map +1 -1
- package/__cjs/utilities/internal/maybeDeepFreeze.cjs.map +1 -1
- package/__cjs/utilities/internal/mergeDeep.cjs.map +1 -1
- package/__cjs/utilities/internal/mergeDeepArray.cjs.map +1 -1
- package/__cjs/utilities/internal/mergeOptions.cjs.map +1 -1
- package/__cjs/utilities/internal/omitDeep.cjs.map +1 -1
- package/__cjs/utilities/internal/preventUnhandledRejection.cjs.map +1 -1
- package/__cjs/utilities/internal/removeDirectivesFromDocument.cjs.map +1 -1
- package/__cjs/utilities/internal/resultKeyNameFromField.cjs.map +1 -1
- package/__cjs/utilities/internal/shouldInclude.cjs.map +1 -1
- package/__cjs/utilities/internal/storeKeyNameFromField.cjs.map +1 -1
- package/__cjs/utilities/internal/stringifyForDisplay.cjs.map +1 -1
- package/__cjs/utilities/internal/toQueryResult.cjs.map +1 -1
- package/__cjs/utilities/internal/valueToObjectRepresentation.cjs.map +1 -1
- package/__cjs/utilities/invariant/index.cjs.map +1 -1
- package/__cjs/utilities/invariant/index.development.cjs.map +1 -1
- package/__cjs/utilities/policies/pagination.cjs.map +1 -1
- package/__cjs/utilities/shared/canonicalStringify.cjs.map +1 -1
- package/__cjs/utilities/subscriptions/relay/index.cjs.map +1 -1
- package/__cjs/version.cjs +1 -1
- package/__cjs/version.cjs.map +1 -1
- package/cache/core/cache.js.map +1 -1
- package/cache/core/types/Cache.d.ts +1 -1
- package/cache/core/types/Cache.js +1 -1
- package/cache/core/types/Cache.js.map +1 -1
- package/cache/core/types/DataProxy.d.ts +1 -1
- package/cache/core/types/DataProxy.js +1 -1
- package/cache/core/types/DataProxy.js.map +1 -1
- package/cache/core/types/common.d.ts +1 -1
- package/cache/core/types/common.js +1 -1
- package/cache/core/types/common.js.map +1 -1
- package/cache/index.d.ts +1 -1
- package/cache/index.js +1 -1
- package/cache/index.js.map +1 -1
- package/cache/inmemory/entityStore.d.ts +1 -1
- package/cache/inmemory/entityStore.js.map +1 -1
- package/cache/inmemory/fragmentRegistry.d.ts +1 -1
- package/cache/inmemory/fragmentRegistry.js +1 -1
- package/cache/inmemory/fragmentRegistry.js.map +1 -1
- package/cache/inmemory/helpers.d.ts +1 -1
- package/cache/inmemory/helpers.js +1 -1
- package/cache/inmemory/helpers.js.map +1 -1
- package/cache/inmemory/key-extractor.d.ts +1 -1
- package/cache/inmemory/key-extractor.js.map +1 -1
- package/cache/inmemory/policies.d.ts +1 -1
- package/cache/inmemory/policies.js.map +1 -1
- package/cache/inmemory/reactiveVars.d.ts +1 -1
- package/cache/inmemory/reactiveVars.js +1 -1
- package/cache/inmemory/reactiveVars.js.map +1 -1
- package/cache/inmemory/readFromStore.d.ts +1 -1
- package/cache/inmemory/readFromStore.js.map +1 -1
- package/cache/inmemory/types.d.ts +1 -1
- package/cache/inmemory/types.js +1 -1
- package/cache/inmemory/types.js.map +1 -1
- package/cache/inmemory/writeToStore.d.ts +1 -1
- package/cache/inmemory/writeToStore.js.map +1 -1
- package/core/ApolloClient.d.ts +17 -2
- package/core/ApolloClient.js +20 -4
- package/core/ApolloClient.js.map +1 -1
- package/core/QueryInfo.js.map +1 -1
- package/core/QueryManager.d.ts +1 -1
- package/core/QueryManager.js.map +1 -1
- package/core/equalByQuery.d.ts +1 -1
- package/core/equalByQuery.js +1 -1
- package/core/equalByQuery.js.map +1 -1
- package/core/index.d.ts +1 -1
- package/core/index.js +1 -1
- package/core/index.js.map +1 -1
- package/core/networkStatus.d.ts +1 -1
- package/core/networkStatus.js +1 -1
- package/core/networkStatus.js.map +1 -1
- package/core/types.js +1 -1
- package/core/types.js.map +1 -1
- package/core/watchQueryOptions.js +1 -1
- package/core/watchQueryOptions.js.map +1 -1
- package/dev/index.d.ts +1 -1
- package/dev/index.js +1 -1
- package/dev/index.js.map +1 -1
- package/dev/loadDevMessages.d.ts +1 -1
- package/dev/loadDevMessages.js +1 -1
- package/dev/loadDevMessages.js.map +1 -1
- package/dev/loadErrorMessageHandler.d.ts +1 -1
- package/dev/loadErrorMessageHandler.js +1 -1
- package/dev/loadErrorMessageHandler.js.map +1 -1
- package/dev/loadErrorMessages.d.ts +1 -1
- package/dev/loadErrorMessages.js +1 -1
- package/dev/loadErrorMessages.js.map +1 -1
- package/dev/setErrorMessageHandler.d.ts +1 -1
- package/dev/setErrorMessageHandler.js +1 -1
- package/dev/setErrorMessageHandler.js.map +1 -1
- package/dev/symbol.d.ts +1 -1
- package/dev/symbol.js +1 -1
- package/dev/symbol.js.map +1 -1
- package/errors/CombinedGraphQLErrors.d.ts +1 -1
- package/errors/CombinedGraphQLErrors.js +1 -1
- package/errors/CombinedGraphQLErrors.js.map +1 -1
- package/errors/CombinedProtocolErrors.d.ts +1 -1
- package/errors/CombinedProtocolErrors.js +1 -1
- package/errors/CombinedProtocolErrors.js.map +1 -1
- package/errors/LinkError.js.map +1 -1
- package/errors/LocalStateError.d.ts +1 -1
- package/errors/LocalStateError.js +1 -1
- package/errors/LocalStateError.js.map +1 -1
- package/errors/ServerError.d.ts +1 -1
- package/errors/ServerError.js +1 -1
- package/errors/ServerError.js.map +1 -1
- package/errors/ServerParseError.d.ts +1 -1
- package/errors/ServerParseError.js +1 -1
- package/errors/ServerParseError.js.map +1 -1
- package/errors/UnconventionalError.d.ts +1 -1
- package/errors/UnconventionalError.js +1 -1
- package/errors/UnconventionalError.js.map +1 -1
- package/errors/index.d.ts +1 -1
- package/errors/index.js +1 -1
- package/errors/index.js.map +1 -1
- package/errors/isErrorLike.d.ts +1 -1
- package/errors/isErrorLike.js +1 -1
- package/errors/isErrorLike.js.map +1 -1
- package/errors/utils.d.ts +1 -1
- package/errors/utils.js +1 -1
- package/errors/utils.js.map +1 -1
- package/incremental/handlers/defer20220824.d.ts +1 -1
- package/incremental/handlers/defer20220824.js +1 -1
- package/incremental/handlers/defer20220824.js.map +1 -1
- package/incremental/handlers/notImplemented.d.ts +1 -1
- package/incremental/index.d.ts +1 -1
- package/incremental/index.js.map +1 -1
- package/incremental/types.js +1 -1
- package/incremental/types.js.map +1 -1
- package/invariantErrorCodes.d.ts +1 -1
- package/invariantErrorCodes.js +4 -1
- package/invariantErrorCodes.js.map +1 -1
- package/legacyEntryPoints/react/internal/compiler-runtime/compiler-runtime.cjs +1 -0
- package/legacyEntryPoints/react/internal/compiler-runtime/compiler-runtime.d.cts +1 -0
- package/legacyEntryPoints/react/internal/compiler-runtime/index.d.ts +1 -0
- package/legacyEntryPoints/react/internal/compiler-runtime/index.js +1 -0
- package/link/batch/batchLink.d.ts +1 -1
- package/link/batch/batchLink.js +1 -1
- package/link/batch/batchLink.js.map +1 -1
- package/link/batch/batching.d.ts +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.js +1 -1
- package/link/batch/index.js.map +1 -1
- package/link/batch-http/batchHttpLink.d.ts +1 -1
- package/link/batch-http/batchHttpLink.js +1 -1
- package/link/batch-http/batchHttpLink.js.map +1 -1
- package/link/batch-http/index.d.ts +1 -1
- package/link/batch-http/index.js +1 -1
- package/link/batch-http/index.js.map +1 -1
- package/link/client-awareness/ClientAwarenessLink.d.ts +1 -1
- package/link/client-awareness/ClientAwarenessLink.js +1 -1
- package/link/client-awareness/ClientAwarenessLink.js.map +1 -1
- package/link/client-awareness/index.d.ts +1 -1
- package/link/client-awareness/index.js +1 -1
- package/link/client-awareness/index.js.map +1 -1
- package/link/context/index.d.ts +1 -1
- package/link/context/index.js +1 -1
- package/link/context/index.js.map +1 -1
- package/link/core/concat.d.ts +1 -1
- package/link/core/concat.js +1 -1
- package/link/core/concat.js.map +1 -1
- package/link/core/empty.d.ts +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.js +1 -1
- package/link/core/execute.js.map +1 -1
- package/link/core/from.d.ts +1 -1
- package/link/core/from.js +1 -1
- package/link/core/from.js.map +1 -1
- package/link/core/split.d.ts +1 -1
- package/link/core/split.js +1 -1
- package/link/core/split.js.map +1 -1
- package/link/core/types.d.ts +1 -1
- package/link/core/types.js +1 -1
- package/link/core/types.js.map +1 -1
- package/link/error/index.d.ts +1 -1
- package/link/error/index.js +1 -1
- package/link/error/index.js.map +1 -1
- package/link/http/BaseHttpLink.d.ts +1 -1
- package/link/http/BaseHttpLink.js +1 -1
- package/link/http/BaseHttpLink.js.map +1 -1
- package/link/http/HttpLink.d.ts +1 -1
- package/link/http/HttpLink.js +1 -1
- package/link/http/HttpLink.js.map +1 -1
- package/link/http/checkFetcher.d.ts +1 -1
- package/link/http/checkFetcher.js.map +1 -1
- package/link/http/createSignalIfSupported.d.ts +1 -1
- package/link/http/createSignalIfSupported.js +1 -1
- package/link/http/createSignalIfSupported.js.map +1 -1
- package/link/http/index.d.ts +1 -1
- package/link/http/index.js +1 -1
- package/link/http/index.js.map +1 -1
- package/link/http/parseAndCheckHttpResponse.d.ts +1 -1
- package/link/http/parseAndCheckHttpResponse.js.map +1 -1
- package/link/http/rewriteURIForGET.d.ts +1 -1
- package/link/http/rewriteURIForGET.js +1 -1
- package/link/http/rewriteURIForGET.js.map +1 -1
- package/link/http/selectHttpOptionsAndBody.d.ts +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.js +1 -1
- package/link/http/selectURI.js.map +1 -1
- package/link/http/serializeFetchParameter.d.ts +1 -1
- package/link/http/serializeFetchParameter.js.map +1 -1
- package/link/index.d.ts +1 -1
- package/link/index.js +1 -1
- package/link/index.js.map +1 -1
- package/link/persisted-queries/index.d.ts +1 -1
- package/link/remove-typename/index.d.ts +1 -1
- package/link/remove-typename/index.js.map +1 -1
- package/link/remove-typename/removeTypenameFromVariables.d.ts +1 -1
- package/link/remove-typename/removeTypenameFromVariables.js +1 -1
- package/link/remove-typename/removeTypenameFromVariables.js.map +1 -1
- package/link/retry/delayFunction.d.ts +1 -1
- package/link/retry/delayFunction.js +1 -1
- package/link/retry/delayFunction.js.map +1 -1
- package/link/retry/index.d.ts +1 -1
- package/link/retry/index.js +1 -1
- package/link/retry/index.js.map +1 -1
- package/link/retry/retryFunction.d.ts +1 -1
- package/link/retry/retryFunction.js +1 -1
- package/link/retry/retryFunction.js.map +1 -1
- package/link/retry/retryLink.d.ts +1 -1
- package/link/retry/retryLink.js +1 -1
- package/link/retry/retryLink.js.map +1 -1
- package/link/schema/index.d.ts +1 -1
- package/link/schema/index.js +1 -1
- package/link/schema/index.js.map +1 -1
- package/link/subscriptions/index.d.ts +1 -1
- package/link/subscriptions/index.js +1 -1
- package/link/subscriptions/index.js.map +1 -1
- package/link/utils/createOperation.d.ts +1 -1
- package/link/utils/createOperation.js +1 -1
- package/link/utils/createOperation.js.map +1 -1
- package/link/utils/filterOperationVariables.d.ts +1 -1
- package/link/utils/filterOperationVariables.js +1 -1
- package/link/utils/filterOperationVariables.js.map +1 -1
- package/link/utils/index.d.ts +1 -1
- package/link/utils/index.js +1 -1
- package/link/utils/index.js.map +1 -1
- package/link/utils/transformOperation.d.ts +1 -1
- package/link/utils/transformOperation.js +1 -1
- package/link/utils/transformOperation.js.map +1 -1
- package/link/utils/validateOperation.d.ts +1 -1
- package/link/utils/validateOperation.js.map +1 -1
- package/link/ws/index.d.ts +1 -1
- package/link/ws/index.js +1 -1
- package/link/ws/index.js.map +1 -1
- package/local-state/LocalState.d.ts +1 -1
- package/local-state/LocalState.js.map +1 -1
- package/local-state/index.d.ts +1 -1
- package/local-state/index.js +1 -1
- package/local-state/index.js.map +1 -1
- package/masking/GraphQLCodegenDataMasking.d.ts +1 -1
- package/masking/GraphQLCodegenDataMasking.js +1 -1
- package/masking/GraphQLCodegenDataMasking.js.map +1 -1
- package/masking/index.d.ts +1 -1
- package/masking/index.js +1 -1
- package/masking/index.js.map +1 -1
- package/masking/internal/types.d.ts +1 -1
- package/masking/internal/types.js +1 -1
- package/masking/internal/types.js.map +1 -1
- package/masking/maskDefinition.d.ts +1 -1
- package/masking/maskDefinition.js.map +1 -1
- package/masking/maskFragment.js.map +1 -1
- package/masking/maskOperation.js.map +1 -1
- package/masking/types.d.ts +1 -1
- package/masking/types.js +1 -1
- package/masking/types.js.map +1 -1
- package/masking/utils.js.map +1 -1
- package/package.json +10 -4
- package/react/compiled/index.d.ts +2 -0
- package/react/compiled/index.js +2 -0
- package/react/compiled/index.js.map +1 -0
- package/react/context/ApolloConsumer.d.ts +1 -1
- package/react/context/ApolloConsumer.js.map +1 -1
- package/react/context/ApolloContext.d.ts +1 -1
- package/react/context/ApolloContext.js.map +1 -1
- package/react/context/ApolloProvider.d.ts +1 -1
- package/react/context/ApolloProvider.js.map +1 -1
- package/react/hooks/constants.d.ts +1 -1
- package/react/hooks/constants.js +1 -1
- package/react/hooks/constants.js.map +1 -1
- package/react/hooks/internal/__use.d.ts +1 -1
- package/react/hooks/internal/__use.js +1 -1
- package/react/hooks/internal/__use.js.map +1 -1
- package/react/hooks/internal/index.d.ts +1 -1
- package/react/hooks/internal/index.js +1 -1
- package/react/hooks/internal/index.js.map +1 -1
- package/react/hooks/internal/useDeepMemo.d.ts +1 -1
- package/react/hooks/internal/useDeepMemo.js +1 -1
- package/react/hooks/internal/useDeepMemo.js.map +1 -1
- package/react/hooks/internal/useIsomorphicLayoutEffect.d.ts +1 -1
- package/react/hooks/internal/useIsomorphicLayoutEffect.js +1 -1
- package/react/hooks/internal/useIsomorphicLayoutEffect.js.map +1 -1
- package/react/hooks/internal/useRenderGuard.d.ts +1 -1
- package/react/hooks/internal/useRenderGuard.js +1 -1
- package/react/hooks/internal/useRenderGuard.js.map +1 -1
- package/react/hooks/internal/validateSuspenseHookOptions.d.ts +1 -1
- package/react/hooks/internal/validateSuspenseHookOptions.js.map +1 -1
- package/react/hooks/internal/wrapHook.js.map +1 -1
- package/react/hooks/useApolloClient.d.ts +1 -1
- package/react/hooks/useApolloClient.js +1 -14
- package/react/hooks/useApolloClient.js.map +1 -1
- package/react/hooks/useBackgroundQuery.js +7 -7
- package/react/hooks/useBackgroundQuery.js.map +1 -1
- package/react/hooks/useFragment.d.ts +5 -8
- package/react/hooks/useFragment.js +18 -14
- package/react/hooks/useFragment.js.map +1 -1
- package/react/hooks/useLazyQuery.js +14 -14
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/react/hooks/useLoadableQuery.js +69 -229
- package/react/hooks/useLoadableQuery.js.map +1 -1
- package/react/hooks/useMutation.js +82 -192
- package/react/hooks/useMutation.js.map +1 -1
- package/react/hooks/useQuery.js +54 -225
- package/react/hooks/useQuery.js.map +1 -1
- package/react/hooks/useQueryRefHandlers.js +24 -64
- package/react/hooks/useQueryRefHandlers.js.map +1 -1
- package/react/hooks/useReactiveVar.d.ts +1 -1
- package/react/hooks/useReactiveVar.js +1 -1
- package/react/hooks/useReactiveVar.js.map +1 -1
- package/react/hooks/useReadQuery.d.ts +1 -1
- package/react/hooks/useReadQuery.js +3 -3
- package/react/hooks/useReadQuery.js.map +1 -1
- package/react/hooks/useSubscription.js +4 -4
- package/react/hooks/useSubscription.js.map +1 -1
- package/react/hooks/useSuspenseFragment.d.ts +3 -3
- package/react/hooks/useSuspenseFragment.js +1 -1
- package/react/hooks/useSuspenseFragment.js.map +1 -1
- package/react/hooks/useSuspenseQuery.js +34 -59
- package/react/hooks/useSuspenseQuery.js.map +1 -1
- package/react/hooks/useSyncExternalStore.d.ts +1 -1
- package/react/hooks/useSyncExternalStore.js.map +1 -1
- package/react/hooks-compiled/constants.d.ts +3 -0
- package/react/hooks-compiled/constants.js +2 -0
- package/react/hooks-compiled/constants.js.map +1 -0
- package/react/hooks-compiled/internal/__use.d.ts +4 -0
- package/react/hooks-compiled/internal/__use.js +22 -0
- package/react/hooks-compiled/internal/__use.js.map +1 -0
- package/react/hooks-compiled/internal/index.d.ts +5 -0
- package/react/hooks-compiled/internal/index.js +6 -0
- package/react/hooks-compiled/internal/index.js.map +1 -0
- package/react/hooks-compiled/internal/useDeepMemo.d.ts +3 -0
- package/react/hooks-compiled/internal/useDeepMemo.js +13 -0
- package/react/hooks-compiled/internal/useDeepMemo.js.map +1 -0
- package/react/hooks-compiled/internal/useIsomorphicLayoutEffect.d.ts +3 -0
- package/react/hooks-compiled/internal/useIsomorphicLayoutEffect.js +9 -0
- package/react/hooks-compiled/internal/useIsomorphicLayoutEffect.js.map +1 -0
- package/react/hooks-compiled/internal/useRenderGuard.d.ts +2 -0
- package/react/hooks-compiled/internal/useRenderGuard.js +42 -0
- package/react/hooks-compiled/internal/useRenderGuard.js.map +1 -0
- package/react/hooks-compiled/internal/validateSuspenseHookOptions.d.ts +3 -0
- package/react/hooks-compiled/internal/validateSuspenseHookOptions.js +22 -0
- package/react/hooks-compiled/internal/validateSuspenseHookOptions.js.map +1 -0
- package/react/hooks-compiled/internal/wrapHook.d.ts +66 -0
- package/react/hooks-compiled/internal/wrapHook.js +64 -0
- package/react/hooks-compiled/internal/wrapHook.js.map +1 -0
- package/react/hooks-compiled/useApolloClient.d.ts +18 -0
- package/react/hooks-compiled/useApolloClient.js +36 -0
- package/react/hooks-compiled/useApolloClient.js.map +1 -0
- package/react/hooks-compiled/useBackgroundQuery.d.ts +210 -0
- package/react/hooks-compiled/useBackgroundQuery.js +80 -0
- package/react/hooks-compiled/useBackgroundQuery.js.map +1 -0
- package/react/hooks-compiled/useFragment.d.ts +52 -0
- package/react/hooks-compiled/useFragment.js +101 -0
- package/react/hooks-compiled/useFragment.js.map +1 -0
- package/react/hooks-compiled/useLazyQuery.d.ts +280 -0
- package/react/hooks-compiled/useLazyQuery.js +181 -0
- package/react/hooks-compiled/useLazyQuery.js.map +1 -0
- package/react/hooks-compiled/useLoadableQuery.d.ts +175 -0
- package/react/hooks-compiled/useLoadableQuery.js +247 -0
- package/react/hooks-compiled/useLoadableQuery.js.map +1 -0
- package/react/hooks-compiled/useMutation.d.ts +280 -0
- package/react/hooks-compiled/useMutation.js +263 -0
- package/react/hooks-compiled/useMutation.js.map +1 -0
- package/react/hooks-compiled/useQuery.d.ts +265 -0
- package/react/hooks-compiled/useQuery.js +395 -0
- package/react/hooks-compiled/useQuery.js.map +1 -0
- package/react/hooks-compiled/useQueryRefHandlers.d.ts +44 -0
- package/react/hooks-compiled/useQueryRefHandlers.js +109 -0
- package/react/hooks-compiled/useQueryRefHandlers.js.map +1 -0
- package/react/hooks-compiled/useReactiveVar.d.ts +20 -0
- package/react/hooks-compiled/useReactiveVar.js +33 -0
- package/react/hooks-compiled/useReactiveVar.js.map +1 -0
- package/react/hooks-compiled/useReadQuery.d.ts +24 -0
- package/react/hooks-compiled/useReadQuery.js +43 -0
- package/react/hooks-compiled/useReadQuery.js.map +1 -0
- package/react/hooks-compiled/useSubscription.d.ts +178 -0
- package/react/hooks-compiled/useSubscription.js +223 -0
- package/react/hooks-compiled/useSubscription.js.map +1 -0
- package/react/hooks-compiled/useSuspenseFragment.d.ts +47 -0
- package/react/hooks-compiled/useSuspenseFragment.js +47 -0
- package/react/hooks-compiled/useSuspenseFragment.js.map +1 -0
- package/react/hooks-compiled/useSuspenseQuery.d.ts +204 -0
- package/react/hooks-compiled/useSuspenseQuery.js +144 -0
- package/react/hooks-compiled/useSuspenseQuery.js.map +1 -0
- package/react/hooks-compiled/useSyncExternalStore.d.ts +4 -0
- package/react/hooks-compiled/useSyncExternalStore.js +126 -0
- package/react/hooks-compiled/useSyncExternalStore.js.map +1 -0
- package/react/index.compiled.d.ts +26 -0
- package/react/index.compiled.js +21 -0
- package/react/index.compiled.js.map +1 -0
- package/react/index.d.ts +2 -1
- package/react/index.js +2 -1
- package/react/index.js.map +1 -1
- package/react/index.react-server.d.ts +1 -1
- package/react/index.react-server.js +1 -1
- package/react/index.react-server.js.map +1 -1
- package/react/internal/cache/FragmentReference.d.ts +1 -1
- package/react/internal/cache/FragmentReference.js +1 -1
- package/react/internal/cache/FragmentReference.js.map +1 -1
- package/react/internal/cache/SuspenseCache.d.ts +1 -1
- package/react/internal/cache/SuspenseCache.js +1 -1
- package/react/internal/cache/SuspenseCache.js.map +1 -1
- package/react/internal/cache/getSuspenseCache.d.ts +1 -1
- package/react/internal/cache/getSuspenseCache.js +1 -1
- package/react/internal/cache/getSuspenseCache.js.map +1 -1
- package/react/internal/cache/types.d.ts +1 -1
- package/react/internal/cache/types.js +1 -1
- package/react/internal/cache/types.js.map +1 -1
- package/react/internal/compiler-runtime/index.d.ts +8 -0
- package/react/internal/compiler-runtime/index.js +28 -0
- package/react/internal/compiler-runtime/index.js.map +1 -0
- package/react/internal/index.d.ts +1 -1
- package/react/internal/index.js +1 -1
- package/react/internal/index.js.map +1 -1
- package/react/internal/types.d.ts +1 -1
- package/react/internal/types.js +1 -1
- package/react/internal/types.js.map +1 -1
- package/react/query-preloader/createQueryPreloader.js +1 -1
- package/react/query-preloader/createQueryPreloader.js.map +1 -1
- package/react/ssr/getDataFromTree.d.ts +1 -1
- package/react/ssr/getDataFromTree.js.map +1 -1
- package/react/ssr/index.d.ts +1 -1
- package/react/ssr/index.js +1 -1
- package/react/ssr/index.js.map +1 -1
- package/react/ssr/prerenderStatic.d.ts +1 -1
- package/react/ssr/renderToStringWithData.d.ts +1 -1
- package/react/ssr/renderToStringWithData.js +1 -1
- package/react/ssr/renderToStringWithData.js.map +1 -1
- package/react/ssr/useSSRQuery.d.ts +1 -1
- package/react/ssr/useSSRQuery.js +1 -1
- package/react/ssr/useSSRQuery.js.map +1 -1
- package/react/types/deprecated.d.ts +1 -1
- package/react/types/deprecated.js +1 -1
- package/react/types/deprecated.js.map +1 -1
- package/react/types/types.documentation.js +1 -1
- package/react/types/types.documentation.js.map +1 -1
- package/testing/core/mocking/mockLink.js.map +1 -1
- package/testing/core/mocking/mockSubscriptionLink.d.ts +1 -1
- package/testing/core/mocking/mockSubscriptionLink.js +1 -1
- package/testing/core/mocking/mockSubscriptionLink.js.map +1 -1
- package/testing/core/types/deprecated.d.ts +1 -1
- package/testing/core/types/deprecated.js +1 -1
- package/testing/core/types/deprecated.js.map +1 -1
- package/testing/index.d.ts +1 -1
- package/testing/index.js +1 -1
- package/testing/index.js.map +1 -1
- package/testing/react/MockedProvider.d.ts +1 -1
- package/testing/react/MockedProvider.js +1 -1
- package/testing/react/MockedProvider.js.map +1 -1
- package/testing/react/index.d.ts +1 -1
- package/testing/react/index.js +1 -1
- package/testing/react/index.js.map +1 -1
- package/utilities/DeepPartial.d.ts +1 -1
- package/utilities/DeepPartial.js +1 -1
- package/utilities/DeepPartial.js.map +1 -1
- package/utilities/HKT.d.ts +1 -1
- package/utilities/HKT.js +1 -1
- package/utilities/HKT.js.map +1 -1
- package/utilities/caching/index.d.ts +1 -1
- package/utilities/caching/index.js +1 -1
- package/utilities/caching/index.js.map +1 -1
- package/utilities/caching/sizes.d.ts +1 -1
- package/utilities/caching/sizes.js +1 -1
- package/utilities/caching/sizes.js.map +1 -1
- package/utilities/common/stripTypename.d.ts +1 -1
- package/utilities/common/stripTypename.js +1 -1
- package/utilities/common/stripTypename.js.map +1 -1
- package/utilities/environment/index.d.ts +1 -1
- package/utilities/environment/index.development.d.ts +1 -1
- package/utilities/environment/index.development.js +1 -1
- package/utilities/environment/index.development.js.map +1 -1
- package/utilities/environment/index.js +1 -1
- package/utilities/environment/index.js.map +1 -1
- package/utilities/environment/index.production.d.ts +1 -1
- package/utilities/environment/index.production.js +1 -1
- package/utilities/environment/index.production.js.map +1 -1
- package/utilities/graphql/isFormattedExecutionResult.d.ts +1 -1
- package/utilities/graphql/isFormattedExecutionResult.js +1 -1
- package/utilities/graphql/isFormattedExecutionResult.js.map +1 -1
- package/utilities/graphql/operations.d.ts +1 -1
- package/utilities/graphql/operations.js +1 -1
- package/utilities/graphql/operations.js.map +1 -1
- package/utilities/graphql/print.d.ts +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.js +1 -1
- package/utilities/graphql/storeUtils.js.map +1 -1
- package/utilities/graphql/transform.d.ts +1 -1
- package/utilities/graphql/transform.js +1 -1
- package/utilities/graphql/transform.js.map +1 -1
- package/utilities/index.d.ts +1 -1
- package/utilities/index.js +1 -1
- package/utilities/index.js.map +1 -1
- package/utilities/internal/argumentsObjectFromField.js.map +1 -1
- package/utilities/internal/caches.js.map +1 -1
- package/utilities/internal/canUseDOM.js.map +1 -1
- package/utilities/internal/checkDocument.js.map +1 -1
- package/utilities/internal/cloneDeep.js.map +1 -1
- package/utilities/internal/compact.js.map +1 -1
- package/utilities/internal/createFragmentMap.js.map +1 -1
- package/utilities/internal/createFulfilledPromise.js.map +1 -1
- package/utilities/internal/createRejectedPromise.js.map +1 -1
- package/utilities/internal/dealias.d.ts +1 -1
- package/utilities/internal/dealias.js +1 -1
- package/utilities/internal/dealias.js.map +1 -1
- package/utilities/internal/decoratePromise.js.map +1 -1
- package/utilities/internal/deepFreeze.js.map +1 -1
- package/utilities/internal/filterMap.d.ts +1 -1
- package/utilities/internal/filterMap.js +1 -1
- package/utilities/internal/filterMap.js.map +1 -1
- package/utilities/internal/getDefaultValues.js.map +1 -1
- package/utilities/internal/getFragmentDefinition.js.map +1 -1
- package/utilities/internal/getFragmentDefinitions.js.map +1 -1
- package/utilities/internal/getFragmentFromSelection.js.map +1 -1
- package/utilities/internal/getFragmentQueryDocument.js.map +1 -1
- package/utilities/internal/getGraphQLErrorsFromResult.js.map +1 -1
- package/utilities/internal/getMainDefinition.js.map +1 -1
- package/utilities/internal/getMemoryInternals.js.map +1 -1
- package/utilities/internal/getOperationDefinition.js.map +1 -1
- package/utilities/internal/getOperationName.js.map +1 -1
- package/utilities/internal/getQueryDefinition.js.map +1 -1
- package/utilities/internal/getStoreKeyName.js.map +1 -1
- package/utilities/internal/globals/global.d.ts +1 -1
- package/utilities/internal/globals/index.d.ts +1 -1
- package/utilities/internal/globals/index.js +1 -1
- package/utilities/internal/globals/index.js.map +1 -1
- package/utilities/internal/globals/maybe.d.ts +1 -1
- package/utilities/internal/globals/maybe.js +1 -1
- package/utilities/internal/globals/maybe.js.map +1 -1
- package/utilities/internal/graphQLResultHasError.js.map +1 -1
- package/utilities/internal/hasDirectives.js.map +1 -1
- package/utilities/internal/hasForcedResolvers.d.ts +1 -1
- package/utilities/internal/hasForcedResolvers.js +1 -1
- package/utilities/internal/hasForcedResolvers.js.map +1 -1
- package/utilities/internal/index.d.ts +1 -1
- package/utilities/internal/index.js +1 -1
- package/utilities/internal/index.js.map +1 -1
- package/utilities/internal/index.production.d.ts +1 -1
- package/utilities/internal/index.production.js +1 -1
- package/utilities/internal/index.production.js.map +1 -1
- package/utilities/internal/isArray.js.map +1 -1
- package/utilities/internal/isDocumentNode.js.map +1 -1
- package/utilities/internal/isField.js.map +1 -1
- package/utilities/internal/isNonEmptyArray.js.map +1 -1
- package/utilities/internal/isNonNullObject.js.map +1 -1
- package/utilities/internal/isPlainObject.js.map +1 -1
- package/utilities/internal/makeReference.js.map +1 -1
- package/utilities/internal/makeUniqueId.js.map +1 -1
- package/utilities/internal/maybeDeepFreeze.js.map +1 -1
- package/utilities/internal/mergeDeep.js.map +1 -1
- package/utilities/internal/mergeDeepArray.js.map +1 -1
- package/utilities/internal/mergeOptions.js.map +1 -1
- package/utilities/internal/omitDeep.js.map +1 -1
- package/utilities/internal/preventUnhandledRejection.d.ts +1 -1
- package/utilities/internal/preventUnhandledRejection.js +1 -1
- package/utilities/internal/preventUnhandledRejection.js.map +1 -1
- package/utilities/internal/removeDirectivesFromDocument.js.map +1 -1
- package/utilities/internal/resultKeyNameFromField.js.map +1 -1
- package/utilities/internal/shouldInclude.js.map +1 -1
- package/utilities/internal/storeKeyNameFromField.js.map +1 -1
- package/utilities/internal/stringifyForDisplay.js.map +1 -1
- package/utilities/internal/toQueryResult.js.map +1 -1
- package/utilities/internal/types/ApplyHKT.js +1 -1
- package/utilities/internal/types/ApplyHKT.js.map +1 -1
- package/utilities/internal/types/ApplyHKTImplementationWithDefault.js +1 -1
- package/utilities/internal/types/ApplyHKTImplementationWithDefault.js.map +1 -1
- package/utilities/internal/types/DecoratedPromise.js +1 -1
- package/utilities/internal/types/DecoratedPromise.js.map +1 -1
- package/utilities/internal/types/DeepOmit.js +1 -1
- package/utilities/internal/types/DeepOmit.js.map +1 -1
- package/utilities/internal/types/FragmentMap.js +1 -1
- package/utilities/internal/types/FragmentMap.js.map +1 -1
- package/utilities/internal/types/FragmentMapFunction.js +1 -1
- package/utilities/internal/types/FragmentMapFunction.js.map +1 -1
- package/utilities/internal/types/FulfilledPromise.js +1 -1
- package/utilities/internal/types/FulfilledPromise.js.map +1 -1
- package/utilities/internal/types/IsAny.js +1 -1
- package/utilities/internal/types/IsAny.js.map +1 -1
- package/utilities/internal/types/NoInfer.d.ts +1 -1
- package/utilities/internal/types/NoInfer.js +1 -1
- package/utilities/internal/types/NoInfer.js.map +1 -1
- package/utilities/internal/types/PendingPromise.js +1 -1
- package/utilities/internal/types/PendingPromise.js.map +1 -1
- package/utilities/internal/types/Prettify.js +1 -1
- package/utilities/internal/types/Prettify.js.map +1 -1
- package/utilities/internal/types/Primitive.js +1 -1
- package/utilities/internal/types/Primitive.js.map +1 -1
- package/utilities/internal/types/RejectedPromise.js +1 -1
- package/utilities/internal/types/RejectedPromise.js.map +1 -1
- package/utilities/internal/types/RemoveIndexSignature.js +1 -1
- package/utilities/internal/types/RemoveIndexSignature.js.map +1 -1
- package/utilities/internal/types/TupleToIntersection.d.ts +1 -1
- package/utilities/internal/types/TupleToIntersection.js +1 -1
- package/utilities/internal/types/TupleToIntersection.js.map +1 -1
- package/utilities/internal/types/VariablesOption.js +1 -1
- package/utilities/internal/types/VariablesOption.js.map +1 -1
- package/utilities/internal/valueToObjectRepresentation.js.map +1 -1
- package/utilities/invariant/index.d.ts +1 -1
- package/utilities/invariant/index.development.d.ts +1 -1
- package/utilities/invariant/index.development.js +1 -1
- package/utilities/invariant/index.development.js.map +1 -1
- package/utilities/invariant/index.js +1 -1
- package/utilities/invariant/index.js.map +1 -1
- package/utilities/policies/pagination.d.ts +1 -1
- package/utilities/policies/pagination.js +1 -1
- package/utilities/policies/pagination.js.map +1 -1
- package/utilities/shared/canonicalStringify.d.ts +1 -1
- package/utilities/shared/canonicalStringify.js +1 -1
- package/utilities/shared/canonicalStringify.js.map +1 -1
- package/utilities/subscriptions/relay/index.d.ts +1 -1
- package/utilities/subscriptions/relay/index.js +1 -1
- package/utilities/subscriptions/relay/index.js.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ApolloClient, DataValue, DocumentNode, OperationVariables, Reference, StoreObject, TypedDocumentNode } from "@apollo/client";
|
|
2
|
+
import type { FragmentType, MaybeMasked } from "@apollo/client/masking";
|
|
3
|
+
import type { NoInfer, VariablesOption } from "@apollo/client/utilities/internal";
|
|
4
|
+
type From<TData> = StoreObject | Reference | FragmentType<NoInfer<TData>> | string | null;
|
|
5
|
+
export declare namespace useSuspenseFragment {
|
|
6
|
+
type Options<TData, TVariables extends OperationVariables> = {
|
|
7
|
+
/**
|
|
8
|
+
* A GraphQL document created using the `gql` template string tag from
|
|
9
|
+
* `graphql-tag` with one or more fragments which will be used to determine
|
|
10
|
+
* the shape of data to read. If you provide more than one fragment in this
|
|
11
|
+
* document then you must also specify `fragmentName` to select a single.
|
|
12
|
+
*/
|
|
13
|
+
fragment: DocumentNode | TypedDocumentNode<TData, TVariables>;
|
|
14
|
+
/**
|
|
15
|
+
* The name of the fragment in your GraphQL document to be used. If you do
|
|
16
|
+
* not provide a `fragmentName` and there is only one fragment in your
|
|
17
|
+
* `fragment` document then that fragment will be used.
|
|
18
|
+
*/
|
|
19
|
+
fragmentName?: string;
|
|
20
|
+
from: From<TData>;
|
|
21
|
+
optimistic?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* The instance of `ApolloClient` to use to look up the fragment.
|
|
24
|
+
*
|
|
25
|
+
* By default, the instance that's passed down via context is used, but you
|
|
26
|
+
* can provide a different instance here.
|
|
27
|
+
*
|
|
28
|
+
* @docGroup 1. Operation options
|
|
29
|
+
*/
|
|
30
|
+
client?: ApolloClient;
|
|
31
|
+
} & VariablesOption<NoInfer<TVariables>>;
|
|
32
|
+
type Result<TData> = {
|
|
33
|
+
data: DataValue.Complete<MaybeMasked<TData>>;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export declare function useSuspenseFragment<TData, TVariables extends OperationVariables = OperationVariables>(options: useSuspenseFragment.Options<TData, TVariables> & {
|
|
37
|
+
from: NonNullable<From<TData>>;
|
|
38
|
+
}): useSuspenseFragment.Result<TData>;
|
|
39
|
+
export declare function useSuspenseFragment<TData, TVariables extends OperationVariables = OperationVariables>(options: useSuspenseFragment.Options<TData, TVariables> & {
|
|
40
|
+
from: null;
|
|
41
|
+
}): useSuspenseFragment.Result<null>;
|
|
42
|
+
export declare function useSuspenseFragment<TData, TVariables extends OperationVariables = OperationVariables>(options: useSuspenseFragment.Options<TData, TVariables> & {
|
|
43
|
+
from: From<TData>;
|
|
44
|
+
}): useSuspenseFragment.Result<TData | null>;
|
|
45
|
+
export declare function useSuspenseFragment<TData, TVariables extends OperationVariables = OperationVariables>(options: useSuspenseFragment.Options<TData, TVariables>): useSuspenseFragment.Result<TData>;
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=useSuspenseFragment.d.ts.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { canonicalStringify } from "@apollo/client/cache";
|
|
3
|
+
import { getSuspenseCache } from "@apollo/client/react/internal";
|
|
4
|
+
import { __use } from "./internal/__use.js";
|
|
5
|
+
import { wrapHook } from "./internal/index.js";
|
|
6
|
+
import { useApolloClient } from "./useApolloClient.js";
|
|
7
|
+
const NULL_PLACEHOLDER = [];
|
|
8
|
+
export function useSuspenseFragment(options) {
|
|
9
|
+
"use no memo";
|
|
10
|
+
return wrapHook("useSuspenseFragment",
|
|
11
|
+
// eslint-disable-next-line react-compiler/react-compiler
|
|
12
|
+
useSuspenseFragment_, useApolloClient(typeof options === "object" ? options.client : undefined))(options);
|
|
13
|
+
}
|
|
14
|
+
function useSuspenseFragment_(options) {
|
|
15
|
+
const client = useApolloClient(options.client);
|
|
16
|
+
const { from, variables } = options;
|
|
17
|
+
const { cache } = client;
|
|
18
|
+
const id = React.useMemo(() => typeof from === "string" ? from
|
|
19
|
+
: from === null ? null
|
|
20
|
+
: cache.identify(from), [cache, from]);
|
|
21
|
+
const fragmentRef = id === null ? null : (getSuspenseCache(client).getFragmentRef([id, options.fragment, canonicalStringify(variables)], client, { ...options, variables: variables, from: id }));
|
|
22
|
+
let [current, setPromise] = React.useState(fragmentRef === null ? NULL_PLACEHOLDER : ([fragmentRef.key, fragmentRef.promise]));
|
|
23
|
+
React.useEffect(() => {
|
|
24
|
+
if (fragmentRef === null) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const dispose = fragmentRef.retain();
|
|
28
|
+
const removeListener = fragmentRef.listen((promise) => {
|
|
29
|
+
setPromise([fragmentRef.key, promise]);
|
|
30
|
+
});
|
|
31
|
+
return () => {
|
|
32
|
+
dispose();
|
|
33
|
+
removeListener();
|
|
34
|
+
};
|
|
35
|
+
}, [fragmentRef]);
|
|
36
|
+
if (fragmentRef === null) {
|
|
37
|
+
return { data: null };
|
|
38
|
+
}
|
|
39
|
+
if (current[0] !== fragmentRef.key) {
|
|
40
|
+
// eslint-disable-next-line react-compiler/react-compiler
|
|
41
|
+
current[0] = fragmentRef.key;
|
|
42
|
+
current[1] = fragmentRef.promise;
|
|
43
|
+
}
|
|
44
|
+
const data = __use(current[1]);
|
|
45
|
+
return { data };
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=useSuspenseFragment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSuspenseFragment.js","sourceRoot":"","sources":["../../../src/react/hooks/useSuspenseFragment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAQjE,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AA0CvD,MAAM,gBAAgB,GAAG,EAGxB,CAAC;AAoCF,MAAM,UAAU,mBAAmB,CAIjC,OAAuD;IAEvD,aAAa,CAAC;IACd,OAAO,QAAQ,CACb,qBAAqB;IACrB,yDAAyD;IACzD,oBAAoB,EACpB,eAAe,CAAC,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAC1E,CAAC,OAAO,CAAC,CAAC;AACb,CAAC;AAED,SAAS,oBAAoB,CAI3B,OAAuD;IAEvD,MAAM,MAAM,GAAG,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/C,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IACpC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;IAEzB,MAAM,EAAE,GAAG,KAAK,CAAC,OAAO,CACtB,GAAG,EAAE,CACH,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI;QAC/B,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI;YACtB,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAC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ACzD,OAAO,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,GAAG,CAAC;QAC7B,OAAO,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC;IACnC,CAAC;IAED,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAE/B,OAAO,EAAE,IAAI,EAAE,CAAC;AAClB,CAAC","sourcesContent":["import * as React from \"react\";\n\nimport type {\n ApolloClient,\n DataValue,\n DocumentNode,\n OperationVariables,\n Reference,\n StoreObject,\n TypedDocumentNode,\n} from \"@apollo/client\";\nimport { canonicalStringify } from \"@apollo/client/cache\";\nimport type { FragmentType, MaybeMasked } from \"@apollo/client/masking\";\nimport { getSuspenseCache } from \"@apollo/client/react/internal\";\nimport type {\n NoInfer,\n VariablesOption,\n} from \"@apollo/client/utilities/internal\";\n\nimport type { FragmentKey } from \"../internal/cache/types.js\";\n\nimport { __use } from \"./internal/__use.js\";\nimport { wrapHook } from \"./internal/index.js\";\nimport { useApolloClient } from \"./useApolloClient.js\";\n\ntype From<TData> =\n | StoreObject\n | Reference\n | FragmentType<NoInfer<TData>>\n | string\n | null;\n\nexport declare namespace useSuspenseFragment {\n export type Options<TData, TVariables extends OperationVariables> = {\n /**\n * A GraphQL document created using the `gql` template string tag from\n * `graphql-tag` with one or more fragments which will be used to determine\n * the shape of data to read. If you provide more than one fragment in this\n * document then you must also specify `fragmentName` to select a single.\n */\n fragment: DocumentNode | TypedDocumentNode<TData, TVariables>;\n\n /**\n * The name of the fragment in your GraphQL document to be used. If you do\n * not provide a `fragmentName` and there is only one fragment in your\n * `fragment` document then that fragment will be used.\n */\n fragmentName?: string;\n from: From<TData>;\n // Override this field to make it optional (default: true).\n optimistic?: boolean;\n /**\n * The instance of `ApolloClient` to use to look up the fragment.\n *\n * By default, the instance that's passed down via context is used, but you\n * can provide a different instance here.\n *\n * @docGroup 1. Operation options\n */\n client?: ApolloClient;\n } & VariablesOption<NoInfer<TVariables>>;\n\n export type Result<TData> = { data: DataValue.Complete<MaybeMasked<TData>> };\n}\n\nconst NULL_PLACEHOLDER = [] as unknown as [\n FragmentKey,\n Promise<MaybeMasked<any> | null>,\n];\n\nexport function useSuspenseFragment<\n TData,\n TVariables extends OperationVariables = OperationVariables,\n>(\n options: useSuspenseFragment.Options<TData, TVariables> & {\n from: NonNullable<From<TData>>;\n }\n): useSuspenseFragment.Result<TData>;\n\nexport function useSuspenseFragment<\n TData,\n TVariables extends OperationVariables = OperationVariables,\n>(\n options: useSuspenseFragment.Options<TData, TVariables> & {\n from: null;\n }\n): useSuspenseFragment.Result<null>;\n\nexport function useSuspenseFragment<\n TData,\n TVariables extends OperationVariables = OperationVariables,\n>(\n options: useSuspenseFragment.Options<TData, TVariables> & {\n from: From<TData>;\n }\n): useSuspenseFragment.Result<TData | null>;\n\nexport function useSuspenseFragment<\n TData,\n TVariables extends OperationVariables = OperationVariables,\n>(\n options: useSuspenseFragment.Options<TData, TVariables>\n): useSuspenseFragment.Result<TData>;\n\nexport function useSuspenseFragment<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n>(\n options: useSuspenseFragment.Options<TData, TVariables>\n): useSuspenseFragment.Result<TData | null> {\n \"use no memo\";\n return wrapHook(\n \"useSuspenseFragment\",\n // eslint-disable-next-line react-compiler/react-compiler\n useSuspenseFragment_,\n useApolloClient(typeof options === \"object\" ? options.client : undefined)\n )(options);\n}\n\nfunction useSuspenseFragment_<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n>(\n options: useSuspenseFragment.Options<TData, TVariables>\n): useSuspenseFragment.Result<TData | null> {\n const client = useApolloClient(options.client);\n const { from, variables } = options;\n const { cache } = client;\n\n const id = React.useMemo(\n () =>\n typeof from === \"string\" ? from\n : from === null ? null\n : cache.identify(from),\n [cache, from]\n ) as string | null;\n\n const fragmentRef =\n id === null ? null : (\n getSuspenseCache(client).getFragmentRef(\n [id, options.fragment, canonicalStringify(variables)],\n client,\n { ...options, variables: variables as TVariables, from: id }\n )\n );\n\n let [current, setPromise] = React.useState<\n [FragmentKey, Promise<MaybeMasked<TData> | null>]\n >(\n fragmentRef === null ? NULL_PLACEHOLDER : (\n [fragmentRef.key, fragmentRef.promise]\n )\n );\n\n React.useEffect(() => {\n if (fragmentRef === null) {\n return;\n }\n\n const dispose = fragmentRef.retain();\n const removeListener = fragmentRef.listen((promise) => {\n setPromise([fragmentRef.key, promise]);\n });\n\n return () => {\n dispose();\n removeListener();\n };\n }, [fragmentRef]);\n\n if (fragmentRef === null) {\n return { data: null };\n }\n\n if (current[0] !== fragmentRef.key) {\n // eslint-disable-next-line react-compiler/react-compiler\n current[0] = fragmentRef.key;\n current[1] = fragmentRef.promise;\n }\n\n const data = __use(current[1]);\n\n return { data };\n}\n"]}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import type { ApolloClient, DataState, DefaultContext, DocumentNode, ErrorLike, ErrorPolicy, GetDataState, MaybeMasked, OperationVariables, RefetchWritePolicy, TypedDocumentNode, WatchQueryFetchPolicy, WatchQueryOptions } from "@apollo/client";
|
|
2
|
+
import type { SubscribeToMoreFunction } from "@apollo/client";
|
|
3
|
+
import { NetworkStatus } from "@apollo/client";
|
|
4
|
+
import type { FetchMoreFunction, RefetchFunction } from "@apollo/client/react/internal";
|
|
5
|
+
import type { NoInfer, VariablesOption } from "@apollo/client/utilities/internal";
|
|
6
|
+
import type { SkipToken } from "./constants.js";
|
|
7
|
+
export declare namespace useSuspenseQuery {
|
|
8
|
+
type FetchPolicy = Extract<WatchQueryFetchPolicy, "cache-first" | "network-only" | "no-cache" | "cache-and-network">;
|
|
9
|
+
type Options<TVariables extends OperationVariables = OperationVariables> = {
|
|
10
|
+
/**
|
|
11
|
+
* The instance of `ApolloClient` to use to execute the query.
|
|
12
|
+
*
|
|
13
|
+
* By default, the instance that's passed down via context is used, but you can provide a different instance here.
|
|
14
|
+
*
|
|
15
|
+
* @docGroup
|
|
16
|
+
*
|
|
17
|
+
* 1. Operation options
|
|
18
|
+
*/
|
|
19
|
+
client?: ApolloClient;
|
|
20
|
+
/**
|
|
21
|
+
* If you're using [Apollo Link](https://www.apollographql.com/docs/react/api/link/introduction/), this object is the initial value of the `context` object that's passed along your link chain.
|
|
22
|
+
*
|
|
23
|
+
* @docGroup
|
|
24
|
+
*
|
|
25
|
+
* 2. Networking options
|
|
26
|
+
*/
|
|
27
|
+
context?: DefaultContext;
|
|
28
|
+
/**
|
|
29
|
+
* Specifies how the query handles a response that returns both GraphQL errors and partial results.
|
|
30
|
+
*
|
|
31
|
+
* For details, see [GraphQL error policies](https://www.apollographql.com/docs/react/data/error-handling/#graphql-error-policies).
|
|
32
|
+
*
|
|
33
|
+
* The default value is `none`, meaning that the query result includes error details but not partial results.
|
|
34
|
+
*
|
|
35
|
+
* @docGroup
|
|
36
|
+
*
|
|
37
|
+
* 1. Operation options
|
|
38
|
+
*/
|
|
39
|
+
errorPolicy?: ErrorPolicy;
|
|
40
|
+
/**
|
|
41
|
+
* If `true`, the query can return partial results from the cache if the cache doesn't contain results for all queried fields.
|
|
42
|
+
*
|
|
43
|
+
* The default value is `false`.
|
|
44
|
+
*
|
|
45
|
+
* @docGroup
|
|
46
|
+
*
|
|
47
|
+
* 3. Caching options
|
|
48
|
+
*/
|
|
49
|
+
returnPartialData?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Watched queries must opt into overwriting existing data on refetch, by passing refetchWritePolicy: "overwrite" in their WatchQueryOptions.
|
|
52
|
+
*
|
|
53
|
+
* The default value is "overwrite".
|
|
54
|
+
*
|
|
55
|
+
* @docGroup
|
|
56
|
+
*
|
|
57
|
+
* 3. Caching options
|
|
58
|
+
*/
|
|
59
|
+
refetchWritePolicy?: RefetchWritePolicy;
|
|
60
|
+
/**
|
|
61
|
+
* Specifies how the query interacts with the Apollo Client cache during execution (for example, whether it checks the cache for results before sending a request to the server).
|
|
62
|
+
*
|
|
63
|
+
* For details, see [Setting a fetch policy](https://www.apollographql.com/docs/react/data/queries/#setting-a-fetch-policy).
|
|
64
|
+
*
|
|
65
|
+
* The default value is `cache-first`.
|
|
66
|
+
*
|
|
67
|
+
* @docGroup
|
|
68
|
+
*
|
|
69
|
+
* 3. Caching options
|
|
70
|
+
*/
|
|
71
|
+
fetchPolicy?: FetchPolicy;
|
|
72
|
+
/**
|
|
73
|
+
* A unique identifier for the query. Each item in the array must be a stable identifier to prevent infinite fetches.
|
|
74
|
+
*
|
|
75
|
+
* This is useful when using the same query and variables combination in more than one component, otherwise the components may clobber each other. This can also be used to force the query to re-evaluate fresh.
|
|
76
|
+
*
|
|
77
|
+
* @docGroup
|
|
78
|
+
*
|
|
79
|
+
* 1. Operation options
|
|
80
|
+
*/
|
|
81
|
+
queryKey?: string | number | any[];
|
|
82
|
+
/**
|
|
83
|
+
* If `true`, the query is not executed. The default value is `false`.
|
|
84
|
+
*
|
|
85
|
+
* @deprecated
|
|
86
|
+
*
|
|
87
|
+
* We recommend using `skipToken` in place of the `skip` option as it is more type-safe.
|
|
88
|
+
*
|
|
89
|
+
* This option is deprecated and only supported to ease the migration from useQuery. It will be removed in a future release.
|
|
90
|
+
*
|
|
91
|
+
* @docGroup
|
|
92
|
+
*
|
|
93
|
+
* 1. Operation options
|
|
94
|
+
*
|
|
95
|
+
*
|
|
96
|
+
* @example Recommended usage of `skipToken`:
|
|
97
|
+
* ```ts
|
|
98
|
+
* import { skipToken, useSuspenseQuery } from '@apollo/client';
|
|
99
|
+
*
|
|
100
|
+
* const { data } = useSuspenseQuery(query, id ? { variables: { id } } : skipToken);
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
skip?: boolean;
|
|
104
|
+
} & VariablesOption<TVariables>;
|
|
105
|
+
type Result<TData = unknown, TVariables extends OperationVariables = OperationVariables, TStates extends DataState<TData>["dataState"] = DataState<TData>["dataState"]> = {
|
|
106
|
+
/**
|
|
107
|
+
* The instance of `ApolloClient` to use to execute the query.
|
|
108
|
+
*
|
|
109
|
+
* By default, the instance that's passed down via context is used, but you can provide a different instance here.
|
|
110
|
+
*
|
|
111
|
+
* @docGroup
|
|
112
|
+
*
|
|
113
|
+
* 1. Operation options
|
|
114
|
+
*/
|
|
115
|
+
client: ApolloClient;
|
|
116
|
+
/**
|
|
117
|
+
* If the query produces one or more errors, this object contains either an array of `graphQLErrors` or a single `networkError`. Otherwise, this value is `undefined`.
|
|
118
|
+
*
|
|
119
|
+
* For more information, see [Handling operation errors](https://www.apollographql.com/docs/react/data/error-handling/).
|
|
120
|
+
*
|
|
121
|
+
* @docGroup
|
|
122
|
+
*
|
|
123
|
+
* 1. Operation data
|
|
124
|
+
*/
|
|
125
|
+
error: ErrorLike | undefined;
|
|
126
|
+
/**
|
|
127
|
+
* A function that helps you fetch the next set of results for a [paginated list field](https://www.apollographql.com/docs/react/pagination/core-api/).
|
|
128
|
+
*
|
|
129
|
+
*
|
|
130
|
+
* @docGroup
|
|
131
|
+
*
|
|
132
|
+
* 3. Helper functions
|
|
133
|
+
*/
|
|
134
|
+
fetchMore: FetchMoreFunction<TData, TVariables>;
|
|
135
|
+
/**
|
|
136
|
+
* A number indicating the current network state of the query's associated request. [See possible values.](https://github.com/apollographql/apollo-client/blob/d96f4578f89b933c281bb775a39503f6cdb59ee8/src/core/networkStatus.ts#L4)
|
|
137
|
+
*
|
|
138
|
+
* Used in conjunction with the [`notifyOnNetworkStatusChange`](#notifyonnetworkstatuschange) option.
|
|
139
|
+
*
|
|
140
|
+
* @docGroup
|
|
141
|
+
*
|
|
142
|
+
* 2. Network info
|
|
143
|
+
*/
|
|
144
|
+
networkStatus: NetworkStatus;
|
|
145
|
+
/**
|
|
146
|
+
* A function that enables you to re-execute the query, optionally passing in new `variables`.
|
|
147
|
+
*
|
|
148
|
+
* To guarantee that the refetch performs a network request, its `fetchPolicy` is set to `network-only` (unless the original query's `fetchPolicy` is `no-cache` or `cache-and-network`, which also guarantee a network request).
|
|
149
|
+
*
|
|
150
|
+
* See also [Refetching](https://www.apollographql.com/docs/react/data/queries/#refetching).
|
|
151
|
+
*
|
|
152
|
+
* @docGroup
|
|
153
|
+
*
|
|
154
|
+
* 3. Helper functions
|
|
155
|
+
*/
|
|
156
|
+
refetch: RefetchFunction<TData, TVariables>;
|
|
157
|
+
/**
|
|
158
|
+
* A function that enables you to execute a [subscription](https://www.apollographql.com/docs/react/data/subscriptions/), usually to subscribe to specific fields that were included in the query.
|
|
159
|
+
*
|
|
160
|
+
* This function returns _another_ function that you can call to terminate the subscription.
|
|
161
|
+
*
|
|
162
|
+
*
|
|
163
|
+
* @docGroup
|
|
164
|
+
*
|
|
165
|
+
* 3. Helper functions
|
|
166
|
+
*/
|
|
167
|
+
subscribeToMore: SubscribeToMoreFunction<TData, TVariables>;
|
|
168
|
+
} & GetDataState<MaybeMasked<TData>, TStates>;
|
|
169
|
+
}
|
|
170
|
+
export declare function useSuspenseQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useSuspenseQuery.Options<NoInfer<TVariables>> & {
|
|
171
|
+
returnPartialData: true;
|
|
172
|
+
errorPolicy: "ignore" | "all";
|
|
173
|
+
}): useSuspenseQuery.Result<TData, TVariables, "complete" | "streaming" | "partial" | "empty">;
|
|
174
|
+
export declare function useSuspenseQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useSuspenseQuery.Options<NoInfer<TVariables>> & {
|
|
175
|
+
errorPolicy: "ignore" | "all";
|
|
176
|
+
}): useSuspenseQuery.Result<TData, TVariables, "complete" | "streaming" | "empty">;
|
|
177
|
+
export declare function useSuspenseQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useSuspenseQuery.Options<NoInfer<TVariables>> & {
|
|
178
|
+
skip: boolean;
|
|
179
|
+
returnPartialData: true;
|
|
180
|
+
}): useSuspenseQuery.Result<TData, TVariables, "complete" | "empty" | "streaming" | "partial">;
|
|
181
|
+
export declare function useSuspenseQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useSuspenseQuery.Options<NoInfer<TVariables>> & {
|
|
182
|
+
returnPartialData: true;
|
|
183
|
+
}): useSuspenseQuery.Result<TData, TVariables, "partial" | "streaming" | "complete">;
|
|
184
|
+
export declare function useSuspenseQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useSuspenseQuery.Options<NoInfer<TVariables>> & {
|
|
185
|
+
skip: boolean;
|
|
186
|
+
}): useSuspenseQuery.Result<TData, TVariables, "complete" | "streaming" | "empty">;
|
|
187
|
+
export declare function useSuspenseQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: SkipToken | (useSuspenseQuery.Options<NoInfer<TVariables>> & {
|
|
188
|
+
returnPartialData: true;
|
|
189
|
+
})): useSuspenseQuery.Result<TData, TVariables, "empty" | "streaming" | "complete" | "partial">;
|
|
190
|
+
export declare function useSuspenseQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, ...[options]: {} extends TVariables ? [
|
|
191
|
+
options?: useSuspenseQuery.Options<NoInfer<TVariables>>
|
|
192
|
+
] : [options: useSuspenseQuery.Options<NoInfer<TVariables>>]): useSuspenseQuery.Result<TData, TVariables, "complete" | "streaming">;
|
|
193
|
+
export declare function useSuspenseQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, ...[options]: {} extends TVariables ? [
|
|
194
|
+
options?: SkipToken | useSuspenseQuery.Options<NoInfer<TVariables>>
|
|
195
|
+
] : [options: SkipToken | useSuspenseQuery.Options<NoInfer<TVariables>>]): useSuspenseQuery.Result<TData, TVariables, "complete" | "streaming" | "empty">;
|
|
196
|
+
export declare function useSuspenseQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: SkipToken | useSuspenseQuery.Options<NoInfer<TVariables>>): useSuspenseQuery.Result<TData, TVariables, "complete" | "streaming" | "empty">;
|
|
197
|
+
interface UseWatchQueryOptionsHookOptions<TData, TVariables extends OperationVariables> {
|
|
198
|
+
client: ApolloClient;
|
|
199
|
+
query: DocumentNode | TypedDocumentNode<TData, TVariables>;
|
|
200
|
+
options: SkipToken | useSuspenseQuery.Options<TVariables>;
|
|
201
|
+
}
|
|
202
|
+
export declare function useWatchQueryOptions<TData, TVariables extends OperationVariables>({ client, query, options, }: UseWatchQueryOptionsHookOptions<TData, TVariables>): WatchQueryOptions<TVariables, TData>;
|
|
203
|
+
export {};
|
|
204
|
+
//# sourceMappingURL=useSuspenseQuery.d.ts.map
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { c as _c } from "@apollo/client/react/internal/compiler-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { NetworkStatus } from "@apollo/client";
|
|
4
|
+
import { canonicalStringify } from "@apollo/client/cache";
|
|
5
|
+
import { getSuspenseCache } from "@apollo/client/react/internal";
|
|
6
|
+
import { __DEV__ } from "@apollo/client/utilities/environment";
|
|
7
|
+
import { skipToken } from "./constants.js";
|
|
8
|
+
import { __use, useDeepMemo, wrapHook } from "./internal/index.js";
|
|
9
|
+
import { validateSuspenseHookOptions } from "./internal/validateSuspenseHookOptions.js";
|
|
10
|
+
import { useApolloClient } from "./useApolloClient.js";
|
|
11
|
+
export function useSuspenseQuery(query, options) {
|
|
12
|
+
"use no memo";
|
|
13
|
+
return wrapHook("useSuspenseQuery",
|
|
14
|
+
// eslint-disable-next-line react-compiler/react-compiler
|
|
15
|
+
useSuspenseQuery_, useApolloClient(typeof options === "object" ? options.client : undefined))(query, options ?? {});
|
|
16
|
+
}
|
|
17
|
+
function useSuspenseQuery_(query, options) {
|
|
18
|
+
const client = useApolloClient(options.client);
|
|
19
|
+
const suspenseCache = getSuspenseCache(client);
|
|
20
|
+
const watchQueryOptions = useWatchQueryOptions({
|
|
21
|
+
client,
|
|
22
|
+
query,
|
|
23
|
+
options,
|
|
24
|
+
});
|
|
25
|
+
const { fetchPolicy, variables } = watchQueryOptions;
|
|
26
|
+
const { queryKey = [] } = options;
|
|
27
|
+
const cacheKey = [
|
|
28
|
+
query,
|
|
29
|
+
canonicalStringify(variables),
|
|
30
|
+
...[].concat(queryKey),
|
|
31
|
+
];
|
|
32
|
+
const queryRef = suspenseCache.getQueryRef(cacheKey, () => client.watchQuery(watchQueryOptions));
|
|
33
|
+
let [current, setPromise] = React.useState([queryRef.key, queryRef.promise]);
|
|
34
|
+
// This saves us a re-execution of the render function when a variable changed.
|
|
35
|
+
if (current[0] !== queryRef.key) {
|
|
36
|
+
// eslint-disable-next-line react-compiler/react-compiler
|
|
37
|
+
current[0] = queryRef.key;
|
|
38
|
+
current[1] = queryRef.promise;
|
|
39
|
+
}
|
|
40
|
+
let promise = current[1];
|
|
41
|
+
if (queryRef.didChangeOptions(watchQueryOptions)) {
|
|
42
|
+
current[1] = promise = queryRef.applyOptions(watchQueryOptions);
|
|
43
|
+
}
|
|
44
|
+
React.useEffect(() => {
|
|
45
|
+
const dispose = queryRef.retain();
|
|
46
|
+
const removeListener = queryRef.listen((promise_0) => {
|
|
47
|
+
setPromise([queryRef.key, promise_0]);
|
|
48
|
+
});
|
|
49
|
+
return () => {
|
|
50
|
+
removeListener();
|
|
51
|
+
dispose();
|
|
52
|
+
};
|
|
53
|
+
}, [queryRef]);
|
|
54
|
+
const skipResult = React.useMemo(() => {
|
|
55
|
+
const error = queryRef.result.error;
|
|
56
|
+
const complete = !!queryRef.result.data;
|
|
57
|
+
return {
|
|
58
|
+
loading: false,
|
|
59
|
+
data: queryRef.result.data,
|
|
60
|
+
dataState: queryRef.result.dataState,
|
|
61
|
+
networkStatus: error ? NetworkStatus.error : NetworkStatus.ready,
|
|
62
|
+
error,
|
|
63
|
+
complete,
|
|
64
|
+
partial: !complete,
|
|
65
|
+
};
|
|
66
|
+
}, [queryRef.result]);
|
|
67
|
+
const result = fetchPolicy === "standby" ? skipResult : __use(promise);
|
|
68
|
+
const fetchMore = React.useCallback((options_0) => {
|
|
69
|
+
const promise_1 = queryRef.fetchMore(options_0);
|
|
70
|
+
setPromise([queryRef.key, queryRef.promise]);
|
|
71
|
+
return promise_1;
|
|
72
|
+
}, [queryRef]);
|
|
73
|
+
const refetch = React.useCallback((variables_0) => {
|
|
74
|
+
const promise_2 = queryRef.refetch(variables_0);
|
|
75
|
+
setPromise([queryRef.key, queryRef.promise]);
|
|
76
|
+
return promise_2;
|
|
77
|
+
}, [queryRef]);
|
|
78
|
+
// TODO: The internalQueryRef doesn't have TVariables' type information so we have to cast it here
|
|
79
|
+
const subscribeToMore = queryRef.observable
|
|
80
|
+
.subscribeToMore;
|
|
81
|
+
return React.useMemo(() => {
|
|
82
|
+
return {
|
|
83
|
+
client,
|
|
84
|
+
data: result.data,
|
|
85
|
+
dataState: result.dataState,
|
|
86
|
+
error: result.error,
|
|
87
|
+
networkStatus: result.networkStatus,
|
|
88
|
+
fetchMore,
|
|
89
|
+
refetch,
|
|
90
|
+
subscribeToMore,
|
|
91
|
+
};
|
|
92
|
+
}, [client, fetchMore, refetch, result, subscribeToMore]);
|
|
93
|
+
}
|
|
94
|
+
export function useWatchQueryOptions(t0) {
|
|
95
|
+
const $ = _c(5);
|
|
96
|
+
const {
|
|
97
|
+
client,
|
|
98
|
+
query,
|
|
99
|
+
options
|
|
100
|
+
} = t0;
|
|
101
|
+
let t1;
|
|
102
|
+
let t2;
|
|
103
|
+
|
|
104
|
+
if ($[0] !== client || $[1] !== options || $[2] !== query) {
|
|
105
|
+
t1 = () => {
|
|
106
|
+
if (options === skipToken) {
|
|
107
|
+
return {
|
|
108
|
+
query,
|
|
109
|
+
fetchPolicy: "standby"
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const fetchPolicy = options.fetchPolicy || client.defaultOptions.watchQuery?.fetchPolicy || "cache-first";
|
|
114
|
+
const watchQueryOptions = {
|
|
115
|
+
...options,
|
|
116
|
+
fetchPolicy,
|
|
117
|
+
query,
|
|
118
|
+
notifyOnNetworkStatusChange: false,
|
|
119
|
+
nextFetchPolicy: void 0
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
if (__DEV__) {
|
|
123
|
+
validateSuspenseHookOptions(watchQueryOptions);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (options.skip) {
|
|
127
|
+
watchQueryOptions.fetchPolicy = "standby";
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return watchQueryOptions;
|
|
131
|
+
};t2 = [client, options, query];
|
|
132
|
+
$[0] = client;
|
|
133
|
+
$[1] = options;
|
|
134
|
+
$[2] = query;
|
|
135
|
+
$[3] = t1;
|
|
136
|
+
$[4] = t2;
|
|
137
|
+
} else {
|
|
138
|
+
t1 = $[3];
|
|
139
|
+
t2 = $[4];
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return useDeepMemo(t1, t2);
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=useSuspenseQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSuspenseQuery.js","sources":["../../../src/react/hooks/useSuspenseQuery.ts"],"sourcesContent":["import * as React from \"react\";\n\nimport type {\n ApolloClient,\n ApolloQueryResult,\n DataState,\n DefaultContext,\n DocumentNode,\n ErrorLike,\n ErrorPolicy,\n GetDataState,\n MaybeMasked,\n OperationVariables,\n RefetchWritePolicy,\n TypedDocumentNode,\n WatchQueryFetchPolicy,\n WatchQueryOptions,\n} from \"@apollo/client\";\nimport type { SubscribeToMoreFunction } from \"@apollo/client\";\nimport { NetworkStatus } from \"@apollo/client\";\nimport { canonicalStringify } from \"@apollo/client/cache\";\nimport type {\n CacheKey,\n FetchMoreFunction,\n QueryKey,\n RefetchFunction,\n} from \"@apollo/client/react/internal\";\nimport { getSuspenseCache } from \"@apollo/client/react/internal\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport type {\n NoInfer,\n VariablesOption,\n} from \"@apollo/client/utilities/internal\";\n\nimport type { SkipToken } from \"./constants.js\";\nimport { skipToken } from \"./constants.js\";\nimport { __use, useDeepMemo, wrapHook } from \"./internal/index.js\";\nimport { validateSuspenseHookOptions } from \"./internal/validateSuspenseHookOptions.js\";\nimport { useApolloClient } from \"./useApolloClient.js\";\n\nexport declare namespace useSuspenseQuery {\n export type FetchPolicy = Extract<\n WatchQueryFetchPolicy,\n \"cache-first\" | \"network-only\" | \"no-cache\" | \"cache-and-network\"\n >;\n\n export type Options<\n TVariables extends OperationVariables = OperationVariables,\n > = {\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#client:member} */\n client?: ApolloClient;\n\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#context:member} */\n context?: DefaultContext;\n\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#errorPolicy:member} */\n errorPolicy?: ErrorPolicy;\n\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#returnPartialData:member} */\n returnPartialData?: boolean;\n\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#refetchWritePolicy_suspense:member} */\n refetchWritePolicy?: RefetchWritePolicy;\n\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#fetchPolicy:member} */\n fetchPolicy?: FetchPolicy;\n\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#queryKey:member} */\n queryKey?: string | number | any[];\n\n /**\n * {@inheritDoc @apollo/client!QueryOptionsDocumentation#skip_deprecated:member}\n *\n * @example Recommended usage of `skipToken`:\n * ```ts\n * import { skipToken, useSuspenseQuery } from '@apollo/client';\n *\n * const { data } = useSuspenseQuery(query, id ? { variables: { id } } : skipToken);\n * ```\n */\n skip?: boolean;\n } & VariablesOption<TVariables>;\n\n export type Result<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n TStates extends\n DataState<TData>[\"dataState\"] = DataState<TData>[\"dataState\"],\n > = {\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#client:member} */\n client: ApolloClient;\n\n /** {@inheritDoc @apollo/client!QueryResultDocumentation#error:member} */\n error: ErrorLike | undefined;\n\n /** {@inheritDoc @apollo/client!QueryResultDocumentation#fetchMore:member} */\n fetchMore: FetchMoreFunction<TData, TVariables>;\n\n /** {@inheritDoc @apollo/client!QueryResultDocumentation#networkStatus:member} */\n networkStatus: NetworkStatus;\n\n /** {@inheritDoc @apollo/client!QueryResultDocumentation#refetch:member} */\n refetch: RefetchFunction<TData, TVariables>;\n\n /** {@inheritDoc @apollo/client!QueryResultDocumentation#subscribeToMore:member} */\n subscribeToMore: SubscribeToMoreFunction<TData, TVariables>;\n } & GetDataState<MaybeMasked<TData>, TStates>;\n}\n\nexport function useSuspenseQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useSuspenseQuery.Options<NoInfer<TVariables>> & {\n returnPartialData: true;\n errorPolicy: \"ignore\" | \"all\";\n }\n): useSuspenseQuery.Result<\n TData,\n TVariables,\n \"complete\" | \"streaming\" | \"partial\" | \"empty\"\n>;\n\nexport function useSuspenseQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useSuspenseQuery.Options<NoInfer<TVariables>> & {\n errorPolicy: \"ignore\" | \"all\";\n }\n): useSuspenseQuery.Result<\n TData,\n TVariables,\n \"complete\" | \"streaming\" | \"empty\"\n>;\n\nexport function useSuspenseQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useSuspenseQuery.Options<NoInfer<TVariables>> & {\n skip: boolean;\n returnPartialData: true;\n }\n): useSuspenseQuery.Result<\n TData,\n TVariables,\n \"complete\" | \"empty\" | \"streaming\" | \"partial\"\n>;\n\nexport function useSuspenseQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useSuspenseQuery.Options<NoInfer<TVariables>> & {\n returnPartialData: true;\n }\n): useSuspenseQuery.Result<\n TData,\n TVariables,\n \"partial\" | \"streaming\" | \"complete\"\n>;\n\nexport function useSuspenseQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useSuspenseQuery.Options<NoInfer<TVariables>> & {\n skip: boolean;\n }\n): useSuspenseQuery.Result<\n TData,\n TVariables,\n \"complete\" | \"streaming\" | \"empty\"\n>;\n\nexport function useSuspenseQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options:\n | SkipToken\n | (useSuspenseQuery.Options<NoInfer<TVariables>> & {\n returnPartialData: true;\n })\n): useSuspenseQuery.Result<\n TData,\n TVariables,\n \"empty\" | \"streaming\" | \"complete\" | \"partial\"\n>;\n\nexport function useSuspenseQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n ...[options]: {} extends TVariables ?\n [options?: useSuspenseQuery.Options<NoInfer<TVariables>>]\n : [options: useSuspenseQuery.Options<NoInfer<TVariables>>]\n): useSuspenseQuery.Result<TData, TVariables, \"complete\" | \"streaming\">;\n\nexport function useSuspenseQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n ...[options]: {} extends TVariables ?\n [options?: SkipToken | useSuspenseQuery.Options<NoInfer<TVariables>>]\n : [options: SkipToken | useSuspenseQuery.Options<NoInfer<TVariables>>]\n): useSuspenseQuery.Result<\n TData,\n TVariables,\n \"complete\" | \"streaming\" | \"empty\"\n>;\n\nexport function useSuspenseQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: SkipToken | useSuspenseQuery.Options<NoInfer<TVariables>>\n): useSuspenseQuery.Result<\n TData,\n TVariables,\n \"complete\" | \"streaming\" | \"empty\"\n>;\n\nexport function useSuspenseQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options?: SkipToken | useSuspenseQuery.Options<NoInfer<TVariables>>\n): useSuspenseQuery.Result<\n TData,\n TVariables,\n \"empty\" | \"streaming\" | \"complete\" | \"partial\"\n> {\n \"use no memo\";\n return wrapHook(\n \"useSuspenseQuery\",\n // eslint-disable-next-line react-compiler/react-compiler\n useSuspenseQuery_,\n useApolloClient(typeof options === \"object\" ? options.client : undefined)\n )(query, options ?? ({} as any));\n}\n\nfunction useSuspenseQuery_<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options:\n | (SkipToken & Partial<useSuspenseQuery.Options<TVariables>>)\n | useSuspenseQuery.Options<TVariables>\n): useSuspenseQuery.Result<\n TData,\n TVariables,\n \"partial\" | \"complete\" | \"streaming\" | \"empty\"\n> {\n const client = useApolloClient(options.client);\n const suspenseCache = getSuspenseCache(client);\n const watchQueryOptions = useWatchQueryOptions<any, any>({\n client,\n query,\n options,\n });\n const { fetchPolicy, variables } = watchQueryOptions;\n const { queryKey = [] } = options;\n\n const cacheKey: CacheKey = [\n query,\n canonicalStringify(variables),\n ...([] as any[]).concat(queryKey),\n ];\n\n const queryRef = suspenseCache.getQueryRef(cacheKey, () =>\n client.watchQuery(watchQueryOptions)\n );\n\n let [current, setPromise] = React.useState<\n [QueryKey, Promise<ApolloQueryResult<any>>]\n >([queryRef.key, queryRef.promise]);\n\n // This saves us a re-execution of the render function when a variable changed.\n if (current[0] !== queryRef.key) {\n // eslint-disable-next-line react-compiler/react-compiler\n current[0] = queryRef.key;\n current[1] = queryRef.promise;\n }\n let promise = current[1];\n\n if (queryRef.didChangeOptions(watchQueryOptions)) {\n current[1] = promise = queryRef.applyOptions(watchQueryOptions);\n }\n\n React.useEffect(() => {\n const dispose = queryRef.retain();\n\n const removeListener = queryRef.listen((promise) => {\n setPromise([queryRef.key, promise]);\n });\n\n return () => {\n removeListener();\n dispose();\n };\n }, [queryRef]);\n\n const skipResult = React.useMemo<ApolloQueryResult<TData>>(() => {\n const error = queryRef.result.error;\n const complete = !!queryRef.result.data;\n\n return {\n loading: false,\n data: queryRef.result.data,\n dataState: queryRef.result.dataState,\n networkStatus: error ? NetworkStatus.error : NetworkStatus.ready,\n error,\n complete,\n partial: !complete,\n };\n }, [queryRef.result]);\n\n const result = fetchPolicy === \"standby\" ? skipResult : __use(promise);\n\n const fetchMore = React.useCallback<\n FetchMoreFunction<unknown, OperationVariables>\n >(\n (options) => {\n const promise = queryRef.fetchMore(options);\n setPromise([queryRef.key, queryRef.promise]);\n\n return promise;\n },\n [queryRef]\n ) as FetchMoreFunction<TData | undefined, TVariables>;\n\n const refetch: RefetchFunction<TData, TVariables> = React.useCallback(\n (variables) => {\n const promise = queryRef.refetch(variables);\n setPromise([queryRef.key, queryRef.promise]);\n\n return promise;\n },\n [queryRef]\n );\n\n // TODO: The internalQueryRef doesn't have TVariables' type information so we have to cast it here\n const subscribeToMore = queryRef.observable\n .subscribeToMore as SubscribeToMoreFunction<TData | undefined, TVariables>;\n\n return React.useMemo<\n useSuspenseQuery.Result<TData, TVariables, DataState<TData>[\"dataState\"]>\n >(() => {\n return {\n client,\n data: result.data,\n dataState: result.dataState,\n error: result.error,\n networkStatus: result.networkStatus,\n fetchMore,\n refetch,\n subscribeToMore,\n } as useSuspenseQuery.Result<\n TData,\n TVariables,\n DataState<TData>[\"dataState\"]\n >;\n }, [client, fetchMore, refetch, result, subscribeToMore]);\n}\n\ninterface UseWatchQueryOptionsHookOptions<\n TData,\n TVariables extends OperationVariables,\n> {\n client: ApolloClient;\n query: DocumentNode | TypedDocumentNode<TData, TVariables>;\n options: SkipToken | useSuspenseQuery.Options<TVariables>;\n}\n\nexport function useWatchQueryOptions<\n TData,\n TVariables extends OperationVariables,\n>({\n client,\n query,\n options,\n}: UseWatchQueryOptionsHookOptions<TData, TVariables>): WatchQueryOptions<\n TVariables,\n TData\n> {\n return useDeepMemo<WatchQueryOptions<TVariables, TData>>(() => {\n if (options === skipToken) {\n return { query, fetchPolicy: \"standby\" } as WatchQueryOptions<\n TVariables,\n TData\n >;\n }\n\n const fetchPolicy =\n options.fetchPolicy ||\n client.defaultOptions.watchQuery?.fetchPolicy ||\n \"cache-first\";\n\n const watchQueryOptions: WatchQueryOptions<TVariables, TData> = {\n ...options,\n fetchPolicy,\n query,\n notifyOnNetworkStatusChange: false,\n nextFetchPolicy: void 0,\n };\n\n if (__DEV__) {\n validateSuspenseHookOptions(watchQueryOptions);\n }\n\n // Assign the updated fetch policy after our validation since `standby` is\n // not a supported fetch policy on its own without the use of `skip`.\n if (options.skip) {\n watchQueryOptions.fetchPolicy = \"standby\";\n }\n\n return watchQueryOptions;\n }, [client, options, query]);\n}\n"],"names":[],"mappings":";AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAP,CAAA,EAAY,CAAZ,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAuB,CAAvB,CAAA,CAAA,CAAA,CAAA,CAAA,CAA8B;AAmB9B,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAA8B,CAA9B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA8C;AAC9C,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA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