@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerError.js","sources":["../../src/errors/ServerError.ts"],"sourcesContent":["import { brand, isBranded } from \"./utils.js\";\n\nexport declare namespace ServerError {\n export interface Options {\n response: Response;\n bodyText: string;\n }\n}\n\n/**\n * Thrown when a non-200 response is returned from the server.\n */\nexport class ServerError extends Error {\n /** Determine if an error is a `ServerError` instance */\n static is(error: unknown): error is ServerError {\n return isBranded(error, \"ServerError\");\n }\n\n /**\n * The server response.\n */\n response: Response;\n /**\n * The status code returned from the server.\n */\n statusCode: number;\n\n /**\n * The raw response body text.\n */\n bodyText: string;\n\n constructor(message: string, options: ServerError.Options) {\n super(message);\n this.name = \"ServerError\";\n this.response = options.response;\n this.statusCode = options.response.status;\n this.bodyText = options.bodyText;\n\n brand(this);\n Object.setPrototypeOf(this, ServerError.prototype);\n }\n}\n"]
|
|
1
|
+
{"version":3,"file":"ServerError.js","sourceRoot":"","sources":["../../src/errors/ServerError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAS9C;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,KAAK;IACpC,wDAAwD;IACxD,MAAM,CAAC,EAAE,CAAC,KAAc;QACtB,OAAO,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IACzC,CAAC;IAED;;OAEG;IACH,QAAQ,CAAW;IACnB;;OAEG;IACH,UAAU,CAAS;IAEnB;;OAEG;IACH,QAAQ,CAAS;IAEjB,YAAY,OAAe,EAAE,OAA4B;QACvD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;QAC1C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QAEjC,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACrD,CAAC;CACF","sourcesContent":["import { brand, isBranded } from \"./utils.js\";\n\nexport declare namespace ServerError {\n export interface Options {\n response: Response;\n bodyText: string;\n }\n}\n\n/**\n * Thrown when a non-200 response is returned from the server.\n */\nexport class ServerError extends Error {\n /** Determine if an error is a `ServerError` instance */\n static is(error: unknown): error is ServerError {\n return isBranded(error, \"ServerError\");\n }\n\n /**\n * The server response.\n */\n response: Response;\n /**\n * The status code returned from the server.\n */\n statusCode: number;\n\n /**\n * The raw response body text.\n */\n bodyText: string;\n\n constructor(message: string, options: ServerError.Options) {\n super(message);\n this.name = \"ServerError\";\n this.response = options.response;\n this.statusCode = options.response.status;\n this.bodyText = options.bodyText;\n\n brand(this);\n Object.setPrototypeOf(this, ServerError.prototype);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerParseError.js","sources":["../../src/errors/ServerParseError.ts"],"sourcesContent":["import { brand, isBranded } from \"./utils.js\";\n\ninterface ServerParseErrorOptions {\n response: Response;\n bodyText: string;\n}\n\n/**\n * Thrown when failing to parse the response as JSON from the server.\n */\nexport class ServerParseError extends Error {\n /** Determine if an error is an `ServerParseError` instance */\n static is(error: unknown): error is ServerParseError {\n return isBranded(error, \"ServerParseError\");\n }\n /**\n * The server response.\n */\n response: Response;\n /**\n * The status code returned from the server.\n */\n statusCode: number;\n /**\n * The raw body text returned in the server response.\n */\n bodyText: string;\n\n constructor(originalParseError: unknown, options: ServerParseErrorOptions) {\n super(\n originalParseError instanceof Error ?\n originalParseError.message\n : \"Could not parse server response\",\n { cause: originalParseError }\n );\n this.name = \"ServerParseError\";\n this.response = options.response;\n this.statusCode = options.response.status;\n this.bodyText = options.bodyText;\n\n brand(this);\n Object.setPrototypeOf(this, ServerParseError.prototype);\n }\n}\n"]
|
|
1
|
+
{"version":3,"file":"ServerParseError.js","sourceRoot":"","sources":["../../src/errors/ServerParseError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAO9C;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACzC,8DAA8D;IAC9D,MAAM,CAAC,EAAE,CAAC,KAAc;QACtB,OAAO,SAAS,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC;IAC9C,CAAC;IACD;;OAEG;IACH,QAAQ,CAAW;IACnB;;OAEG;IACH,UAAU,CAAS;IACnB;;OAEG;IACH,QAAQ,CAAS;IAEjB,YAAY,kBAA2B,EAAE,OAAgC;QACvE,KAAK,CACH,kBAAkB,YAAY,KAAK,CAAC,CAAC;YACnC,kBAAkB,CAAC,OAAO;YAC5B,CAAC,CAAC,iCAAiC,EACnC,EAAE,KAAK,EAAE,kBAAkB,EAAE,CAC9B,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;QAC/B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;QAC1C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QAEjC,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAC1D,CAAC;CACF","sourcesContent":["import { brand, isBranded } from \"./utils.js\";\n\ninterface ServerParseErrorOptions {\n response: Response;\n bodyText: string;\n}\n\n/**\n * Thrown when failing to parse the response as JSON from the server.\n */\nexport class ServerParseError extends Error {\n /** Determine if an error is an `ServerParseError` instance */\n static is(error: unknown): error is ServerParseError {\n return isBranded(error, \"ServerParseError\");\n }\n /**\n * The server response.\n */\n response: Response;\n /**\n * The status code returned from the server.\n */\n statusCode: number;\n /**\n * The raw body text returned in the server response.\n */\n bodyText: string;\n\n constructor(originalParseError: unknown, options: ServerParseErrorOptions) {\n super(\n originalParseError instanceof Error ?\n originalParseError.message\n : \"Could not parse server response\",\n { cause: originalParseError }\n );\n this.name = \"ServerParseError\";\n this.response = options.response;\n this.statusCode = options.response.status;\n this.bodyText = options.bodyText;\n\n brand(this);\n Object.setPrototypeOf(this, ServerParseError.prototype);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnconventionalError.js","sources":["../../src/errors/UnconventionalError.ts"],"sourcesContent":["import { brand, isBranded } from \"./utils.js\";\n\n/**\n * A wrapper error type that represents a non-standard error thrown from a\n * response, such as a symbol or plain object. Read the `cause` property to\n * determine the source of the error.\n */\nexport class UnconventionalError extends Error {\n /** Determine if an error is an `UnconventionalError` instance */\n static is(error: unknown): error is UnconventionalError {\n return isBranded(error, \"UnconventionalError\");\n }\n\n constructor(errorType: unknown) {\n super(\"An error of unexpected shape occurred.\", { cause: errorType });\n this.name = \"UnconventionalError\";\n\n brand(this);\n Object.setPrototypeOf(this, UnconventionalError.prototype);\n }\n}\n"]
|
|
1
|
+
{"version":3,"file":"UnconventionalError.js","sourceRoot":"","sources":["../../src/errors/UnconventionalError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;GAIG;AACH,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAC5C,iEAAiE;IACjE,MAAM,CAAC,EAAE,CAAC,KAAc;QACtB,OAAO,SAAS,CAAC,KAAK,EAAE,qBAAqB,CAAC,CAAC;IACjD,CAAC;IAED,YAAY,SAAkB;QAC5B,KAAK,CAAC,wCAAwC,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QACtE,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;QAElC,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAC7D,CAAC;CACF","sourcesContent":["import { brand, isBranded } from \"./utils.js\";\n\n/**\n * A wrapper error type that represents a non-standard error thrown from a\n * response, such as a symbol or plain object. Read the `cause` property to\n * determine the source of the error.\n */\nexport class UnconventionalError extends Error {\n /** Determine if an error is an `UnconventionalError` instance */\n static is(error: unknown): error is UnconventionalError {\n return isBranded(error, \"UnconventionalError\");\n }\n\n constructor(errorType: unknown) {\n super(\"An error of unexpected shape occurred.\", { cause: errorType });\n this.name = \"UnconventionalError\";\n\n brand(this);\n Object.setPrototypeOf(this, UnconventionalError.prototype);\n }\n}\n"]}
|
package/errors/index.d.ts
CHANGED
|
@@ -11,4 +11,4 @@ export { LocalStateError } from "./LocalStateError.js";
|
|
|
11
11
|
export { ServerError } from "./ServerError.js";
|
|
12
12
|
export { ServerParseError } from "./ServerParseError.js";
|
|
13
13
|
export { UnconventionalError } from "./UnconventionalError.js";
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
package/errors/index.js
CHANGED
|
@@ -28,4 +28,4 @@ export { LocalStateError } from "./LocalStateError.js";
|
|
|
28
28
|
export { ServerError } from "./ServerError.js";
|
|
29
29
|
export { ServerParseError } from "./ServerParseError.js";
|
|
30
30
|
export { UnconventionalError } from "./UnconventionalError.js";
|
|
31
|
-
//# sourceMappingURL=index.js.map
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
package/errors/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/errors/index.ts"],"sourcesContent":["import { CombinedProtocolErrors } from \"./CombinedProtocolErrors.js\";\nimport { isErrorLike } from \"./isErrorLike.js\";\nimport { UnconventionalError } from \"./UnconventionalError.js\";\n\n// This Symbol allows us to pass transport-specific errors from the link chain\n// into QueryManager/client internals without risking a naming collision within\n// extensions (which implementers can use as they see fit).\nexport const PROTOCOL_ERRORS_SYMBOL: unique symbol = Symbol();\n\ntype WithSymbolExtensions<T> = T & {\n extensions: Record<string | symbol, any>;\n};\n\nexport function graphQLResultHasProtocolErrors<T extends {}>(\n result: T\n): result is T & {\n extensions: Record<string | symbol, any>;\n} {\n if (\"extensions\" in result) {\n return CombinedProtocolErrors.is(\n (result as WithSymbolExtensions<T>).extensions[PROTOCOL_ERRORS_SYMBOL]\n );\n }\n return false;\n}\n\nexport function toErrorLike(error: unknown) {\n if (isErrorLike(error)) {\n return error;\n }\n\n if (typeof error === \"string\") {\n return new Error(error, { cause: error });\n }\n\n return new UnconventionalError(error);\n}\n\nexport { CombinedGraphQLErrors } from \"./CombinedGraphQLErrors.js\";\nexport { CombinedProtocolErrors } from \"./CombinedProtocolErrors.js\";\nexport { isErrorLike } from \"./isErrorLike.js\";\nexport { LinkError, registerLinkError } from \"./LinkError.js\";\nexport { LocalStateError } from \"./LocalStateError.js\";\nexport { ServerError } from \"./ServerError.js\";\nexport { ServerParseError } from \"./ServerParseError.js\";\nexport { UnconventionalError } from \"./UnconventionalError.js\";\n"]
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index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B,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["import { CombinedProtocolErrors } from \"./CombinedProtocolErrors.js\";\nimport { isErrorLike } from \"./isErrorLike.js\";\nimport { UnconventionalError } from \"./UnconventionalError.js\";\n\n// This Symbol allows us to pass transport-specific errors from the link chain\n// into QueryManager/client internals without risking a naming collision within\n// extensions (which implementers can use as they see fit).\nexport const PROTOCOL_ERRORS_SYMBOL: unique symbol = Symbol();\n\ntype WithSymbolExtensions<T> = T & {\n extensions: Record<string | symbol, any>;\n};\n\nexport function graphQLResultHasProtocolErrors<T extends {}>(\n result: T\n): result is T & {\n extensions: Record<string | symbol, any>;\n} {\n if (\"extensions\" in result) {\n return CombinedProtocolErrors.is(\n (result as WithSymbolExtensions<T>).extensions[PROTOCOL_ERRORS_SYMBOL]\n );\n }\n return false;\n}\n\nexport function toErrorLike(error: unknown) {\n if (isErrorLike(error)) {\n return error;\n }\n\n if (typeof error === \"string\") {\n return new Error(error, { cause: error });\n }\n\n return new UnconventionalError(error);\n}\n\nexport { CombinedGraphQLErrors } from \"./CombinedGraphQLErrors.js\";\nexport { CombinedProtocolErrors } from \"./CombinedProtocolErrors.js\";\nexport { isErrorLike } from \"./isErrorLike.js\";\nexport { LinkError, registerLinkError } from \"./LinkError.js\";\nexport { LocalStateError } from \"./LocalStateError.js\";\nexport { ServerError } from \"./ServerError.js\";\nexport { ServerParseError } from \"./ServerParseError.js\";\nexport { UnconventionalError } from \"./UnconventionalError.js\";\n"]}
|
package/errors/isErrorLike.d.ts
CHANGED
package/errors/isErrorLike.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isErrorLike.js","sources":["../../src/errors/isErrorLike.ts"],"sourcesContent":["import type { ErrorLike } from \"@apollo/client\";\n\nexport function isErrorLike(error: unknown): error is ErrorLike {\n return (\n error !== null &&\n typeof error === \"object\" &&\n typeof (error as ErrorLike).message === \"string\" &&\n typeof (error as ErrorLike).name === \"string\" &&\n (typeof (error as ErrorLike).stack === \"string\" ||\n typeof (error as ErrorLike).stack === \"undefined\")\n );\n}\n"]
|
|
1
|
+
{"version":3,"file":"isErrorLike.js","sourceRoot":"","sources":["../../src/errors/isErrorLike.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,OAAO,CACL,KAAK,KAAK,IAAI;QACd,OAAO,KAAK,KAAK,QAAQ;QACzB,OAAQ,KAAmB,CAAC,OAAO,KAAK,QAAQ;QAChD,OAAQ,KAAmB,CAAC,IAAI,KAAK,QAAQ;QAC7C,CAAC,OAAQ,KAAmB,CAAC,KAAK,KAAK,QAAQ;YAC7C,OAAQ,KAAmB,CAAC,KAAK,KAAK,WAAW,CAAC,CACrD,CAAC;AACJ,CAAC","sourcesContent":["import type { ErrorLike } from \"@apollo/client\";\n\nexport function isErrorLike(error: unknown): error is ErrorLike {\n return (\n error !== null &&\n typeof error === \"object\" &&\n typeof (error as ErrorLike).message === \"string\" &&\n typeof (error as ErrorLike).name === \"string\" &&\n (typeof (error as ErrorLike).stack === \"string\" ||\n typeof (error as ErrorLike).stack === \"undefined\")\n );\n}\n"]}
|
package/errors/utils.d.ts
CHANGED
package/errors/utils.js
CHANGED
package/errors/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../src/errors/utils.ts"],"sourcesContent":["export function isBranded(error: unknown, name: string) {\n return (\n typeof error === \"object\" &&\n error !== null &&\n (error as any)[Symbol.for(\"apollo.error\")] === name\n );\n}\n\nexport function brand(error: Error) {\n Object.defineProperty(error, Symbol.for(\"apollo.error\"), {\n value: error.name,\n enumerable: false,\n writable: false,\n configurable: false,\n });\n}\n"]
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/errors/utils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,SAAS,CAAC,KAAc,EAAE,IAAY;IACpD,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACb,KAAa,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,KAAK,IAAI,CACpD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,KAAY;IAChC,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE;QACvD,KAAK,EAAE,KAAK,CAAC,IAAI;QACjB,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,KAAK;QACf,YAAY,EAAE,KAAK;KACpB,CAAC,CAAC;AACL,CAAC","sourcesContent":["export function isBranded(error: unknown, name: string) {\n return (\n typeof error === \"object\" &&\n error !== null &&\n (error as any)[Symbol.for(\"apollo.error\")] === name\n );\n}\n\nexport function brand(error: Error) {\n Object.defineProperty(error, Symbol.for(\"apollo.error\"), {\n value: error.name,\n enumerable: false,\n writable: false,\n configurable: false,\n });\n}\n"]}
|
|
@@ -52,4 +52,4 @@ export declare class Defer20220824Handler implements Incremental.Handler<Defer20
|
|
|
52
52
|
}
|
|
53
53
|
export declare function hasIncrementalChunks(result: Record<string, any>): result is Required<Defer20220824Handler.SubsequentResult>;
|
|
54
54
|
export {};
|
|
55
|
-
//# sourceMappingURL=defer20220824.d.ts.map
|
|
55
|
+
//# sourceMappingURL=defer20220824.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defer20220824.js","sources":["../../../src/incremental/handlers/defer20220824.ts"],"sourcesContent":["import type {\n DocumentNode,\n FormattedExecutionResult,\n GraphQLFormattedError,\n} from \"graphql\";\n\nimport type { FetchResult, GraphQLRequest } from \"@apollo/client\";\nimport type { DeepPartial } from \"@apollo/client/utilities\";\nimport {\n DeepMerger,\n hasDirectives,\n isNonEmptyArray,\n} from \"@apollo/client/utilities/internal\";\n\nimport type { Incremental } from \"../types.js\";\n\nexport declare namespace Defer20220824Handler {\n export type InitialResult<TData = Record<string, unknown>> = {\n data?: TData | null | undefined;\n errors?: ReadonlyArray<GraphQLFormattedError>;\n extensions?: Record<string, unknown>;\n hasNext: boolean;\n };\n\n export type SubsequentResult<TData = Record<string, unknown>> = {\n data?: TData | null | undefined;\n errors?: ReadonlyArray<GraphQLFormattedError>;\n extensions?: Record<string, unknown>;\n hasNext: boolean;\n incremental?: Array<IncrementalDeferPayload<TData>>;\n };\n\n export type Chunk<TData extends Record<string, unknown>> =\n | InitialResult<TData>\n | SubsequentResult<TData>;\n\n export type IncrementalDeferPayload<TData = Record<string, unknown>> = {\n data?: TData | null | undefined;\n errors?: ReadonlyArray<GraphQLFormattedError>;\n extensions?: Record<string, unknown>;\n path?: Incremental.Path;\n label?: string;\n };\n}\n\ndeclare module \"@apollo/client/link\" {\n export interface AdditionalFetchResultTypes {\n Defer20220824Handler: Defer20220824Handler.Chunk<Record<string, unknown>>;\n }\n}\n\nclass DeferRequest<TData extends Record<string, unknown>>\n implements\n Incremental.IncrementalRequest<Defer20220824Handler.Chunk<TData>, TData>\n{\n public hasNext = true;\n\n private errors: Array<GraphQLFormattedError> = [];\n private extensions: Record<string, any> = {};\n private data: any = {};\n\n private mergeIn(\n normalized: FormattedExecutionResult<TData>,\n merger: DeepMerger<any[]>\n ) {\n if (normalized.data !== undefined) {\n this.data = merger.merge(this.data, normalized.data);\n }\n if (normalized.errors) {\n this.errors.push(...normalized.errors);\n }\n Object.assign(this.extensions, normalized.extensions);\n }\n\n handle(\n // we'll get `undefined` here in case of a `no-cache` fetch policy,\n // so we'll continue with the last value this request had accumulated\n cacheData: TData | DeepPartial<TData> | null | undefined = this.data,\n chunk: Defer20220824Handler.Chunk<TData>\n ): FormattedExecutionResult<TData> {\n this.hasNext = chunk.hasNext;\n this.data = cacheData;\n\n this.mergeIn(chunk, new DeepMerger());\n\n if (hasIncrementalChunks(chunk)) {\n const merger = new DeepMerger();\n for (const incremental of chunk.incremental) {\n let { data, path, errors, extensions } = incremental;\n if (data && path) {\n for (let i = path.length - 1; i >= 0; --i) {\n const key = path[i];\n const isNumericKey = !isNaN(+key);\n const parent: Record<string | number, any> = isNumericKey ? [] : {};\n parent[key] = data;\n data = parent as typeof data;\n }\n }\n this.mergeIn(\n {\n errors,\n extensions,\n data: data ? (data as TData) : undefined,\n },\n merger\n );\n }\n }\n\n const result: FormattedExecutionResult<TData> = { data: this.data };\n\n if (isNonEmptyArray(this.errors)) {\n result.errors = this.errors;\n }\n\n if (Object.keys(this.extensions).length > 0) {\n result.extensions = this.extensions;\n }\n\n return result;\n }\n}\n\n/**\n * This handler implements the `@defer` directive as specified in this historical commit:\n * https://github.com/graphql/graphql-spec/tree/48cf7263a71a683fab03d45d309fd42d8d9a6659/spec\n */\nexport class Defer20220824Handler\n implements Incremental.Handler<Defer20220824Handler.Chunk<any>>\n{\n isIncrementalResult(\n result: Record<string, any>\n ): result is\n | Defer20220824Handler.SubsequentResult\n | Defer20220824Handler.InitialResult {\n return \"hasNext\" in result;\n }\n\n extractErrors(result: FetchResult<any>) {\n const acc: GraphQLFormattedError[] = [];\n const push = ({\n errors,\n }: {\n errors?: ReadonlyArray<GraphQLFormattedError>;\n }) => {\n if (errors) {\n acc.push(...errors);\n }\n };\n if (this.isIncrementalResult(result)) {\n push(result);\n if (hasIncrementalChunks(result)) {\n result.incremental.forEach(push);\n }\n }\n if (acc.length) {\n return acc;\n }\n }\n\n prepareRequest(request: GraphQLRequest): GraphQLRequest {\n if (hasDirectives([\"defer\"], request.query)) {\n const context = request.context ?? {};\n const http = (context.http ??= {});\n http.accept = [\n \"multipart/mixed;deferSpec=20220824\",\n ...(http.accept || []),\n ];\n }\n\n return request;\n }\n startRequest<TData extends Record<string, unknown>>(_: {\n query: DocumentNode;\n }) {\n return new DeferRequest<TData>();\n }\n}\n\n// only exported for use in tests\nexport function hasIncrementalChunks(\n result: Record<string, any>\n): result is Required<Defer20220824Handler.SubsequentResult> {\n return isNonEmptyArray(result.incremental);\n}\n"],"names":[],"mappings":"AAQA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EACL,CADF,CAAA,CAAA,CAA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AAG,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;aACvB,CAAC;QACJ,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,YAAY,CAAwC,CAEnD;QACC,OAAO,IAAI,YAAY,EAAS,CAAC;IACnC,CAAC;CACF;AAED,iCAAiC;AACjC,MAAM,UAAU,oBAAoB,CAClC,MAA2B;IAE3B,OAAO,eAAe,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAC7C,CAAC","sourcesContent":["import type {\n DocumentNode,\n FormattedExecutionResult,\n GraphQLFormattedError,\n} from \"graphql\";\n\nimport type { FetchResult, GraphQLRequest } from \"@apollo/client\";\nimport type { DeepPartial } from \"@apollo/client/utilities\";\nimport {\n DeepMerger,\n hasDirectives,\n isNonEmptyArray,\n} from \"@apollo/client/utilities/internal\";\n\nimport type { Incremental } from \"../types.js\";\n\nexport declare namespace Defer20220824Handler {\n export type InitialResult<TData = Record<string, unknown>> = {\n data?: TData | null | undefined;\n errors?: ReadonlyArray<GraphQLFormattedError>;\n extensions?: Record<string, unknown>;\n hasNext: boolean;\n };\n\n export type SubsequentResult<TData = Record<string, unknown>> = {\n data?: TData | null | undefined;\n errors?: ReadonlyArray<GraphQLFormattedError>;\n extensions?: Record<string, unknown>;\n hasNext: boolean;\n incremental?: Array<IncrementalDeferPayload<TData>>;\n };\n\n export type Chunk<TData extends Record<string, unknown>> =\n | InitialResult<TData>\n | SubsequentResult<TData>;\n\n export type IncrementalDeferPayload<TData = Record<string, unknown>> = {\n data?: TData | null | undefined;\n errors?: ReadonlyArray<GraphQLFormattedError>;\n extensions?: Record<string, unknown>;\n path?: Incremental.Path;\n label?: string;\n };\n}\n\ndeclare module \"@apollo/client/link\" {\n export interface AdditionalFetchResultTypes {\n Defer20220824Handler: Defer20220824Handler.Chunk<Record<string, unknown>>;\n }\n}\n\nclass DeferRequest<TData extends Record<string, unknown>>\n implements\n Incremental.IncrementalRequest<Defer20220824Handler.Chunk<TData>, TData>\n{\n public hasNext = true;\n\n private errors: Array<GraphQLFormattedError> = [];\n private extensions: Record<string, any> = {};\n private data: any = {};\n\n private mergeIn(\n normalized: FormattedExecutionResult<TData>,\n merger: DeepMerger<any[]>\n ) {\n if (normalized.data !== undefined) {\n this.data = merger.merge(this.data, normalized.data);\n }\n if (normalized.errors) {\n this.errors.push(...normalized.errors);\n }\n Object.assign(this.extensions, normalized.extensions);\n }\n\n handle(\n // we'll get `undefined` here in case of a `no-cache` fetch policy,\n // so we'll continue with the last value this request had accumulated\n cacheData: TData | DeepPartial<TData> | null | undefined = this.data,\n chunk: Defer20220824Handler.Chunk<TData>\n ): FormattedExecutionResult<TData> {\n this.hasNext = chunk.hasNext;\n this.data = cacheData;\n\n this.mergeIn(chunk, new DeepMerger());\n\n if (hasIncrementalChunks(chunk)) {\n const merger = new DeepMerger();\n for (const incremental of chunk.incremental) {\n let { data, path, errors, extensions } = incremental;\n if (data && path) {\n for (let i = path.length - 1; i >= 0; --i) {\n const key = path[i];\n const isNumericKey = !isNaN(+key);\n const parent: Record<string | number, any> = isNumericKey ? [] : {};\n parent[key] = data;\n data = parent as typeof data;\n }\n }\n this.mergeIn(\n {\n errors,\n extensions,\n data: data ? (data as TData) : undefined,\n },\n merger\n );\n }\n }\n\n const result: FormattedExecutionResult<TData> = { data: this.data };\n\n if (isNonEmptyArray(this.errors)) {\n result.errors = this.errors;\n }\n\n if (Object.keys(this.extensions).length > 0) {\n result.extensions = this.extensions;\n }\n\n return result;\n }\n}\n\n/**\n * This handler implements the `@defer` directive as specified in this historical commit:\n * https://github.com/graphql/graphql-spec/tree/48cf7263a71a683fab03d45d309fd42d8d9a6659/spec\n */\nexport class Defer20220824Handler\n implements Incremental.Handler<Defer20220824Handler.Chunk<any>>\n{\n isIncrementalResult(\n result: Record<string, any>\n ): result is\n | Defer20220824Handler.SubsequentResult\n | Defer20220824Handler.InitialResult {\n return \"hasNext\" in result;\n }\n\n extractErrors(result: FetchResult<any>) {\n const acc: GraphQLFormattedError[] = [];\n const push = ({\n errors,\n }: {\n errors?: ReadonlyArray<GraphQLFormattedError>;\n }) => {\n if (errors) {\n acc.push(...errors);\n }\n };\n if (this.isIncrementalResult(result)) {\n push(result);\n if (hasIncrementalChunks(result)) {\n result.incremental.forEach(push);\n }\n }\n if (acc.length) {\n return acc;\n }\n }\n\n prepareRequest(request: GraphQLRequest): GraphQLRequest {\n if (hasDirectives([\"defer\"], request.query)) {\n const context = request.context ?? {};\n const http = (context.http ??= {});\n http.accept = [\n \"multipart/mixed;deferSpec=20220824\",\n ...(http.accept || []),\n ];\n }\n\n return request;\n }\n startRequest<TData extends Record<string, unknown>>(_: {\n query: DocumentNode;\n }) {\n return new DeferRequest<TData>();\n }\n}\n\n// only exported for use in tests\nexport function hasIncrementalChunks(\n result: Record<string, any>\n): result is Required<Defer20220824Handler.SubsequentResult> {\n return isNonEmptyArray(result.incremental);\n}\n"]}
|
package/incremental/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type { Incremental } from "./types.js";
|
|
2
2
|
export { NotImplementedHandler } from "./handlers/notImplemented.js";
|
|
3
3
|
export { Defer20220824Handler, Defer20220824Handler as GraphQL17Alpha2Handler, } from "./handlers/defer20220824.js";
|
|
4
|
-
//# sourceMappingURL=index.d.ts.map
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
package/incremental/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/incremental/index.ts"],"sourcesContent":["export type { Incremental } from \"./types.js\";\nexport { NotImplementedHandler } from \"./handlers/notImplemented.js\";\nexport {\n Defer20220824Handler,\n Defer20220824Handler as GraphQL17Alpha2Handler,\n} from \"./handlers/defer20220824.js\";\n"],"names":[],"mappings":"AACA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAsC,CAAtC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoE;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/incremental/index.ts"],"sourcesContent":["export type { Incremental } from \"./types.js\";\nexport { NotImplementedHandler } from \"./handlers/notImplemented.js\";\nexport {\n Defer20220824Handler,\n Defer20220824Handler as GraphQL17Alpha2Handler,\n} from \"./handlers/defer20220824.js\";\n"],"names":[],"mappings":"AACA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAsC,CAAtC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoE;SAElE,CADF,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAEE,CAFF,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAE0B,CAF1B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,SAGO,CAHP,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;"}
|
package/incremental/types.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=types.js.map
|
|
2
|
+
//# sourceMappingURL=types.js.map
|
package/incremental/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/incremental/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n DocumentNode,\n FormattedExecutionResult,\n GraphQLFormattedError,\n} from \"graphql\";\n\nimport type { FetchResult, GraphQLRequest } from \"@apollo/client\";\nimport type { DeepPartial } from \"@apollo/client/utilities\";\n\nexport declare namespace Incremental {\n export type Path = ReadonlyArray<string | number>;\n\n /** @internal */\n export interface Handler<\n Chunk extends Record<string, unknown> = Record<string, unknown>,\n > {\n isIncrementalResult: (result: FetchResult<any>) => result is Chunk;\n prepareRequest: (request: GraphQLRequest) => GraphQLRequest;\n extractErrors: (\n result: FetchResult<any>\n ) => readonly GraphQLFormattedError[] | undefined | void;\n startRequest: <TData extends Record<string, unknown>>(request: {\n query: DocumentNode;\n }) => IncrementalRequest<Chunk, TData>;\n }\n\n export interface IncrementalRequest<\n Chunk extends Record<string, unknown>,\n TData,\n > {\n hasNext: boolean;\n handle: (\n cacheData: TData | DeepPartial<TData> | undefined | null,\n chunk: Chunk\n ) => FormattedExecutionResult<TData>;\n }\n}\n"]}
|
package/invariantErrorCodes.d.ts
CHANGED
|
@@ -10,4 +10,4 @@ export declare const devDebug: ErrorCodes;
|
|
|
10
10
|
export declare const devLog: ErrorCodes;
|
|
11
11
|
export declare const devWarn: ErrorCodes;
|
|
12
12
|
export declare const devError: ErrorCodes;
|
|
13
|
-
//# sourceMappingURL=invariantErrorCodes.d.ts.map
|
|
13
|
+
//# sourceMappingURL=invariantErrorCodes.d.ts.map
|
package/invariantErrorCodes.js
CHANGED
|
@@ -169,7 +169,10 @@ you have an infinite render loop in your application.`
|
|
|
169
169
|
28: {
|
|
170
170
|
file: "@apollo/client/react/hooks/useApolloClient.js",
|
|
171
171
|
condition: "!!client",
|
|
172
|
-
|
|
172
|
+
|
|
173
|
+
message: 'Could not find "client" in the context or passed in as an option. ' +
|
|
174
|
+
"Wrap the root component in an <ApolloProvider>, or pass an ApolloClient " +
|
|
175
|
+
"instance in via options."
|
|
173
176
|
},
|
|
174
177
|
|
|
175
178
|
29: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invariantErrorCodes.js","sources":["../src/invariantErrorCodes.ts"],"sourcesContent":["export interface ErrorCodes {\n [key: number]: { file: string; condition?: string; message?: string };\n}\n\nexport const errorCodes: ErrorCodes = {};\nexport const devDebug: ErrorCodes = {};\nexport const devLog: ErrorCodes = {};\nexport const devWarn: ErrorCodes = {};\nexport const devError: ErrorCodes = {};\n"]
|
|
1
|
+
{"version":3,"file":"invariantErrorCodes.js","sourceRoot":"","sources":["../src/invariantErrorCodes.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,UAAU,GAAe,EAAE,CAAC;AACzC,MAAM,CAAC,MAAM,QAAQ,GAAe,EAAE,CAAC;AACvC,MAAM,CAAC,MAAM,MAAM,GAAe,EAAE,CAAC;AACrC,MAAM,CAAC,MAAM,OAAO,GAAe,EAAE,CAAC;AACtC,MAAM,CAAC,MAAM,QAAQ,GAAe,EAAE,CAAC","sourcesContent":["export interface ErrorCodes {\n [key: number]: { file: string; condition?: string; message?: string };\n}\n\nexport const errorCodes: ErrorCodes = {};\nexport const devDebug: ErrorCodes = {};\nexport const devLog: ErrorCodes = {};\nexport const devWarn: ErrorCodes = {};\nexport const devError: ErrorCodes = {};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("@apollo/client/react/internal/compiler-runtime");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@apollo/client/react/internal/compiler-runtime";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@apollo/client/react/internal/compiler-runtime";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@apollo/client/react/internal/compiler-runtime";
|
|
@@ -39,4 +39,4 @@ export declare class BatchLink extends ApolloLink {
|
|
|
39
39
|
constructor(fetchParams?: BatchLink.Options);
|
|
40
40
|
request(operation: Operation, forward?: NextLink): Observable<FetchResult> | null;
|
|
41
41
|
}
|
|
42
|
-
//# sourceMappingURL=batchLink.d.ts.map
|
|
42
|
+
//# sourceMappingURL=batchLink.d.ts.map
|
package/link/batch/batchLink.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batchLink.js","sources":["../../../src/link/batch/batchLink.ts"],"sourcesContent":["import type { Observable } from \"rxjs\";\n\nimport type { FetchResult, NextLink, Operation } from \"@apollo/client/link\";\nimport { ApolloLink } from \"@apollo/client/link\";\n\nimport type { BatchHandler } from \"./batching.js\";\nimport { OperationBatcher } from \"./batching.js\";\nexport type { BatchableRequest, BatchHandler } from \"./batching.js\";\nexport { OperationBatcher } from \"./batching.js\";\n\nexport namespace BatchLink {\n export interface Options {\n /**\n * The interval at which to batch, in milliseconds.\n *\n * Defaults to 10.\n */\n batchInterval?: number;\n\n /**\n * \"batchInterval\" is a throttling behavior by default, if you instead wish\n * to debounce outbound requests, set \"batchDebounce\" to true. More useful\n * for mutations than queries.\n */\n batchDebounce?: boolean;\n\n /**\n * The maximum number of operations to include in one fetch.\n *\n * Defaults to 0 (infinite operations within the interval).\n */\n batchMax?: number;\n\n /**\n * The handler that should execute a batch of operations.\n */\n batchHandler?: BatchHandler;\n\n /**\n * creates the key for a batch\n */\n batchKey?: (operation: Operation) => string;\n }\n}\n\nexport class BatchLink extends ApolloLink {\n private batcher: OperationBatcher;\n\n constructor(fetchParams?: BatchLink.Options) {\n super();\n\n const {\n batchDebounce,\n batchInterval = 10,\n batchMax = 0,\n batchHandler = () => null,\n batchKey = () => \"\",\n } = fetchParams || {};\n\n this.batcher = new OperationBatcher({\n batchDebounce,\n batchInterval,\n batchMax,\n batchHandler,\n batchKey,\n });\n\n //make this link terminating\n if (fetchParams!.batchHandler!.length <= 1) {\n this.request = (operation) => this.batcher.enqueueRequest({ operation });\n }\n }\n\n public request(\n operation: Operation,\n forward?: NextLink\n ): Observable<FetchResult> | null {\n return this.batcher.enqueueRequest({\n operation,\n forward,\n });\n }\n}\n"]
|
|
1
|
+
{"version":3,"file":"batchLink.js","sourceRoot":"","sources":["../../../src/link/batch/batchLink.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAqCjD,MAAM,OAAO,SAAU,SAAQ,UAAU;IAC/B,OAAO,CAAmB;IAElC,YAAY,WAA+B;QACzC,KAAK,EAAE,CAAC;QAER,MAAM,EACJ,aAAa,EACb,aAAa,GAAG,EAAE,EAClB,QAAQ,GAAG,CAAC,EACZ,YAAY,GAAG,GAAG,EAAE,CAAC,IAAI,EACzB,QAAQ,GAAG,GAAG,EAAE,CAAC,EAAE,GACpB,GAAG,WAAW,IAAI,EAAE,CAAC;QAEtB,IAAI,CAAC,OAAO,GAAG,IAAI,gBAAgB,CAAC;YAClC,aAAa;YACb,aAAa;YACb,QAAQ;YACR,YAAY;YACZ,QAAQ;SACT,CAAC,CAAC;QAEH,4BAA4B;QAC5B,IAAI,WAAY,CAAC,YAAa,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;YAC3C,IAAI,CAAC,OAAO,GAAG,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;QAC3E,CAAC;IACH,CAAC;IAEM,OAAO,CACZ,SAAoB,EACpB,OAAkB;QAElB,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC;YACjC,SAAS;YACT,OAAO;SACR,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import type { Observable } from \"rxjs\";\n\nimport type { FetchResult, NextLink, Operation } from \"@apollo/client/link\";\nimport { ApolloLink } from \"@apollo/client/link\";\n\nimport type { BatchHandler } from \"./batching.js\";\nimport { OperationBatcher } from \"./batching.js\";\nexport type { BatchableRequest, BatchHandler } from \"./batching.js\";\nexport { OperationBatcher } from \"./batching.js\";\n\nexport namespace BatchLink {\n export interface Options {\n /**\n * The interval at which to batch, in milliseconds.\n *\n * Defaults to 10.\n */\n batchInterval?: number;\n\n /**\n * \"batchInterval\" is a throttling behavior by default, if you instead wish\n * to debounce outbound requests, set \"batchDebounce\" to true. More useful\n * for mutations than queries.\n */\n batchDebounce?: boolean;\n\n /**\n * The maximum number of operations to include in one fetch.\n *\n * Defaults to 0 (infinite operations within the interval).\n */\n batchMax?: number;\n\n /**\n * The handler that should execute a batch of operations.\n */\n batchHandler?: BatchHandler;\n\n /**\n * creates the key for a batch\n */\n batchKey?: (operation: Operation) => string;\n }\n}\n\nexport class BatchLink extends ApolloLink {\n private batcher: OperationBatcher;\n\n constructor(fetchParams?: BatchLink.Options) {\n super();\n\n const {\n batchDebounce,\n batchInterval = 10,\n batchMax = 0,\n batchHandler = () => null,\n batchKey = () => \"\",\n } = fetchParams || {};\n\n this.batcher = new OperationBatcher({\n batchDebounce,\n batchInterval,\n batchMax,\n batchHandler,\n batchKey,\n });\n\n //make this link terminating\n if (fetchParams!.batchHandler!.length <= 1) {\n this.request = (operation) => this.batcher.enqueueRequest({ operation });\n }\n }\n\n public request(\n operation: Operation,\n forward?: NextLink\n ): Observable<FetchResult> | null {\n return this.batcher.enqueueRequest({\n operation,\n forward,\n });\n }\n}\n"]}
|
package/link/batch/batching.d.ts
CHANGED
package/link/batch/batching.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batching.js","sources":["../../../src/link/batch/batching.ts"],"sourcesContent":["import type { Subscription } from \"rxjs\";\nimport { EMPTY, Observable } from \"rxjs\";\n\nimport type { FetchResult, NextLink, Operation } from \"@apollo/client/link\";\n\nexport type BatchHandler = (\n operations: Operation[],\n forward?: (NextLink | undefined)[]\n) => Observable<FetchResult[]> | null;\n\nexport interface BatchableRequest {\n operation: Operation;\n forward?: NextLink;\n}\n\ntype QueuedRequest = BatchableRequest & {\n observable?: Observable<FetchResult>;\n next: Array<(result: FetchResult) => void>;\n error: Array<(error: Error) => void>;\n complete: Array<() => void>;\n subscribers: Set<object>;\n};\n\n// Batches are primarily a Set<QueuedRequest>, but may have other optional\n// properties, such as batch.subscription.\ntype RequestBatch = Set<QueuedRequest> & {\n subscription?: Subscription;\n};\n\n// QueryBatcher doesn't fire requests immediately. Requests that were enqueued within\n// a certain amount of time (configurable through `batchInterval`) will be batched together\n// into one query.\nexport class OperationBatcher {\n // Queue on which the QueryBatcher will operate on a per-tick basis.\n private batchesByKey = new Map<string, RequestBatch>();\n\n private scheduledBatchTimerByKey = new Map<\n string,\n ReturnType<typeof setTimeout>\n >();\n private batchDebounce?: boolean;\n private batchInterval?: number;\n private batchMax: number;\n\n //This function is called to the queries in the queue to the server.\n private batchHandler: BatchHandler;\n private batchKey: (operation: Operation) => string;\n\n constructor({\n batchDebounce,\n batchInterval,\n batchMax,\n batchHandler,\n batchKey,\n }: {\n batchDebounce?: boolean;\n batchInterval?: number;\n batchMax?: number;\n batchHandler: BatchHandler;\n batchKey?: (operation: Operation) => string;\n }) {\n this.batchDebounce = batchDebounce;\n this.batchInterval = batchInterval;\n this.batchMax = batchMax || 0;\n this.batchHandler = batchHandler;\n this.batchKey = batchKey || (() => \"\");\n }\n\n public enqueueRequest(request: BatchableRequest): Observable<FetchResult> {\n const requestCopy: QueuedRequest = {\n ...request,\n next: [],\n error: [],\n complete: [],\n subscribers: new Set(),\n };\n\n const key = this.batchKey(request.operation);\n\n if (!requestCopy.observable) {\n requestCopy.observable = new Observable<FetchResult>((observer) => {\n let batch = this.batchesByKey.get(key)!;\n if (!batch) this.batchesByKey.set(key, (batch = new Set()));\n\n // These booleans seem to me (@benjamn) like they might always be the\n // same (and thus we could do with only one of them), but I'm not 100%\n // sure about that.\n const isFirstEnqueuedRequest = batch.size === 0;\n const isFirstSubscriber = requestCopy.subscribers.size === 0;\n requestCopy.subscribers.add(observer);\n if (isFirstSubscriber) {\n batch.add(requestCopy);\n }\n\n // called for each subscriber, so need to save all listeners (next, error, complete)\n if (observer.next) {\n requestCopy.next.push(observer.next.bind(observer));\n }\n\n if (observer.error) {\n requestCopy.error.push(observer.error.bind(observer));\n }\n\n if (observer.complete) {\n requestCopy.complete.push(observer.complete.bind(observer));\n }\n\n // The first enqueued request triggers the queue consumption after `batchInterval` milliseconds.\n if (isFirstEnqueuedRequest || this.batchDebounce) {\n this.scheduleQueueConsumption(key);\n }\n\n // When amount of requests reaches `batchMax`, trigger the queue consumption without waiting on the `batchInterval`.\n if (batch.size === this.batchMax) {\n this.consumeQueue(key);\n }\n\n return () => {\n // If this is last subscriber for this request, remove request from queue\n if (\n requestCopy.subscribers.delete(observer) &&\n requestCopy.subscribers.size < 1\n ) {\n // If this is last request from queue, remove queue entirely\n if (batch.delete(requestCopy) && batch.size < 1) {\n this.consumeQueue(key);\n // If queue was in flight, cancel it\n batch.subscription?.unsubscribe();\n }\n }\n };\n });\n }\n\n return requestCopy.observable;\n }\n\n // Consumes the queue.\n // Returns a list of promises (one for each query).\n public consumeQueue(\n key: string = \"\"\n ): (Observable<FetchResult> | undefined)[] | undefined {\n const batch = this.batchesByKey.get(key);\n // Delete this batch and process it below.\n this.batchesByKey.delete(key);\n if (!batch || !batch.size) {\n // No requests to be processed.\n return;\n }\n\n const operations: QueuedRequest[\"operation\"][] = [];\n const forwards: QueuedRequest[\"forward\"][] = [];\n const observables: QueuedRequest[\"observable\"][] = [];\n const nexts: QueuedRequest[\"next\"][] = [];\n const errors: QueuedRequest[\"error\"][] = [];\n const completes: QueuedRequest[\"complete\"][] = [];\n\n // Even though batch is a Set, it preserves the order of first insertion\n // when iterating (per ECMAScript specification), so these requests will be\n // handled in the order they were enqueued (minus any deleted ones).\n batch.forEach((request) => {\n operations.push(request.operation);\n forwards.push(request.forward);\n observables.push(request.observable);\n nexts.push(request.next);\n errors.push(request.error);\n completes.push(request.complete);\n });\n\n const batchedObservable = this.batchHandler(operations, forwards) || EMPTY;\n\n const onError = (error: Error) => {\n //each callback list in batch\n errors.forEach((rejecters) => {\n if (rejecters) {\n //each subscriber to request\n rejecters.forEach((e) => e(error));\n }\n });\n };\n\n batch.subscription = batchedObservable.subscribe({\n next: (results) => {\n if (!Array.isArray(results)) {\n results = [results];\n }\n\n if (nexts.length !== results.length) {\n const error = new Error(\n `server returned results with length ${results.length}, expected length of ${nexts.length}`\n );\n (error as any).result = results;\n\n return onError(error);\n }\n\n results.forEach((result, index) => {\n if (nexts[index]) {\n nexts[index].forEach((next) => next(result));\n }\n });\n },\n error: onError,\n complete: () => {\n completes.forEach((complete) => {\n if (complete) {\n //each subscriber to request\n complete.forEach((c) => c());\n }\n });\n },\n });\n\n return observables;\n }\n\n private scheduleQueueConsumption(key: string): void {\n clearTimeout(this.scheduledBatchTimerByKey.get(key));\n this.scheduledBatchTimerByKey.set(\n key,\n setTimeout(() => {\n this.consumeQueue(key);\n this.scheduledBatchTimerByKey.delete(key);\n }, this.batchInterval)\n );\n }\n}\n"],"names":[],"mappings":"AACA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAc,EAAE,CAAhB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAkC,CAAlC,CAAA,CAAA,CAAA,CAAA,CAAwC;AA4BxC,CA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"rxjs\";\n\nimport type { FetchResult, NextLink, Operation } from \"@apollo/client/link\";\n\nexport type BatchHandler = (\n operations: Operation[],\n forward?: (NextLink | undefined)[]\n) => Observable<FetchResult[]> | null;\n\nexport interface BatchableRequest {\n operation: Operation;\n forward?: NextLink;\n}\n\ntype QueuedRequest = BatchableRequest & {\n observable?: Observable<FetchResult>;\n next: Array<(result: FetchResult) => void>;\n error: Array<(error: Error) => void>;\n complete: Array<() => void>;\n subscribers: Set<object>;\n};\n\n// Batches are primarily a Set<QueuedRequest>, but may have other optional\n// properties, such as batch.subscription.\ntype RequestBatch = Set<QueuedRequest> & {\n subscription?: Subscription;\n};\n\n// QueryBatcher doesn't fire requests immediately. Requests that were enqueued within\n// a certain amount of time (configurable through `batchInterval`) will be batched together\n// into one query.\nexport class OperationBatcher {\n // Queue on which the QueryBatcher will operate on a per-tick basis.\n private batchesByKey = new Map<string, RequestBatch>();\n\n private scheduledBatchTimerByKey = new Map<\n string,\n ReturnType<typeof setTimeout>\n >();\n private batchDebounce?: boolean;\n private batchInterval?: number;\n private batchMax: number;\n\n //This function is called to the queries in the queue to the server.\n private batchHandler: BatchHandler;\n private batchKey: (operation: Operation) => string;\n\n constructor({\n batchDebounce,\n batchInterval,\n batchMax,\n batchHandler,\n batchKey,\n }: {\n batchDebounce?: boolean;\n batchInterval?: number;\n batchMax?: number;\n batchHandler: BatchHandler;\n batchKey?: (operation: Operation) => string;\n }) {\n this.batchDebounce = batchDebounce;\n this.batchInterval = batchInterval;\n this.batchMax = batchMax || 0;\n this.batchHandler = batchHandler;\n this.batchKey = batchKey || (() => \"\");\n }\n\n public enqueueRequest(request: BatchableRequest): Observable<FetchResult> {\n const requestCopy: QueuedRequest = {\n ...request,\n next: [],\n error: [],\n complete: [],\n subscribers: new Set(),\n };\n\n const key = this.batchKey(request.operation);\n\n if (!requestCopy.observable) {\n requestCopy.observable = new Observable<FetchResult>((observer) => {\n let batch = this.batchesByKey.get(key)!;\n if (!batch) this.batchesByKey.set(key, (batch = new Set()));\n\n // These booleans seem to me (@benjamn) like they might always be the\n // same (and thus we could do with only one of them), but I'm not 100%\n // sure about that.\n const isFirstEnqueuedRequest = batch.size === 0;\n const isFirstSubscriber = requestCopy.subscribers.size === 0;\n requestCopy.subscribers.add(observer);\n if (isFirstSubscriber) {\n batch.add(requestCopy);\n }\n\n // called for each subscriber, so need to save all listeners (next, error, complete)\n if (observer.next) {\n requestCopy.next.push(observer.next.bind(observer));\n }\n\n if (observer.error) {\n requestCopy.error.push(observer.error.bind(observer));\n }\n\n if (observer.complete) {\n requestCopy.complete.push(observer.complete.bind(observer));\n }\n\n // The first enqueued request triggers the queue consumption after `batchInterval` milliseconds.\n if (isFirstEnqueuedRequest || this.batchDebounce) {\n this.scheduleQueueConsumption(key);\n }\n\n // When amount of requests reaches `batchMax`, trigger the queue consumption without waiting on the `batchInterval`.\n if (batch.size === this.batchMax) {\n this.consumeQueue(key);\n }\n\n return () => {\n // If this is last subscriber for this request, remove request from queue\n if (\n requestCopy.subscribers.delete(observer) &&\n requestCopy.subscribers.size < 1\n ) {\n // If this is last request from queue, remove queue entirely\n if (batch.delete(requestCopy) && batch.size < 1) {\n this.consumeQueue(key);\n // If queue was in flight, cancel it\n batch.subscription?.unsubscribe();\n }\n }\n };\n });\n }\n\n return requestCopy.observable;\n }\n\n // Consumes the queue.\n // Returns a list of promises (one for each query).\n public consumeQueue(\n key: string = \"\"\n ): (Observable<FetchResult> | undefined)[] | undefined {\n const batch = this.batchesByKey.get(key);\n // Delete this batch and process it below.\n this.batchesByKey.delete(key);\n if (!batch || !batch.size) {\n // No requests to be processed.\n return;\n }\n\n const operations: QueuedRequest[\"operation\"][] = [];\n const forwards: QueuedRequest[\"forward\"][] = [];\n const observables: QueuedRequest[\"observable\"][] = [];\n const nexts: QueuedRequest[\"next\"][] = [];\n const errors: QueuedRequest[\"error\"][] = [];\n const completes: QueuedRequest[\"complete\"][] = [];\n\n // Even though batch is a Set, it preserves the order of first insertion\n // when iterating (per ECMAScript specification), so these requests will be\n // handled in the order they were enqueued (minus any deleted ones).\n batch.forEach((request) => {\n operations.push(request.operation);\n forwards.push(request.forward);\n observables.push(request.observable);\n nexts.push(request.next);\n errors.push(request.error);\n completes.push(request.complete);\n });\n\n const batchedObservable = this.batchHandler(operations, forwards) || EMPTY;\n\n const onError = (error: Error) => {\n //each callback list in batch\n errors.forEach((rejecters) => {\n if (rejecters) {\n //each subscriber to request\n rejecters.forEach((e) => e(error));\n }\n });\n };\n\n batch.subscription = batchedObservable.subscribe({\n next: (results) => {\n if (!Array.isArray(results)) {\n results = [results];\n }\n\n if (nexts.length !== results.length) {\n const error = new Error(\n `server returned results with length ${results.length}, expected length of ${nexts.length}`\n );\n (error as any).result = results;\n\n return onError(error);\n }\n\n results.forEach((result, index) => {\n if (nexts[index]) {\n nexts[index].forEach((next) => next(result));\n }\n });\n },\n error: onError,\n complete: () => {\n completes.forEach((complete) => {\n if (complete) {\n //each subscriber to request\n complete.forEach((c) => c());\n }\n });\n },\n });\n\n return observables;\n }\n\n private scheduleQueueConsumption(key: string): void {\n clearTimeout(this.scheduledBatchTimerByKey.get(key));\n this.scheduledBatchTimerByKey.set(\n key,\n setTimeout(() => {\n this.consumeQueue(key);\n this.scheduledBatchTimerByKey.delete(key);\n }, this.batchInterval)\n );\n }\n}\n"]}
|
package/link/batch/index.d.ts
CHANGED
package/link/batch/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { BatchLink, OperationBatcher } from "./batchLink.js";
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
package/link/batch/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/link/batch/index.ts"],"sourcesContent":["export type { BatchableRequest, BatchHandler } from \"./batchLink.js\";\nexport { BatchLink, OperationBatcher } from \"./batchLink.js\";\n"]
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/link/batch/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC","sourcesContent":["export type { BatchableRequest, BatchHandler } from \"./batchLink.js\";\nexport { BatchLink, OperationBatcher } from \"./batchLink.js\";\n"]}
|
|
@@ -23,4 +23,4 @@ export declare class BaseBatchHttpLink extends ApolloLink {
|
|
|
23
23
|
constructor(fetchParams?: BatchHttpLink.Options);
|
|
24
24
|
request(operation: Operation): Observable<FetchResult> | null;
|
|
25
25
|
}
|
|
26
|
-
//# sourceMappingURL=batchHttpLink.d.ts.map
|
|
26
|
+
//# sourceMappingURL=batchHttpLink.d.ts.map
|