@apollo/client 0.0.0-pr-10521-20230206180228
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/LICENSE +22 -0
- package/README.md +45 -0
- package/apollo-client.cjs +7614 -0
- package/apollo-client.cjs.map +1 -0
- package/apollo-client.min.cjs +1 -0
- package/cache/cache.cjs +2425 -0
- package/cache/cache.cjs.map +1 -0
- package/cache/cache.cjs.native.js +2425 -0
- package/cache/core/cache.d.ts +32 -0
- package/cache/core/cache.d.ts.map +1 -0
- package/cache/core/cache.js +84 -0
- package/cache/core/cache.js.map +1 -0
- package/cache/core/types/Cache.d.ts +55 -0
- package/cache/core/types/Cache.d.ts.map +1 -0
- package/cache/core/types/Cache.js +4 -0
- package/cache/core/types/Cache.js.map +1 -0
- package/cache/core/types/DataProxy.d.ts +52 -0
- package/cache/core/types/DataProxy.d.ts.map +1 -0
- package/cache/core/types/DataProxy.js +2 -0
- package/cache/core/types/DataProxy.js.map +1 -0
- package/cache/core/types/common.d.ts +47 -0
- package/cache/core/types/common.d.ts.map +1 -0
- package/cache/core/types/common.js +26 -0
- package/cache/core/types/common.js.map +1 -0
- package/cache/index.d.ts +15 -0
- package/cache/index.d.ts.map +1 -0
- package/cache/index.js +14 -0
- package/cache/index.js.map +1 -0
- package/cache/inmemory/__mocks__/optimism.d.ts +2 -0
- package/cache/inmemory/__mocks__/optimism.d.ts.map +1 -0
- package/cache/inmemory/__mocks__/optimism.js +14 -0
- package/cache/inmemory/__mocks__/optimism.js.map +1 -0
- package/cache/inmemory/entityStore.d.ts +83 -0
- package/cache/inmemory/entityStore.d.ts.map +1 -0
- package/cache/inmemory/entityStore.js +467 -0
- package/cache/inmemory/entityStore.js.map +1 -0
- package/cache/inmemory/fixPolyfills.d.ts +1 -0
- package/cache/inmemory/fixPolyfills.d.ts.map +1 -0
- package/cache/inmemory/fixPolyfills.js +1 -0
- package/cache/inmemory/fixPolyfills.js.map +1 -0
- package/cache/inmemory/fixPolyfills.native.d.ts +2 -0
- package/cache/inmemory/fixPolyfills.native.d.ts.map +1 -0
- package/cache/inmemory/fixPolyfills.native.js +48 -0
- package/cache/inmemory/fixPolyfills.native.js.map +1 -0
- package/cache/inmemory/fragmentRegistry.d.ts +8 -0
- package/cache/inmemory/fragmentRegistry.d.ts.map +1 -0
- package/cache/inmemory/fragmentRegistry.js +113 -0
- package/cache/inmemory/fragmentRegistry.js.map +1 -0
- package/cache/inmemory/helpers.d.ts +27 -0
- package/cache/inmemory/helpers.d.ts.map +1 -0
- package/cache/inmemory/helpers.js +85 -0
- package/cache/inmemory/helpers.js.map +1 -0
- package/cache/inmemory/inMemoryCache.d.ts +52 -0
- package/cache/inmemory/inMemoryCache.d.ts.map +1 -0
- package/cache/inmemory/inMemoryCache.js +316 -0
- package/cache/inmemory/inMemoryCache.js.map +1 -0
- package/cache/inmemory/key-extractor.d.ts +9 -0
- package/cache/inmemory/key-extractor.d.ts.map +1 -0
- package/cache/inmemory/key-extractor.js +118 -0
- package/cache/inmemory/key-extractor.js.map +1 -0
- package/cache/inmemory/object-canon.d.ts +17 -0
- package/cache/inmemory/object-canon.d.ts.map +1 -0
- package/cache/inmemory/object-canon.js +120 -0
- package/cache/inmemory/object-canon.js.map +1 -0
- package/cache/inmemory/policies.d.ts +96 -0
- package/cache/inmemory/policies.d.ts.map +1 -0
- package/cache/inmemory/policies.js +416 -0
- package/cache/inmemory/policies.js.map +1 -0
- package/cache/inmemory/reactiveVars.d.ts +18 -0
- package/cache/inmemory/reactiveVars.d.ts.map +1 -0
- package/cache/inmemory/reactiveVars.js +65 -0
- package/cache/inmemory/reactiveVars.js.map +1 -0
- package/cache/inmemory/readFromStore.d.ts +36 -0
- package/cache/inmemory/readFromStore.d.ts.map +1 -0
- package/cache/inmemory/readFromStore.js +267 -0
- package/cache/inmemory/readFromStore.js.map +1 -0
- package/cache/inmemory/types.d.ts +81 -0
- package/cache/inmemory/types.d.ts.map +1 -0
- package/cache/inmemory/types.js +4 -0
- package/cache/inmemory/types.js.map +1 -0
- package/cache/inmemory/writeToStore.d.ts +37 -0
- package/cache/inmemory/writeToStore.d.ts.map +1 -0
- package/cache/inmemory/writeToStore.js +394 -0
- package/cache/inmemory/writeToStore.js.map +1 -0
- package/cache/package.json +8 -0
- package/config/jest/setup.d.ts +2 -0
- package/config/jest/setup.d.ts.map +1 -0
- package/config/jest/setup.js +5 -0
- package/config/jest/setup.js.map +1 -0
- package/core/ApolloClient.d.ts +76 -0
- package/core/ApolloClient.d.ts.map +1 -0
- package/core/ApolloClient.js +240 -0
- package/core/ApolloClient.js.map +1 -0
- package/core/LocalState.d.ts +69 -0
- package/core/LocalState.d.ts.map +1 -0
- package/core/LocalState.js +321 -0
- package/core/LocalState.js.map +1 -0
- package/core/ObservableQuery.d.ts +74 -0
- package/core/ObservableQuery.d.ts.map +1 -0
- package/core/ObservableQuery.js +507 -0
- package/core/ObservableQuery.js.map +1 -0
- package/core/QueryInfo.d.ts +62 -0
- package/core/QueryInfo.d.ts.map +1 -0
- package/core/QueryInfo.js +287 -0
- package/core/QueryInfo.js.map +1 -0
- package/core/QueryManager.d.ts +120 -0
- package/core/QueryManager.d.ts.map +1 -0
- package/core/QueryManager.js +890 -0
- package/core/QueryManager.js.map +1 -0
- package/core/core.cjs +2349 -0
- package/core/core.cjs.map +1 -0
- package/core/core.cjs.native.js +2349 -0
- package/core/index.d.ts +17 -0
- package/core/index.d.ts.map +1 -0
- package/core/index.js +17 -0
- package/core/index.js.map +1 -0
- package/core/networkStatus.d.ts +11 -0
- package/core/networkStatus.d.ts.map +1 -0
- package/core/networkStatus.js +14 -0
- package/core/networkStatus.js.map +1 -0
- package/core/package.json +8 -0
- package/core/types.d.ts +74 -0
- package/core/types.d.ts.map +1 -0
- package/core/types.js +3 -0
- package/core/types.js.map +1 -0
- package/core/watchQueryOptions.d.ts +78 -0
- package/core/watchQueryOptions.d.ts.map +1 -0
- package/core/watchQueryOptions.js +2 -0
- package/core/watchQueryOptions.js.map +1 -0
- package/errors/errors.cjs +49 -0
- package/errors/errors.cjs.map +1 -0
- package/errors/errors.cjs.native.js +49 -0
- package/errors/index.d.ts +23 -0
- package/errors/index.d.ts.map +1 -0
- package/errors/index.js +42 -0
- package/errors/index.js.map +1 -0
- package/errors/package.json +8 -0
- package/index.d.ts +3 -0
- package/index.d.ts.map +1 -0
- package/index.js +3 -0
- package/index.js.map +1 -0
- package/invariantErrorCodes.js +339 -0
- package/link/batch/batch.cjs +159 -0
- package/link/batch/batch.cjs.map +1 -0
- package/link/batch/batch.cjs.native.js +159 -0
- package/link/batch/batchLink.d.ts +19 -0
- package/link/batch/batchLink.d.ts.map +1 -0
- package/link/batch/batchLink.js +31 -0
- package/link/batch/batchLink.js.map +1 -0
- package/link/batch/batching.d.ts +27 -0
- package/link/batch/batching.d.ts.map +1 -0
- package/link/batch/batching.js +125 -0
- package/link/batch/batching.js.map +1 -0
- package/link/batch/index.d.ts +2 -0
- package/link/batch/index.d.ts.map +1 -0
- package/link/batch/index.js +2 -0
- package/link/batch/index.js.map +1 -0
- package/link/batch/package.json +8 -0
- package/link/batch-http/batch-http.cjs +137 -0
- package/link/batch-http/batch-http.cjs.map +1 -0
- package/link/batch-http/batch-http.cjs.native.js +137 -0
- package/link/batch-http/batchHttpLink.d.ts +16 -0
- package/link/batch-http/batchHttpLink.d.ts.map +1 -0
- package/link/batch-http/batchHttpLink.js +131 -0
- package/link/batch-http/batchHttpLink.js.map +1 -0
- package/link/batch-http/index.d.ts +2 -0
- package/link/batch-http/index.d.ts.map +1 -0
- package/link/batch-http/index.js +2 -0
- package/link/batch-http/index.js.map +1 -0
- package/link/batch-http/package.json +8 -0
- package/link/context/context.cjs +38 -0
- package/link/context/context.cjs.map +1 -0
- package/link/context/context.cjs.native.js +38 -0
- package/link/context/index.d.ts +5 -0
- package/link/context/index.d.ts.map +1 -0
- package/link/context/index.js +31 -0
- package/link/context/index.js.map +1 -0
- package/link/context/package.json +8 -0
- package/link/core/ApolloLink.d.ts +16 -0
- package/link/core/ApolloLink.d.ts.map +1 -0
- package/link/core/ApolloLink.js +100 -0
- package/link/core/ApolloLink.js.map +1 -0
- package/link/core/concat.d.ts +3 -0
- package/link/core/concat.d.ts.map +1 -0
- package/link/core/concat.js +3 -0
- package/link/core/concat.js.map +1 -0
- package/link/core/core.cjs +121 -0
- package/link/core/core.cjs.map +1 -0
- package/link/core/core.cjs.native.js +121 -0
- package/link/core/empty.d.ts +3 -0
- package/link/core/empty.d.ts.map +1 -0
- package/link/core/empty.js +3 -0
- package/link/core/empty.js.map +1 -0
- package/link/core/execute.d.ts +3 -0
- package/link/core/execute.d.ts.map +1 -0
- package/link/core/execute.js +3 -0
- package/link/core/execute.js.map +1 -0
- package/link/core/from.d.ts +3 -0
- package/link/core/from.d.ts.map +1 -0
- package/link/core/from.js +3 -0
- package/link/core/from.js.map +1 -0
- package/link/core/index.d.ts +9 -0
- package/link/core/index.d.ts.map +1 -0
- package/link/core/index.js +9 -0
- package/link/core/index.js.map +1 -0
- package/link/core/package.json +8 -0
- package/link/core/split.d.ts +3 -0
- package/link/core/split.d.ts.map +1 -0
- package/link/core/split.js +3 -0
- package/link/core/split.js.map +1 -0
- package/link/core/types.d.ts +52 -0
- package/link/core/types.d.ts.map +1 -0
- package/link/core/types.js +2 -0
- package/link/core/types.js.map +1 -0
- package/link/error/error.cjs +90 -0
- package/link/error/error.cjs.map +1 -0
- package/link/error/error.cjs.native.js +90 -0
- package/link/error/index.d.ts +24 -0
- package/link/error/index.d.ts.map +1 -0
- package/link/error/index.js +83 -0
- package/link/error/index.js.map +1 -0
- package/link/error/package.json +8 -0
- package/link/http/HttpLink.d.ts +8 -0
- package/link/http/HttpLink.d.ts.map +1 -0
- package/link/http/HttpLink.js +15 -0
- package/link/http/HttpLink.js.map +1 -0
- package/link/http/checkFetcher.d.ts +2 -0
- package/link/http/checkFetcher.d.ts.map +1 -0
- package/link/http/checkFetcher.js +7 -0
- package/link/http/checkFetcher.js.map +1 -0
- package/link/http/createHttpLink.d.ts +4 -0
- package/link/http/createHttpLink.d.ts.map +1 -0
- package/link/http/createHttpLink.js +127 -0
- package/link/http/createHttpLink.js.map +1 -0
- package/link/http/createSignalIfSupported.d.ts +8 -0
- package/link/http/createSignalIfSupported.d.ts.map +1 -0
- package/link/http/createSignalIfSupported.js +8 -0
- package/link/http/createSignalIfSupported.js.map +1 -0
- package/link/http/http.cjs +593 -0
- package/link/http/http.cjs.map +1 -0
- package/link/http/http.cjs.native.js +593 -0
- package/link/http/index.d.ts +11 -0
- package/link/http/index.d.ts.map +1 -0
- package/link/http/index.js +11 -0
- package/link/http/index.js.map +1 -0
- package/link/http/iterators/async.d.ts +2 -0
- package/link/http/iterators/async.d.ts.map +1 -0
- package/link/http/iterators/async.js +14 -0
- package/link/http/iterators/async.js.map +1 -0
- package/link/http/iterators/nodeStream.d.ts +4 -0
- package/link/http/iterators/nodeStream.d.ts.map +1 -0
- package/link/http/iterators/nodeStream.js +71 -0
- package/link/http/iterators/nodeStream.js.map +1 -0
- package/link/http/iterators/promise.d.ts +2 -0
- package/link/http/iterators/promise.d.ts.map +1 -0
- package/link/http/iterators/promise.js +28 -0
- package/link/http/iterators/promise.js.map +1 -0
- package/link/http/iterators/reader.d.ts +2 -0
- package/link/http/iterators/reader.d.ts.map +1 -0
- package/link/http/iterators/reader.js +15 -0
- package/link/http/iterators/reader.js.map +1 -0
- package/link/http/package.json +8 -0
- package/link/http/parseAndCheckHttpResponse.d.ts +14 -0
- package/link/http/parseAndCheckHttpResponse.d.ts.map +1 -0
- package/link/http/parseAndCheckHttpResponse.js +148 -0
- package/link/http/parseAndCheckHttpResponse.js.map +1 -0
- package/link/http/responseIterator.d.ts +3 -0
- package/link/http/responseIterator.d.ts.map +1 -0
- package/link/http/responseIterator.js +23 -0
- package/link/http/responseIterator.js.map +1 -0
- package/link/http/rewriteURIForGET.d.ts +9 -0
- package/link/http/rewriteURIForGET.d.ts.map +1 -0
- package/link/http/rewriteURIForGET.js +43 -0
- package/link/http/rewriteURIForGET.js.map +1 -0
- package/link/http/selectHttpOptionsAndBody.d.ts +57 -0
- package/link/http/selectHttpOptionsAndBody.d.ts.map +1 -0
- package/link/http/selectHttpOptionsAndBody.js +78 -0
- package/link/http/selectHttpOptionsAndBody.js.map +1 -0
- package/link/http/selectURI.d.ts +3 -0
- package/link/http/selectURI.d.ts.map +1 -0
- package/link/http/selectURI.js +14 -0
- package/link/http/selectURI.js.map +1 -0
- package/link/http/serializeFetchParameter.d.ts +6 -0
- package/link/http/serializeFetchParameter.d.ts.map +1 -0
- package/link/http/serializeFetchParameter.js +14 -0
- package/link/http/serializeFetchParameter.js.map +1 -0
- package/link/persisted-queries/index.d.ts +31 -0
- package/link/persisted-queries/index.d.ts.map +1 -0
- package/link/persisted-queries/index.js +170 -0
- package/link/persisted-queries/index.js.map +1 -0
- package/link/persisted-queries/package.json +8 -0
- package/link/persisted-queries/persisted-queries.cjs +174 -0
- package/link/persisted-queries/persisted-queries.cjs.map +1 -0
- package/link/persisted-queries/persisted-queries.cjs.native.js +174 -0
- package/link/retry/delayFunction.d.ts +11 -0
- package/link/retry/delayFunction.d.ts.map +1 -0
- package/link/retry/delayFunction.js +12 -0
- package/link/retry/delayFunction.js.map +1 -0
- package/link/retry/index.d.ts +2 -0
- package/link/retry/index.d.ts.map +1 -0
- package/link/retry/index.js +2 -0
- package/link/retry/index.js.map +1 -0
- package/link/retry/package.json +8 -0
- package/link/retry/retry.cjs +170 -0
- package/link/retry/retry.cjs.map +1 -0
- package/link/retry/retry.cjs.native.js +170 -0
- package/link/retry/retryFunction.d.ts +10 -0
- package/link/retry/retryFunction.d.ts.map +1 -0
- package/link/retry/retryFunction.js +9 -0
- package/link/retry/retryFunction.js.map +1 -0
- package/link/retry/retryLink.d.ts +17 -0
- package/link/retry/retryLink.d.ts.map +1 -0
- package/link/retry/retryLink.js +145 -0
- package/link/retry/retryLink.js.map +1 -0
- package/link/schema/index.d.ts +22 -0
- package/link/schema/index.d.ts.map +1 -0
- package/link/schema/index.js +50 -0
- package/link/schema/index.js.map +1 -0
- package/link/schema/package.json +8 -0
- package/link/schema/schema.cjs +56 -0
- package/link/schema/schema.cjs.map +1 -0
- package/link/schema/schema.cjs.native.js +56 -0
- package/link/subscriptions/index.d.ts +9 -0
- package/link/subscriptions/index.d.ts.map +1 -0
- package/link/subscriptions/index.js +39 -0
- package/link/subscriptions/index.js.map +1 -0
- package/link/subscriptions/package.json +8 -0
- package/link/subscriptions/subscriptions.cjs +45 -0
- package/link/subscriptions/subscriptions.cjs.map +1 -0
- package/link/subscriptions/subscriptions.cjs.native.js +45 -0
- package/link/utils/createOperation.d.ts +3 -0
- package/link/utils/createOperation.d.ts.map +1 -0
- package/link/utils/createOperation.js +23 -0
- package/link/utils/createOperation.js.map +1 -0
- package/link/utils/fromError.d.ts +3 -0
- package/link/utils/fromError.d.ts.map +1 -0
- package/link/utils/fromError.js +7 -0
- package/link/utils/fromError.js.map +1 -0
- package/link/utils/fromPromise.d.ts +3 -0
- package/link/utils/fromPromise.d.ts.map +1 -0
- package/link/utils/fromPromise.js +12 -0
- package/link/utils/fromPromise.js.map +1 -0
- package/link/utils/index.d.ts +9 -0
- package/link/utils/index.d.ts.map +1 -0
- package/link/utils/index.js +9 -0
- package/link/utils/index.js.map +1 -0
- package/link/utils/package.json +8 -0
- package/link/utils/throwServerError.d.ts +7 -0
- package/link/utils/throwServerError.d.ts.map +1 -0
- package/link/utils/throwServerError.js +9 -0
- package/link/utils/throwServerError.js.map +1 -0
- package/link/utils/toPromise.d.ts +3 -0
- package/link/utils/toPromise.d.ts.map +1 -0
- package/link/utils/toPromise.js +19 -0
- package/link/utils/toPromise.js.map +1 -0
- package/link/utils/transformOperation.d.ts +3 -0
- package/link/utils/transformOperation.d.ts.map +1 -0
- package/link/utils/transformOperation.js +17 -0
- package/link/utils/transformOperation.js.map +1 -0
- package/link/utils/utils.cjs +115 -0
- package/link/utils/utils.cjs.map +1 -0
- package/link/utils/utils.cjs.native.js +115 -0
- package/link/utils/validateOperation.d.ts +3 -0
- package/link/utils/validateOperation.d.ts.map +1 -0
- package/link/utils/validateOperation.js +18 -0
- package/link/utils/validateOperation.js.map +1 -0
- package/link/ws/index.d.ts +17 -0
- package/link/ws/index.d.ts.map +1 -0
- package/link/ws/index.js +22 -0
- package/link/ws/index.js.map +1 -0
- package/link/ws/package.json +8 -0
- package/link/ws/ws.cjs +28 -0
- package/link/ws/ws.cjs.map +1 -0
- package/link/ws/ws.cjs.native.js +28 -0
- package/main.cjs +16 -0
- package/main.cjs.map +1 -0
- package/main.cjs.native.js +16 -0
- package/package.json +141 -0
- package/react/cache/SuspenseCache.d.ts +18 -0
- package/react/cache/SuspenseCache.d.ts.map +1 -0
- package/react/cache/SuspenseCache.js +49 -0
- package/react/cache/SuspenseCache.js.map +1 -0
- package/react/cache/index.d.ts +2 -0
- package/react/cache/index.d.ts.map +1 -0
- package/react/cache/index.js +2 -0
- package/react/cache/index.js.map +1 -0
- package/react/components/Mutation.d.ts +12 -0
- package/react/components/Mutation.d.ts.map +1 -0
- package/react/components/Mutation.js +22 -0
- package/react/components/Mutation.js.map +1 -0
- package/react/components/Query.d.ts +12 -0
- package/react/components/Query.d.ts.map +1 -0
- package/react/components/Query.js +23 -0
- package/react/components/Query.js.map +1 -0
- package/react/components/Subscription.d.ts +12 -0
- package/react/components/Subscription.d.ts.map +1 -0
- package/react/components/Subscription.js +17 -0
- package/react/components/Subscription.js.map +1 -0
- package/react/components/components.cjs +81 -0
- package/react/components/components.cjs.map +1 -0
- package/react/components/components.cjs.native.js +81 -0
- package/react/components/index.d.ts +5 -0
- package/react/components/index.d.ts.map +1 -0
- package/react/components/index.js +5 -0
- package/react/components/index.js.map +1 -0
- package/react/components/package.json +8 -0
- package/react/components/types.d.ts +18 -0
- package/react/components/types.d.ts.map +1 -0
- package/react/components/types.js +2 -0
- package/react/components/types.js.map +1 -0
- package/react/context/ApolloConsumer.d.ts +7 -0
- package/react/context/ApolloConsumer.d.ts.map +1 -0
- package/react/context/ApolloConsumer.js +12 -0
- package/react/context/ApolloConsumer.js.map +1 -0
- package/react/context/ApolloContext.d.ts +12 -0
- package/react/context/ApolloContext.d.ts.map +1 -0
- package/react/context/ApolloContext.js +20 -0
- package/react/context/ApolloContext.js.map +1 -0
- package/react/context/ApolloProvider.d.ts +10 -0
- package/react/context/ApolloProvider.d.ts.map +1 -0
- package/react/context/ApolloProvider.js +20 -0
- package/react/context/ApolloProvider.js.map +1 -0
- package/react/context/context.cjs +70 -0
- package/react/context/context.cjs.map +1 -0
- package/react/context/context.cjs.native.js +70 -0
- package/react/context/index.d.ts +5 -0
- package/react/context/index.d.ts.map +1 -0
- package/react/context/index.js +5 -0
- package/react/context/index.js.map +1 -0
- package/react/context/package.json +8 -0
- package/react/hoc/graphql.d.ts +6 -0
- package/react/hoc/graphql.d.ts.map +1 -0
- package/react/hoc/graphql.js +17 -0
- package/react/hoc/graphql.js.map +1 -0
- package/react/hoc/hoc-utils.d.ts +17 -0
- package/react/hoc/hoc-utils.d.ts.map +1 -0
- package/react/hoc/hoc-utils.js +47 -0
- package/react/hoc/hoc-utils.js.map +1 -0
- package/react/hoc/hoc.cjs +325 -0
- package/react/hoc/hoc.cjs.map +1 -0
- package/react/hoc/hoc.cjs.native.js +325 -0
- package/react/hoc/index.d.ts +8 -0
- package/react/hoc/index.d.ts.map +1 -0
- package/react/hoc/index.js +8 -0
- package/react/hoc/index.js.map +1 -0
- package/react/hoc/mutation-hoc.d.ts +7 -0
- package/react/hoc/mutation-hoc.d.ts.map +1 -0
- package/react/hoc/mutation-hoc.js +63 -0
- package/react/hoc/mutation-hoc.js.map +1 -0
- package/react/hoc/package.json +8 -0
- package/react/hoc/query-hoc.d.ts +5 -0
- package/react/hoc/query-hoc.d.ts.map +1 -0
- package/react/hoc/query-hoc.js +70 -0
- package/react/hoc/query-hoc.js.map +1 -0
- package/react/hoc/subscription-hoc.d.ts +5 -0
- package/react/hoc/subscription-hoc.d.ts.map +1 -0
- package/react/hoc/subscription-hoc.js +80 -0
- package/react/hoc/subscription-hoc.js.map +1 -0
- package/react/hoc/types.d.ts +43 -0
- package/react/hoc/types.d.ts.map +1 -0
- package/react/hoc/types.js +2 -0
- package/react/hoc/types.js.map +1 -0
- package/react/hoc/withApollo.d.ts +4 -0
- package/react/hoc/withApollo.d.ts.map +1 -0
- package/react/hoc/withApollo.js +45 -0
- package/react/hoc/withApollo.js.map +1 -0
- package/react/hooks/compareResults.d.ts +3 -0
- package/react/hooks/compareResults.d.ts.map +1 -0
- package/react/hooks/compareResults.js +63 -0
- package/react/hooks/compareResults.js.map +1 -0
- package/react/hooks/hooks.cjs +913 -0
- package/react/hooks/hooks.cjs.map +1 -0
- package/react/hooks/hooks.cjs.native.js +913 -0
- package/react/hooks/index.d.ts +10 -0
- package/react/hooks/index.d.ts.map +1 -0
- package/react/hooks/index.js +10 -0
- package/react/hooks/index.js.map +1 -0
- package/react/hooks/internal/index.d.ts +3 -0
- package/react/hooks/internal/index.d.ts.map +1 -0
- package/react/hooks/internal/index.js +3 -0
- package/react/hooks/internal/index.js.map +1 -0
- package/react/hooks/internal/useDeepMemo.d.ts +3 -0
- package/react/hooks/internal/useDeepMemo.d.ts.map +1 -0
- package/react/hooks/internal/useDeepMemo.js +10 -0
- package/react/hooks/internal/useDeepMemo.js.map +1 -0
- package/react/hooks/internal/useIsomorphicLayoutEffect.d.ts +3 -0
- package/react/hooks/internal/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/react/hooks/internal/useIsomorphicLayoutEffect.js +6 -0
- package/react/hooks/internal/useIsomorphicLayoutEffect.js.map +1 -0
- package/react/hooks/package.json +8 -0
- package/react/hooks/useApolloClient.d.ts +3 -0
- package/react/hooks/useApolloClient.d.ts.map +1 -0
- package/react/hooks/useApolloClient.js +12 -0
- package/react/hooks/useApolloClient.js.map +1 -0
- package/react/hooks/useFragment.d.ts +13 -0
- package/react/hooks/useFragment.d.ts.map +1 -0
- package/react/hooks/useFragment.js +39 -0
- package/react/hooks/useFragment.js.map +1 -0
- package/react/hooks/useLazyQuery.d.ts +6 -0
- package/react/hooks/useLazyQuery.d.ts.map +1 -0
- package/react/hooks/useLazyQuery.js +71 -0
- package/react/hooks/useLazyQuery.js.map +1 -0
- package/react/hooks/useMutation.d.ts +6 -0
- package/react/hooks/useMutation.d.ts.map +1 -0
- package/react/hooks/useMutation.js +100 -0
- package/react/hooks/useMutation.js.map +1 -0
- package/react/hooks/useQuery.d.ts +41 -0
- package/react/hooks/useQuery.d.ts.map +1 -0
- package/react/hooks/useQuery.js +302 -0
- package/react/hooks/useQuery.js.map +1 -0
- package/react/hooks/useReactiveVar.d.ts +3 -0
- package/react/hooks/useReactiveVar.d.ts.map +1 -0
- package/react/hooks/useReactiveVar.js +16 -0
- package/react/hooks/useReactiveVar.js.map +1 -0
- package/react/hooks/useSubscription.d.ts +6 -0
- package/react/hooks/useSubscription.d.ts.map +1 -0
- package/react/hooks/useSubscription.js +141 -0
- package/react/hooks/useSubscription.js.map +1 -0
- package/react/hooks/useSuspenseCache.d.ts +2 -0
- package/react/hooks/useSuspenseCache.d.ts.map +1 -0
- package/react/hooks/useSuspenseCache.js +10 -0
- package/react/hooks/useSuspenseCache.js.map +1 -0
- package/react/hooks/useSuspenseQuery.d.ts +12 -0
- package/react/hooks/useSuspenseQuery.d.ts.map +1 -0
- package/react/hooks/useSuspenseQuery.js +181 -0
- package/react/hooks/useSuspenseQuery.js.map +1 -0
- package/react/hooks/useSyncExternalStore.d.ts +4 -0
- package/react/hooks/useSyncExternalStore.d.ts.map +1 -0
- package/react/hooks/useSyncExternalStore.js +48 -0
- package/react/hooks/useSyncExternalStore.js.map +1 -0
- package/react/index.d.ts +7 -0
- package/react/index.d.ts.map +1 -0
- package/react/index.js +7 -0
- package/react/index.js.map +1 -0
- package/react/package.json +8 -0
- package/react/parser/index.d.ts +15 -0
- package/react/parser/index.d.ts.map +1 -0
- package/react/parser/index.js +94 -0
- package/react/parser/index.js.map +1 -0
- package/react/parser/package.json +8 -0
- package/react/parser/parser.cjs +103 -0
- package/react/parser/parser.cjs.map +1 -0
- package/react/parser/parser.cjs.native.js +103 -0
- package/react/react.cjs +69 -0
- package/react/react.cjs.map +1 -0
- package/react/react.cjs.native.js +69 -0
- package/react/ssr/RenderPromises.d.ts +22 -0
- package/react/ssr/RenderPromises.d.ts.map +1 -0
- package/react/ssr/RenderPromises.js +90 -0
- package/react/ssr/RenderPromises.js.map +1 -0
- package/react/ssr/getDataFromTree.d.ts +13 -0
- package/react/ssr/getDataFromTree.d.ts.map +1 -0
- package/react/ssr/getDataFromTree.js +32 -0
- package/react/ssr/getDataFromTree.js.map +1 -0
- package/react/ssr/index.d.ts +4 -0
- package/react/ssr/index.d.ts.map +1 -0
- package/react/ssr/index.js +4 -0
- package/react/ssr/index.js.map +1 -0
- package/react/ssr/package.json +8 -0
- package/react/ssr/renderToStringWithData.d.ts +3 -0
- package/react/ssr/renderToStringWithData.d.ts.map +1 -0
- package/react/ssr/renderToStringWithData.js +9 -0
- package/react/ssr/renderToStringWithData.js.map +1 -0
- package/react/ssr/ssr.cjs +151 -0
- package/react/ssr/ssr.cjs.map +1 -0
- package/react/ssr/ssr.cjs.native.js +151 -0
- package/react/types/types.d.ts +130 -0
- package/react/types/types.d.ts.map +1 -0
- package/react/types/types.js +2 -0
- package/react/types/types.js.map +1 -0
- package/testing/core/core.cjs +315 -0
- package/testing/core/core.cjs.map +1 -0
- package/testing/core/core.cjs.native.js +315 -0
- package/testing/core/index.d.ts +8 -0
- package/testing/core/index.d.ts.map +1 -0
- package/testing/core/index.js +8 -0
- package/testing/core/index.js.map +1 -0
- package/testing/core/itAsync.d.ts +6 -0
- package/testing/core/itAsync.d.ts.map +1 -0
- package/testing/core/itAsync.js +19 -0
- package/testing/core/itAsync.js.map +1 -0
- package/testing/core/mocking/mockClient.d.ts +5 -0
- package/testing/core/mocking/mockClient.d.ts.map +1 -0
- package/testing/core/mocking/mockClient.js +14 -0
- package/testing/core/mocking/mockClient.js.map +1 -0
- package/testing/core/mocking/mockFetch.d.ts +24 -0
- package/testing/core/mocking/mockFetch.d.ts.map +1 -0
- package/testing/core/mocking/mockFetch.js +83 -0
- package/testing/core/mocking/mockFetch.js.map +1 -0
- package/testing/core/mocking/mockLink.d.ts +28 -0
- package/testing/core/mocking/mockLink.d.ts.map +1 -0
- package/testing/core/mocking/mockLink.js +139 -0
- package/testing/core/mocking/mockLink.js.map +1 -0
- package/testing/core/mocking/mockQueryManager.d.ts +5 -0
- package/testing/core/mocking/mockQueryManager.d.ts.map +1 -0
- package/testing/core/mocking/mockQueryManager.js +14 -0
- package/testing/core/mocking/mockQueryManager.js.map +1 -0
- package/testing/core/mocking/mockSubscriptionLink.d.ts +24 -0
- package/testing/core/mocking/mockSubscriptionLink.d.ts.map +1 -0
- package/testing/core/mocking/mockSubscriptionLink.js +62 -0
- package/testing/core/mocking/mockSubscriptionLink.js.map +1 -0
- package/testing/core/mocking/mockWatchQuery.d.ts +5 -0
- package/testing/core/mocking/mockWatchQuery.d.ts.map +1 -0
- package/testing/core/mocking/mockWatchQuery.js +15 -0
- package/testing/core/mocking/mockWatchQuery.js.map +1 -0
- package/testing/core/observableToPromise.d.ts +15 -0
- package/testing/core/observableToPromise.d.ts.map +1 -0
- package/testing/core/observableToPromise.js +65 -0
- package/testing/core/observableToPromise.js.map +1 -0
- package/testing/core/package.json +8 -0
- package/testing/core/subscribeAndCount.d.ts +3 -0
- package/testing/core/subscribeAndCount.d.ts.map +1 -0
- package/testing/core/subscribeAndCount.js +16 -0
- package/testing/core/subscribeAndCount.js.map +1 -0
- package/testing/core/wait.d.ts +3 -0
- package/testing/core/wait.d.ts.map +1 -0
- package/testing/core/wait.js +16 -0
- package/testing/core/wait.js.map +1 -0
- package/testing/core/withConsoleSpy.d.ts +4 -0
- package/testing/core/withConsoleSpy.d.ts.map +1 -0
- package/testing/core/withConsoleSpy.js +39 -0
- package/testing/core/withConsoleSpy.js.map +1 -0
- package/testing/core/wrap.d.ts +4 -0
- package/testing/core/wrap.d.ts.map +1 -0
- package/testing/core/wrap.js +26 -0
- package/testing/core/wrap.js.map +1 -0
- package/testing/index.d.ts +4 -0
- package/testing/index.d.ts.map +1 -0
- package/testing/index.js +4 -0
- package/testing/index.js.map +1 -0
- package/testing/package.json +8 -0
- package/testing/react/MockedProvider.d.ts +30 -0
- package/testing/react/MockedProvider.d.ts.map +1 -0
- package/testing/react/MockedProvider.js +39 -0
- package/testing/react/MockedProvider.js.map +1 -0
- package/testing/testing.cjs +109 -0
- package/testing/testing.cjs.map +1 -0
- package/testing/testing.cjs.native.js +109 -0
- package/utilities/common/arrays.d.ts +2 -0
- package/utilities/common/arrays.d.ts.map +1 -0
- package/utilities/common/arrays.js +4 -0
- package/utilities/common/arrays.js.map +1 -0
- package/utilities/common/canUse.d.ts +7 -0
- package/utilities/common/canUse.d.ts.map +1 -0
- package/utilities/common/canUse.js +11 -0
- package/utilities/common/canUse.js.map +1 -0
- package/utilities/common/cloneDeep.d.ts +2 -0
- package/utilities/common/cloneDeep.d.ts.map +1 -0
- package/utilities/common/cloneDeep.js +33 -0
- package/utilities/common/cloneDeep.js.map +1 -0
- package/utilities/common/compact.d.ts +3 -0
- package/utilities/common/compact.d.ts.map +1 -0
- package/utilities/common/compact.js +19 -0
- package/utilities/common/compact.js.map +1 -0
- package/utilities/common/errorHandling.d.ts +4 -0
- package/utilities/common/errorHandling.d.ts.map +1 -0
- package/utilities/common/errorHandling.js +21 -0
- package/utilities/common/errorHandling.js.map +1 -0
- package/utilities/common/filterInPlace.d.ts +2 -0
- package/utilities/common/filterInPlace.d.ts.map +1 -0
- package/utilities/common/filterInPlace.js +11 -0
- package/utilities/common/filterInPlace.js.map +1 -0
- package/utilities/common/incrementalResult.d.ts +6 -0
- package/utilities/common/incrementalResult.d.ts.map +1 -0
- package/utilities/common/incrementalResult.js +32 -0
- package/utilities/common/incrementalResult.js.map +1 -0
- package/utilities/common/makeUniqueId.d.ts +2 -0
- package/utilities/common/makeUniqueId.d.ts.map +1 -0
- package/utilities/common/makeUniqueId.js +7 -0
- package/utilities/common/makeUniqueId.js.map +1 -0
- package/utilities/common/maybeDeepFreeze.d.ts +2 -0
- package/utilities/common/maybeDeepFreeze.d.ts.map +1 -0
- package/utilities/common/maybeDeepFreeze.js +34 -0
- package/utilities/common/maybeDeepFreeze.js.map +1 -0
- package/utilities/common/mergeDeep.d.ts +14 -0
- package/utilities/common/mergeDeep.d.ts.map +1 -0
- package/utilities/common/mergeDeep.js +76 -0
- package/utilities/common/mergeDeep.js.map +1 -0
- package/utilities/common/mergeOptions.d.ts +5 -0
- package/utilities/common/mergeOptions.d.ts.map +1 -0
- package/utilities/common/mergeOptions.js +8 -0
- package/utilities/common/mergeOptions.js.map +1 -0
- package/utilities/common/objects.d.ts +2 -0
- package/utilities/common/objects.d.ts.map +1 -0
- package/utilities/common/objects.js +4 -0
- package/utilities/common/objects.js.map +1 -0
- package/utilities/common/responseIterator.d.ts +10 -0
- package/utilities/common/responseIterator.d.ts.map +1 -0
- package/utilities/common/responseIterator.js +21 -0
- package/utilities/common/responseIterator.js.map +1 -0
- package/utilities/common/stringifyForDisplay.d.ts +2 -0
- package/utilities/common/stringifyForDisplay.d.ts.map +1 -0
- package/utilities/common/stringifyForDisplay.js +8 -0
- package/utilities/common/stringifyForDisplay.js.map +1 -0
- package/utilities/globals/DEV.d.ts +3 -0
- package/utilities/globals/DEV.d.ts.map +1 -0
- package/utilities/globals/DEV.js +9 -0
- package/utilities/globals/DEV.js.map +1 -0
- package/utilities/globals/fix-graphql.d.ts +2 -0
- package/utilities/globals/fix-graphql.d.ts.map +1 -0
- package/utilities/globals/fix-graphql.js +6 -0
- package/utilities/globals/fix-graphql.js.map +1 -0
- package/utilities/globals/global.d.ts +5 -0
- package/utilities/globals/global.d.ts.map +1 -0
- package/utilities/globals/global.js +6 -0
- package/utilities/globals/global.js.map +1 -0
- package/utilities/globals/globals.cjs +42 -0
- package/utilities/globals/globals.cjs.map +1 -0
- package/utilities/globals/globals.cjs.native.js +42 -0
- package/utilities/globals/index.d.ts +8 -0
- package/utilities/globals/index.d.ts.map +1 -0
- package/utilities/globals/index.js +10 -0
- package/utilities/globals/index.js.map +1 -0
- package/utilities/globals/maybe.d.ts +2 -0
- package/utilities/globals/maybe.d.ts.map +1 -0
- package/utilities/globals/maybe.js +7 -0
- package/utilities/globals/maybe.js.map +1 -0
- package/utilities/globals/package.json +8 -0
- package/utilities/graphql/directives.d.ts +18 -0
- package/utilities/graphql/directives.d.ts.map +1 -0
- package/utilities/graphql/directives.js +72 -0
- package/utilities/graphql/directives.js.map +1 -0
- package/utilities/graphql/fragments.d.ts +9 -0
- package/utilities/graphql/fragments.d.ts.map +1 -0
- package/utilities/graphql/fragments.js +64 -0
- package/utilities/graphql/fragments.js.map +1 -0
- package/utilities/graphql/getFromAST.d.ts +10 -0
- package/utilities/graphql/getFromAST.d.ts.map +1 -0
- package/utilities/graphql/getFromAST.js +76 -0
- package/utilities/graphql/getFromAST.js.map +1 -0
- package/utilities/graphql/storeUtils.d.ts +32 -0
- package/utilities/graphql/storeUtils.d.ts.map +1 -0
- package/utilities/graphql/storeUtils.js +208 -0
- package/utilities/graphql/storeUtils.js.map +1 -0
- package/utilities/graphql/transform.d.ts +27 -0
- package/utilities/graphql/transform.d.ts.map +1 -0
- package/utilities/graphql/transform.js +281 -0
- package/utilities/graphql/transform.js.map +1 -0
- package/utilities/index.d.ts +27 -0
- package/utilities/index.d.ts.map +1 -0
- package/utilities/index.js +27 -0
- package/utilities/index.js.map +1 -0
- package/utilities/observables/Concast.d.ts +27 -0
- package/utilities/observables/Concast.d.ts.map +1 -0
- package/utilities/observables/Concast.js +137 -0
- package/utilities/observables/Concast.js.map +1 -0
- package/utilities/observables/Observable.d.ts +5 -0
- package/utilities/observables/Observable.d.ts.map +1 -0
- package/utilities/observables/Observable.js +9 -0
- package/utilities/observables/Observable.js.map +1 -0
- package/utilities/observables/asyncMap.d.ts +3 -0
- package/utilities/observables/asyncMap.d.ts.map +1 -0
- package/utilities/observables/asyncMap.js +49 -0
- package/utilities/observables/asyncMap.js.map +1 -0
- package/utilities/observables/iteration.d.ts +3 -0
- package/utilities/observables/iteration.d.ts.map +1 -0
- package/utilities/observables/iteration.js +6 -0
- package/utilities/observables/iteration.js.map +1 -0
- package/utilities/observables/subclassing.d.ts +3 -0
- package/utilities/observables/subclassing.d.ts.map +1 -0
- package/utilities/observables/subclassing.js +13 -0
- package/utilities/observables/subclassing.js.map +1 -0
- package/utilities/package.json +8 -0
- package/utilities/policies/pagination.d.ts +28 -0
- package/utilities/policies/pagination.d.ts.map +1 -0
- package/utilities/policies/pagination.js +151 -0
- package/utilities/policies/pagination.js.map +1 -0
- package/utilities/types/IsStrictlyAny.d.ts +5 -0
- package/utilities/types/IsStrictlyAny.d.ts.map +1 -0
- package/utilities/types/IsStrictlyAny.js +2 -0
- package/utilities/types/IsStrictlyAny.js.map +1 -0
- package/utilities/utilities.cjs +1371 -0
- package/utilities/utilities.cjs.map +1 -0
- package/utilities/utilities.cjs.native.js +1371 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +2 -0
- package/version.js.map +1 -0
|
@@ -0,0 +1,593 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var globals = require('../../utilities/globals');
|
|
6
|
+
var tslib = require('tslib');
|
|
7
|
+
var utilities = require('../../utilities');
|
|
8
|
+
var utils = require('../utils');
|
|
9
|
+
var graphql = require('graphql');
|
|
10
|
+
var core = require('../core');
|
|
11
|
+
|
|
12
|
+
function asyncIterator(source) {
|
|
13
|
+
var _a;
|
|
14
|
+
var iterator = source[Symbol.asyncIterator]();
|
|
15
|
+
return _a = {
|
|
16
|
+
next: function () {
|
|
17
|
+
return iterator.next();
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
_a[Symbol.asyncIterator] = function () {
|
|
21
|
+
return this;
|
|
22
|
+
},
|
|
23
|
+
_a;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function nodeStreamIterator(stream) {
|
|
27
|
+
var cleanup = null;
|
|
28
|
+
var error = null;
|
|
29
|
+
var done = false;
|
|
30
|
+
var data = [];
|
|
31
|
+
var waiting = [];
|
|
32
|
+
function onData(chunk) {
|
|
33
|
+
if (error)
|
|
34
|
+
return;
|
|
35
|
+
if (waiting.length) {
|
|
36
|
+
var shiftedArr = waiting.shift();
|
|
37
|
+
if (Array.isArray(shiftedArr) && shiftedArr[0]) {
|
|
38
|
+
return shiftedArr[0]({ value: chunk, done: false });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
data.push(chunk);
|
|
42
|
+
}
|
|
43
|
+
function onError(err) {
|
|
44
|
+
error = err;
|
|
45
|
+
var all = waiting.slice();
|
|
46
|
+
all.forEach(function (pair) {
|
|
47
|
+
pair[1](err);
|
|
48
|
+
});
|
|
49
|
+
!cleanup || cleanup();
|
|
50
|
+
}
|
|
51
|
+
function onEnd() {
|
|
52
|
+
done = true;
|
|
53
|
+
var all = waiting.slice();
|
|
54
|
+
all.forEach(function (pair) {
|
|
55
|
+
pair[0]({ value: undefined, done: true });
|
|
56
|
+
});
|
|
57
|
+
!cleanup || cleanup();
|
|
58
|
+
}
|
|
59
|
+
cleanup = function () {
|
|
60
|
+
cleanup = null;
|
|
61
|
+
stream.removeListener("data", onData);
|
|
62
|
+
stream.removeListener("error", onError);
|
|
63
|
+
stream.removeListener("end", onEnd);
|
|
64
|
+
stream.removeListener("finish", onEnd);
|
|
65
|
+
stream.removeListener("close", onEnd);
|
|
66
|
+
};
|
|
67
|
+
stream.on("data", onData);
|
|
68
|
+
stream.on("error", onError);
|
|
69
|
+
stream.on("end", onEnd);
|
|
70
|
+
stream.on("finish", onEnd);
|
|
71
|
+
stream.on("close", onEnd);
|
|
72
|
+
function getNext() {
|
|
73
|
+
return new Promise(function (resolve, reject) {
|
|
74
|
+
if (error)
|
|
75
|
+
return reject(error);
|
|
76
|
+
if (data.length)
|
|
77
|
+
return resolve({ value: data.shift(), done: false });
|
|
78
|
+
if (done)
|
|
79
|
+
return resolve({ value: undefined, done: true });
|
|
80
|
+
waiting.push([resolve, reject]);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
var iterator = {
|
|
84
|
+
next: function () {
|
|
85
|
+
return getNext();
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
if (utilities.canUseAsyncIteratorSymbol) {
|
|
89
|
+
iterator[Symbol.asyncIterator] = function () {
|
|
90
|
+
return this;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
return iterator;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function promiseIterator(promise) {
|
|
97
|
+
var resolved = false;
|
|
98
|
+
var iterator = {
|
|
99
|
+
next: function () {
|
|
100
|
+
if (resolved)
|
|
101
|
+
return Promise.resolve({
|
|
102
|
+
value: undefined,
|
|
103
|
+
done: true,
|
|
104
|
+
});
|
|
105
|
+
resolved = true;
|
|
106
|
+
return new Promise(function (resolve, reject) {
|
|
107
|
+
promise
|
|
108
|
+
.then(function (value) {
|
|
109
|
+
resolve({ value: value, done: false });
|
|
110
|
+
})
|
|
111
|
+
.catch(reject);
|
|
112
|
+
});
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
if (utilities.canUseAsyncIteratorSymbol) {
|
|
116
|
+
iterator[Symbol.asyncIterator] = function () {
|
|
117
|
+
return this;
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
return iterator;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function readerIterator(reader) {
|
|
124
|
+
var iterator = {
|
|
125
|
+
next: function () {
|
|
126
|
+
return reader.read();
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
if (utilities.canUseAsyncIteratorSymbol) {
|
|
130
|
+
iterator[Symbol.asyncIterator] = function () {
|
|
131
|
+
return this;
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
return iterator;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function responseIterator(response) {
|
|
138
|
+
var body = response;
|
|
139
|
+
if (utilities.isNodeResponse(response))
|
|
140
|
+
body = response.body;
|
|
141
|
+
if (utilities.isAsyncIterableIterator(body))
|
|
142
|
+
return asyncIterator(body);
|
|
143
|
+
if (utilities.isReadableStream(body))
|
|
144
|
+
return readerIterator(body.getReader());
|
|
145
|
+
if (utilities.isStreamableBlob(body)) {
|
|
146
|
+
return readerIterator(body.stream().getReader());
|
|
147
|
+
}
|
|
148
|
+
if (utilities.isBlob(body))
|
|
149
|
+
return promiseIterator(body.arrayBuffer());
|
|
150
|
+
if (utilities.isNodeReadableStream(body))
|
|
151
|
+
return nodeStreamIterator(body);
|
|
152
|
+
throw new Error("Unknown body type for responseIterator. Please pass a streamable response.");
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
156
|
+
function readMultipartBody(response, observer) {
|
|
157
|
+
var _a, _b, _c;
|
|
158
|
+
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
159
|
+
var decoder, contentType, delimiter, boundaryVal, boundary, buffer, iterator, running, _d, value, done, chunk, bi, message, i, headers, contentType_1, body, result;
|
|
160
|
+
var _e;
|
|
161
|
+
return tslib.__generator(this, function (_f) {
|
|
162
|
+
switch (_f.label) {
|
|
163
|
+
case 0:
|
|
164
|
+
if (TextDecoder === undefined) {
|
|
165
|
+
throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");
|
|
166
|
+
}
|
|
167
|
+
decoder = new TextDecoder("utf-8");
|
|
168
|
+
contentType = (_a = response.headers) === null || _a === void 0 ? void 0 : _a.get('content-type');
|
|
169
|
+
delimiter = "boundary=";
|
|
170
|
+
boundaryVal = (contentType === null || contentType === void 0 ? void 0 : contentType.includes(delimiter))
|
|
171
|
+
? contentType === null || contentType === void 0 ? void 0 : contentType.substring((contentType === null || contentType === void 0 ? void 0 : contentType.indexOf(delimiter)) + delimiter.length).replace(/['"]/g, "").replace(/\;(.*)/gm, "").trim()
|
|
172
|
+
: "-";
|
|
173
|
+
boundary = "--".concat(boundaryVal);
|
|
174
|
+
buffer = "";
|
|
175
|
+
iterator = responseIterator(response);
|
|
176
|
+
running = true;
|
|
177
|
+
_f.label = 1;
|
|
178
|
+
case 1:
|
|
179
|
+
if (!running) return [3, 3];
|
|
180
|
+
return [4, iterator.next()];
|
|
181
|
+
case 2:
|
|
182
|
+
_d = _f.sent(), value = _d.value, done = _d.done;
|
|
183
|
+
chunk = typeof value === "string" ? value : decoder.decode(value);
|
|
184
|
+
running = !done;
|
|
185
|
+
buffer += chunk;
|
|
186
|
+
bi = buffer.indexOf(boundary);
|
|
187
|
+
while (bi > -1) {
|
|
188
|
+
message = void 0;
|
|
189
|
+
_e = [
|
|
190
|
+
buffer.slice(0, bi),
|
|
191
|
+
buffer.slice(bi + boundary.length),
|
|
192
|
+
], message = _e[0], buffer = _e[1];
|
|
193
|
+
if (message.trim()) {
|
|
194
|
+
i = message.indexOf("\r\n\r\n");
|
|
195
|
+
headers = parseHeaders(message.slice(0, i));
|
|
196
|
+
contentType_1 = headers["content-type"];
|
|
197
|
+
if (contentType_1 &&
|
|
198
|
+
contentType_1.toLowerCase().indexOf("application/json") === -1) {
|
|
199
|
+
throw new Error("Unsupported patch content type: application/json is required.");
|
|
200
|
+
}
|
|
201
|
+
body = message.slice(i);
|
|
202
|
+
try {
|
|
203
|
+
result = parseJsonBody(response, body.replace("\r\n", ""));
|
|
204
|
+
if (Object.keys(result).length > 1 ||
|
|
205
|
+
"data" in result ||
|
|
206
|
+
"incremental" in result ||
|
|
207
|
+
"errors" in result) {
|
|
208
|
+
(_b = observer.next) === null || _b === void 0 ? void 0 : _b.call(observer, result);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
catch (err) {
|
|
212
|
+
handleError(err, observer);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
bi = buffer.indexOf(boundary);
|
|
216
|
+
}
|
|
217
|
+
return [3, 1];
|
|
218
|
+
case 3:
|
|
219
|
+
(_c = observer.complete) === null || _c === void 0 ? void 0 : _c.call(observer);
|
|
220
|
+
return [2];
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
function parseHeaders(headerText) {
|
|
226
|
+
var headersInit = {};
|
|
227
|
+
headerText.split("\n").forEach(function (line) {
|
|
228
|
+
var i = line.indexOf(":");
|
|
229
|
+
if (i > -1) {
|
|
230
|
+
var name_1 = line.slice(0, i).trim().toLowerCase();
|
|
231
|
+
var value = line.slice(i + 1).trim();
|
|
232
|
+
headersInit[name_1] = value;
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
return headersInit;
|
|
236
|
+
}
|
|
237
|
+
function parseJsonBody(response, bodyText) {
|
|
238
|
+
if (response.status >= 300) {
|
|
239
|
+
var getResult = function () {
|
|
240
|
+
try {
|
|
241
|
+
return JSON.parse(bodyText);
|
|
242
|
+
}
|
|
243
|
+
catch (err) {
|
|
244
|
+
return bodyText;
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
utils.throwServerError(response, getResult(), "Response not successful: Received status code ".concat(response.status));
|
|
248
|
+
}
|
|
249
|
+
try {
|
|
250
|
+
return JSON.parse(bodyText);
|
|
251
|
+
}
|
|
252
|
+
catch (err) {
|
|
253
|
+
var parseError = err;
|
|
254
|
+
parseError.name = "ServerParseError";
|
|
255
|
+
parseError.response = response;
|
|
256
|
+
parseError.statusCode = response.status;
|
|
257
|
+
parseError.bodyText = bodyText;
|
|
258
|
+
throw parseError;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
function handleError(err, observer) {
|
|
262
|
+
var _a, _b;
|
|
263
|
+
if (err.name === "AbortError")
|
|
264
|
+
return;
|
|
265
|
+
if (err.result && err.result.errors && err.result.data) {
|
|
266
|
+
(_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, err.result);
|
|
267
|
+
}
|
|
268
|
+
(_b = observer.error) === null || _b === void 0 ? void 0 : _b.call(observer, err);
|
|
269
|
+
}
|
|
270
|
+
function readJsonBody(response, operation, observer) {
|
|
271
|
+
parseAndCheckHttpResponse(operation)(response)
|
|
272
|
+
.then(function (result) {
|
|
273
|
+
var _a, _b;
|
|
274
|
+
(_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, result);
|
|
275
|
+
(_b = observer.complete) === null || _b === void 0 ? void 0 : _b.call(observer);
|
|
276
|
+
})
|
|
277
|
+
.catch(function (err) { return handleError(err, observer); });
|
|
278
|
+
}
|
|
279
|
+
function parseAndCheckHttpResponse(operations) {
|
|
280
|
+
return function (response) {
|
|
281
|
+
return response
|
|
282
|
+
.text()
|
|
283
|
+
.then(function (bodyText) { return parseJsonBody(response, bodyText); })
|
|
284
|
+
.then(function (result) {
|
|
285
|
+
if (response.status >= 300) {
|
|
286
|
+
utils.throwServerError(response, result, "Response not successful: Received status code ".concat(response.status));
|
|
287
|
+
}
|
|
288
|
+
if (!Array.isArray(result) &&
|
|
289
|
+
!hasOwnProperty.call(result, "data") &&
|
|
290
|
+
!hasOwnProperty.call(result, "errors")) {
|
|
291
|
+
utils.throwServerError(response, result, "Server response was missing for query '".concat(Array.isArray(operations)
|
|
292
|
+
? operations.map(function (op) { return op.operationName; })
|
|
293
|
+
: operations.operationName, "'."));
|
|
294
|
+
}
|
|
295
|
+
return result;
|
|
296
|
+
});
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
var serializeFetchParameter = function (p, label) {
|
|
301
|
+
var serialized;
|
|
302
|
+
try {
|
|
303
|
+
serialized = JSON.stringify(p);
|
|
304
|
+
}
|
|
305
|
+
catch (e) {
|
|
306
|
+
var parseError = globals.__DEV__ ? new globals.InvariantError("Network request failed. ".concat(label, " is not serializable: ").concat(e.message)) : new globals.InvariantError(24);
|
|
307
|
+
parseError.parseError = e;
|
|
308
|
+
throw parseError;
|
|
309
|
+
}
|
|
310
|
+
return serialized;
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
var defaultHttpOptions = {
|
|
314
|
+
includeQuery: true,
|
|
315
|
+
includeExtensions: false,
|
|
316
|
+
preserveHeaderCase: false,
|
|
317
|
+
};
|
|
318
|
+
var defaultHeaders = {
|
|
319
|
+
accept: '*/*',
|
|
320
|
+
'content-type': 'application/json',
|
|
321
|
+
};
|
|
322
|
+
var defaultOptions = {
|
|
323
|
+
method: 'POST',
|
|
324
|
+
};
|
|
325
|
+
var fallbackHttpConfig = {
|
|
326
|
+
http: defaultHttpOptions,
|
|
327
|
+
headers: defaultHeaders,
|
|
328
|
+
options: defaultOptions,
|
|
329
|
+
};
|
|
330
|
+
var defaultPrinter = function (ast, printer) { return printer(ast); };
|
|
331
|
+
function selectHttpOptionsAndBody(operation, fallbackConfig) {
|
|
332
|
+
var configs = [];
|
|
333
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
334
|
+
configs[_i - 2] = arguments[_i];
|
|
335
|
+
}
|
|
336
|
+
configs.unshift(fallbackConfig);
|
|
337
|
+
return selectHttpOptionsAndBodyInternal.apply(void 0, tslib.__spreadArray([operation,
|
|
338
|
+
defaultPrinter], configs, false));
|
|
339
|
+
}
|
|
340
|
+
function selectHttpOptionsAndBodyInternal(operation, printer) {
|
|
341
|
+
var configs = [];
|
|
342
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
343
|
+
configs[_i - 2] = arguments[_i];
|
|
344
|
+
}
|
|
345
|
+
var options = {};
|
|
346
|
+
var http = {};
|
|
347
|
+
configs.forEach(function (config) {
|
|
348
|
+
options = tslib.__assign(tslib.__assign(tslib.__assign({}, options), config.options), { headers: tslib.__assign(tslib.__assign({}, options.headers), config.headers) });
|
|
349
|
+
if (config.credentials) {
|
|
350
|
+
options.credentials = config.credentials;
|
|
351
|
+
}
|
|
352
|
+
http = tslib.__assign(tslib.__assign({}, http), config.http);
|
|
353
|
+
});
|
|
354
|
+
if (options.headers) {
|
|
355
|
+
options.headers = removeDuplicateHeaders(options.headers, http.preserveHeaderCase);
|
|
356
|
+
}
|
|
357
|
+
var operationName = operation.operationName, extensions = operation.extensions, variables = operation.variables, query = operation.query;
|
|
358
|
+
var body = { operationName: operationName, variables: variables };
|
|
359
|
+
if (http.includeExtensions)
|
|
360
|
+
body.extensions = extensions;
|
|
361
|
+
if (http.includeQuery)
|
|
362
|
+
body.query = printer(query, graphql.print);
|
|
363
|
+
return {
|
|
364
|
+
options: options,
|
|
365
|
+
body: body,
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
function removeDuplicateHeaders(headers, preserveHeaderCase) {
|
|
369
|
+
if (!preserveHeaderCase) {
|
|
370
|
+
var normalizedHeaders_1 = Object.create(null);
|
|
371
|
+
Object.keys(Object(headers)).forEach(function (name) {
|
|
372
|
+
normalizedHeaders_1[name.toLowerCase()] = headers[name];
|
|
373
|
+
});
|
|
374
|
+
return normalizedHeaders_1;
|
|
375
|
+
}
|
|
376
|
+
var headerData = Object.create(null);
|
|
377
|
+
Object.keys(Object(headers)).forEach(function (name) {
|
|
378
|
+
headerData[name.toLowerCase()] = { originalName: name, value: headers[name] };
|
|
379
|
+
});
|
|
380
|
+
var normalizedHeaders = Object.create(null);
|
|
381
|
+
Object.keys(headerData).forEach(function (name) {
|
|
382
|
+
normalizedHeaders[headerData[name].originalName] = headerData[name].value;
|
|
383
|
+
});
|
|
384
|
+
return normalizedHeaders;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
var checkFetcher = function (fetcher) {
|
|
388
|
+
if (!fetcher && typeof fetch === 'undefined') {
|
|
389
|
+
throw globals.__DEV__ ? new globals.InvariantError("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n ") : new globals.InvariantError(23);
|
|
390
|
+
}
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
var createSignalIfSupported = function () {
|
|
394
|
+
if (typeof AbortController === 'undefined')
|
|
395
|
+
return { controller: false, signal: false };
|
|
396
|
+
var controller = new AbortController();
|
|
397
|
+
var signal = controller.signal;
|
|
398
|
+
return { controller: controller, signal: signal };
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
var selectURI = function (operation, fallbackURI) {
|
|
402
|
+
var context = operation.getContext();
|
|
403
|
+
var contextURI = context.uri;
|
|
404
|
+
if (contextURI) {
|
|
405
|
+
return contextURI;
|
|
406
|
+
}
|
|
407
|
+
else if (typeof fallbackURI === 'function') {
|
|
408
|
+
return fallbackURI(operation);
|
|
409
|
+
}
|
|
410
|
+
else {
|
|
411
|
+
return fallbackURI || '/graphql';
|
|
412
|
+
}
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
function rewriteURIForGET(chosenURI, body) {
|
|
416
|
+
var queryParams = [];
|
|
417
|
+
var addQueryParam = function (key, value) {
|
|
418
|
+
queryParams.push("".concat(key, "=").concat(encodeURIComponent(value)));
|
|
419
|
+
};
|
|
420
|
+
if ('query' in body) {
|
|
421
|
+
addQueryParam('query', body.query);
|
|
422
|
+
}
|
|
423
|
+
if (body.operationName) {
|
|
424
|
+
addQueryParam('operationName', body.operationName);
|
|
425
|
+
}
|
|
426
|
+
if (body.variables) {
|
|
427
|
+
var serializedVariables = void 0;
|
|
428
|
+
try {
|
|
429
|
+
serializedVariables = serializeFetchParameter(body.variables, 'Variables map');
|
|
430
|
+
}
|
|
431
|
+
catch (parseError) {
|
|
432
|
+
return { parseError: parseError };
|
|
433
|
+
}
|
|
434
|
+
addQueryParam('variables', serializedVariables);
|
|
435
|
+
}
|
|
436
|
+
if (body.extensions) {
|
|
437
|
+
var serializedExtensions = void 0;
|
|
438
|
+
try {
|
|
439
|
+
serializedExtensions = serializeFetchParameter(body.extensions, 'Extensions map');
|
|
440
|
+
}
|
|
441
|
+
catch (parseError) {
|
|
442
|
+
return { parseError: parseError };
|
|
443
|
+
}
|
|
444
|
+
addQueryParam('extensions', serializedExtensions);
|
|
445
|
+
}
|
|
446
|
+
var fragment = '', preFragment = chosenURI;
|
|
447
|
+
var fragmentStart = chosenURI.indexOf('#');
|
|
448
|
+
if (fragmentStart !== -1) {
|
|
449
|
+
fragment = chosenURI.substr(fragmentStart);
|
|
450
|
+
preFragment = chosenURI.substr(0, fragmentStart);
|
|
451
|
+
}
|
|
452
|
+
var queryParamsPrefix = preFragment.indexOf('?') === -1 ? '?' : '&';
|
|
453
|
+
var newURI = preFragment + queryParamsPrefix + queryParams.join('&') + fragment;
|
|
454
|
+
return { newURI: newURI };
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
var backupFetch = utilities.maybe(function () { return fetch; });
|
|
458
|
+
var createHttpLink = function (linkOptions) {
|
|
459
|
+
if (linkOptions === void 0) { linkOptions = {}; }
|
|
460
|
+
var _a = linkOptions.uri, uri = _a === void 0 ? '/graphql' : _a, preferredFetch = linkOptions.fetch, _b = linkOptions.print, print = _b === void 0 ? defaultPrinter : _b, includeExtensions = linkOptions.includeExtensions, preserveHeaderCase = linkOptions.preserveHeaderCase, useGETForQueries = linkOptions.useGETForQueries, _c = linkOptions.includeUnusedVariables, includeUnusedVariables = _c === void 0 ? false : _c, requestOptions = tslib.__rest(linkOptions, ["uri", "fetch", "print", "includeExtensions", "preserveHeaderCase", "useGETForQueries", "includeUnusedVariables"]);
|
|
461
|
+
if (globals.__DEV__) {
|
|
462
|
+
checkFetcher(preferredFetch || backupFetch);
|
|
463
|
+
}
|
|
464
|
+
var linkConfig = {
|
|
465
|
+
http: { includeExtensions: includeExtensions, preserveHeaderCase: preserveHeaderCase },
|
|
466
|
+
options: requestOptions.fetchOptions,
|
|
467
|
+
credentials: requestOptions.credentials,
|
|
468
|
+
headers: requestOptions.headers,
|
|
469
|
+
};
|
|
470
|
+
return new core.ApolloLink(function (operation) {
|
|
471
|
+
var chosenURI = selectURI(operation, uri);
|
|
472
|
+
var context = operation.getContext();
|
|
473
|
+
var clientAwarenessHeaders = {};
|
|
474
|
+
if (context.clientAwareness) {
|
|
475
|
+
var _a = context.clientAwareness, name_1 = _a.name, version = _a.version;
|
|
476
|
+
if (name_1) {
|
|
477
|
+
clientAwarenessHeaders['apollographql-client-name'] = name_1;
|
|
478
|
+
}
|
|
479
|
+
if (version) {
|
|
480
|
+
clientAwarenessHeaders['apollographql-client-version'] = version;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
var contextHeaders = tslib.__assign(tslib.__assign({}, clientAwarenessHeaders), context.headers);
|
|
484
|
+
var contextConfig = {
|
|
485
|
+
http: context.http,
|
|
486
|
+
options: context.fetchOptions,
|
|
487
|
+
credentials: context.credentials,
|
|
488
|
+
headers: contextHeaders,
|
|
489
|
+
};
|
|
490
|
+
if (utilities.hasDirectives(['client'], operation.query)) {
|
|
491
|
+
var transformedQuery = utilities.removeClientSetsFromDocument(operation.query);
|
|
492
|
+
if (!transformedQuery) {
|
|
493
|
+
return utils.fromError(new Error('HttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or set the `transformOptions.removeClientFields` option to `true`.'));
|
|
494
|
+
}
|
|
495
|
+
operation.query = transformedQuery;
|
|
496
|
+
}
|
|
497
|
+
var _b = selectHttpOptionsAndBodyInternal(operation, print, fallbackHttpConfig, linkConfig, contextConfig), options = _b.options, body = _b.body;
|
|
498
|
+
if (body.variables && !includeUnusedVariables) {
|
|
499
|
+
var unusedNames_1 = new Set(Object.keys(body.variables));
|
|
500
|
+
graphql.visit(operation.query, {
|
|
501
|
+
Variable: function (node, _key, parent) {
|
|
502
|
+
if (parent && parent.kind !== 'VariableDefinition') {
|
|
503
|
+
unusedNames_1.delete(node.name.value);
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
});
|
|
507
|
+
if (unusedNames_1.size) {
|
|
508
|
+
body.variables = tslib.__assign({}, body.variables);
|
|
509
|
+
unusedNames_1.forEach(function (name) {
|
|
510
|
+
delete body.variables[name];
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
var controller;
|
|
515
|
+
if (!options.signal) {
|
|
516
|
+
var _c = createSignalIfSupported(), _controller = _c.controller, signal = _c.signal;
|
|
517
|
+
controller = _controller;
|
|
518
|
+
if (controller)
|
|
519
|
+
options.signal = signal;
|
|
520
|
+
}
|
|
521
|
+
var definitionIsMutation = function (d) {
|
|
522
|
+
return d.kind === 'OperationDefinition' && d.operation === 'mutation';
|
|
523
|
+
};
|
|
524
|
+
if (useGETForQueries &&
|
|
525
|
+
!operation.query.definitions.some(definitionIsMutation)) {
|
|
526
|
+
options.method = 'GET';
|
|
527
|
+
}
|
|
528
|
+
if (utilities.hasDirectives(['defer'], operation.query)) {
|
|
529
|
+
options.headers = options.headers || {};
|
|
530
|
+
options.headers.accept = "multipart/mixed; deferSpec=20220824, application/json";
|
|
531
|
+
}
|
|
532
|
+
if (options.method === 'GET') {
|
|
533
|
+
var _d = rewriteURIForGET(chosenURI, body), newURI = _d.newURI, parseError = _d.parseError;
|
|
534
|
+
if (parseError) {
|
|
535
|
+
return utils.fromError(parseError);
|
|
536
|
+
}
|
|
537
|
+
chosenURI = newURI;
|
|
538
|
+
}
|
|
539
|
+
else {
|
|
540
|
+
try {
|
|
541
|
+
options.body = serializeFetchParameter(body, 'Payload');
|
|
542
|
+
}
|
|
543
|
+
catch (parseError) {
|
|
544
|
+
return utils.fromError(parseError);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
return new utilities.Observable(function (observer) {
|
|
548
|
+
var currentFetch = preferredFetch || utilities.maybe(function () { return fetch; }) || backupFetch;
|
|
549
|
+
currentFetch(chosenURI, options)
|
|
550
|
+
.then(function (response) {
|
|
551
|
+
var _a;
|
|
552
|
+
operation.setContext({ response: response });
|
|
553
|
+
var ctype = (_a = response.headers) === null || _a === void 0 ? void 0 : _a.get('content-type');
|
|
554
|
+
if (ctype !== null && /^multipart\/mixed/i.test(ctype)) {
|
|
555
|
+
return readMultipartBody(response, observer);
|
|
556
|
+
}
|
|
557
|
+
else {
|
|
558
|
+
return readJsonBody(response, operation, observer);
|
|
559
|
+
}
|
|
560
|
+
})
|
|
561
|
+
.catch(function (err) { return handleError(err, observer); });
|
|
562
|
+
return function () {
|
|
563
|
+
if (controller)
|
|
564
|
+
controller.abort();
|
|
565
|
+
};
|
|
566
|
+
});
|
|
567
|
+
});
|
|
568
|
+
};
|
|
569
|
+
|
|
570
|
+
var HttpLink = (function (_super) {
|
|
571
|
+
tslib.__extends(HttpLink, _super);
|
|
572
|
+
function HttpLink(options) {
|
|
573
|
+
if (options === void 0) { options = {}; }
|
|
574
|
+
var _this = _super.call(this, createHttpLink(options).request) || this;
|
|
575
|
+
_this.options = options;
|
|
576
|
+
return _this;
|
|
577
|
+
}
|
|
578
|
+
return HttpLink;
|
|
579
|
+
}(core.ApolloLink));
|
|
580
|
+
|
|
581
|
+
exports.HttpLink = HttpLink;
|
|
582
|
+
exports.checkFetcher = checkFetcher;
|
|
583
|
+
exports.createHttpLink = createHttpLink;
|
|
584
|
+
exports.createSignalIfSupported = createSignalIfSupported;
|
|
585
|
+
exports.defaultPrinter = defaultPrinter;
|
|
586
|
+
exports.fallbackHttpConfig = fallbackHttpConfig;
|
|
587
|
+
exports.parseAndCheckHttpResponse = parseAndCheckHttpResponse;
|
|
588
|
+
exports.rewriteURIForGET = rewriteURIForGET;
|
|
589
|
+
exports.selectHttpOptionsAndBody = selectHttpOptionsAndBody;
|
|
590
|
+
exports.selectHttpOptionsAndBodyInternal = selectHttpOptionsAndBodyInternal;
|
|
591
|
+
exports.selectURI = selectURI;
|
|
592
|
+
exports.serializeFetchParameter = serializeFetchParameter;
|
|
593
|
+
//# sourceMappingURL=http.cjs.map
|