@apollo/client 3.8.1 → 3.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apollo-client.cjs +708 -575
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/cache/cache.cjs +253 -191
- package/cache/cache.cjs.map +1 -1
- package/cache/cache.cjs.native.js +253 -191
- package/cache/core/cache.d.ts +4 -4
- package/cache/core/cache.d.ts.map +1 -1
- package/cache/core/cache.js +10 -7
- package/cache/core/cache.js.map +1 -1
- package/cache/core/types/Cache.d.ts +3 -3
- package/cache/core/types/Cache.d.ts.map +1 -1
- package/cache/core/types/Cache.js +0 -1
- package/cache/core/types/Cache.js.map +1 -1
- package/cache/core/types/DataProxy.d.ts +6 -6
- package/cache/core/types/DataProxy.d.ts.map +1 -1
- package/cache/core/types/DataProxy.js.map +1 -1
- package/cache/core/types/common.d.ts +3 -3
- package/cache/core/types/common.d.ts.map +1 -1
- package/cache/core/types/common.js.map +1 -1
- package/cache/index.d.ts +20 -20
- package/cache/index.d.ts.map +1 -1
- package/cache/index.js +13 -13
- package/cache/index.js.map +1 -1
- package/cache/inmemory/entityStore.d.ts +6 -6
- package/cache/inmemory/entityStore.d.ts.map +1 -1
- package/cache/inmemory/entityStore.js +38 -30
- package/cache/inmemory/entityStore.js.map +1 -1
- package/cache/inmemory/fixPolyfills.native.d.ts.map +1 -1
- package/cache/inmemory/fixPolyfills.native.js +10 -9
- package/cache/inmemory/fixPolyfills.native.js.map +1 -1
- package/cache/inmemory/fragmentRegistry.d.ts.map +1 -1
- package/cache/inmemory/fragmentRegistry.js +6 -4
- package/cache/inmemory/fragmentRegistry.js.map +1 -1
- package/cache/inmemory/helpers.d.ts +6 -6
- package/cache/inmemory/helpers.d.ts.map +1 -1
- package/cache/inmemory/helpers.js +16 -14
- package/cache/inmemory/helpers.js.map +1 -1
- package/cache/inmemory/inMemoryCache.d.ts +9 -9
- package/cache/inmemory/inMemoryCache.d.ts.map +1 -1
- package/cache/inmemory/inMemoryCache.js +29 -33
- package/cache/inmemory/inMemoryCache.js.map +1 -1
- package/cache/inmemory/key-extractor.d.ts.map +1 -1
- package/cache/inmemory/key-extractor.js +55 -49
- package/cache/inmemory/key-extractor.js.map +1 -1
- package/cache/inmemory/object-canon.d.ts.map +1 -1
- package/cache/inmemory/object-canon.js +5 -5
- package/cache/inmemory/object-canon.js.map +1 -1
- package/cache/inmemory/policies.d.ts +6 -6
- package/cache/inmemory/policies.d.ts.map +1 -1
- package/cache/inmemory/policies.js +74 -45
- package/cache/inmemory/policies.js.map +1 -1
- package/cache/inmemory/reactiveVars.d.ts +1 -1
- package/cache/inmemory/reactiveVars.d.ts.map +1 -1
- package/cache/inmemory/reactiveVars.js +5 -5
- package/cache/inmemory/reactiveVars.js.map +1 -1
- package/cache/inmemory/readFromStore.d.ts +7 -7
- package/cache/inmemory/readFromStore.d.ts.map +1 -1
- package/cache/inmemory/readFromStore.js +21 -17
- package/cache/inmemory/readFromStore.js.map +1 -1
- package/cache/inmemory/types.d.ts +7 -7
- package/cache/inmemory/types.d.ts.map +1 -1
- package/cache/inmemory/types.js +0 -2
- package/cache/inmemory/types.js.map +1 -1
- package/cache/inmemory/writeToStore.d.ts +7 -7
- package/cache/inmemory/writeToStore.d.ts.map +1 -1
- package/cache/inmemory/writeToStore.js +40 -30
- package/cache/inmemory/writeToStore.js.map +1 -1
- package/config/jest/setup.d.ts +2 -2
- package/config/jest/setup.js +5 -5
- package/config/jest/setup.js.map +1 -1
- package/core/ApolloClient.d.ts +12 -11
- package/core/ApolloClient.d.ts.map +1 -1
- package/core/ApolloClient.js +75 -57
- package/core/ApolloClient.js.map +1 -1
- package/core/LocalState.d.ts +6 -6
- package/core/LocalState.d.ts.map +1 -1
- package/core/LocalState.js +17 -16
- package/core/LocalState.js.map +1 -1
- package/core/ObservableQuery.d.ts +12 -10
- package/core/ObservableQuery.d.ts.map +1 -1
- package/core/ObservableQuery.js +57 -38
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryInfo.d.ts +11 -11
- package/core/QueryInfo.d.ts.map +1 -1
- package/core/QueryInfo.js +28 -34
- package/core/QueryInfo.js.map +1 -1
- package/core/QueryManager.d.ts +10 -10
- package/core/QueryManager.d.ts.map +1 -1
- package/core/QueryManager.js +117 -93
- package/core/QueryManager.js.map +1 -1
- package/core/core.cjs +266 -206
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +266 -206
- package/core/networkStatus.js.map +1 -1
- package/core/types.d.ts +13 -13
- package/core/types.d.ts.map +1 -1
- package/core/types.js +0 -1
- package/core/types.js.map +1 -1
- package/core/watchQueryOptions.d.ts +11 -11
- package/core/watchQueryOptions.d.ts.map +1 -1
- package/core/watchQueryOptions.js.map +1 -1
- package/dev/dev.cjs +44 -40
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +44 -40
- package/errors/errors.cjs +7 -5
- package/errors/errors.cjs.map +1 -1
- package/errors/errors.cjs.native.js +7 -5
- package/errors/index.d.ts +4 -4
- package/errors/index.d.ts.map +1 -1
- package/errors/index.js +9 -7
- package/errors/index.js.map +1 -1
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/index.js.map +1 -1
- package/invariantErrorCodes.d.ts.map +1 -1
- package/invariantErrorCodes.js +36 -36
- package/invariantErrorCodes.js.map +1 -1
- package/link/batch/batch.cjs +4 -4
- package/link/batch/batch.cjs.map +1 -1
- package/link/batch/batch.cjs.native.js +4 -4
- package/link/batch/batchLink.d.ts +6 -6
- package/link/batch/batchLink.d.ts.map +1 -1
- package/link/batch/batchLink.js +4 -4
- package/link/batch/batchLink.js.map +1 -1
- package/link/batch/batching.d.ts +2 -2
- package/link/batch/batching.d.ts.map +1 -1
- package/link/batch/batching.js +4 -4
- 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/batch-http.cjs +13 -11
- package/link/batch-http/batch-http.cjs.map +1 -1
- package/link/batch-http/batch-http.cjs.native.js +13 -11
- package/link/batch-http/batchHttpLink.d.ts +6 -6
- package/link/batch-http/batchHttpLink.d.ts.map +1 -1
- package/link/batch-http/batchHttpLink.js +17 -15
- 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/context/context.cjs.map +1 -1
- package/link/context/index.d.ts +3 -3
- package/link/context/index.js +2 -2
- package/link/context/index.js.map +1 -1
- package/link/core/ApolloLink.d.ts +3 -3
- package/link/core/ApolloLink.js +4 -4
- package/link/core/ApolloLink.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/core.cjs +1 -1
- package/link/core/core.cjs.map +1 -1
- package/link/core/core.cjs.native.js +1 -1
- package/link/core/empty.d.ts +1 -1
- package/link/core/empty.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/index.d.ts +8 -8
- package/link/core/index.js +8 -8
- package/link/core/index.js.map +1 -1
- package/link/core/split.d.ts +1 -1
- package/link/core/split.js +1 -1
- package/link/core/split.js.map +1 -1
- package/link/core/types.js.map +1 -1
- package/link/error/error.cjs.map +1 -1
- package/link/error/index.d.ts +5 -5
- package/link/error/index.js +2 -2
- package/link/error/index.js.map +1 -1
- package/link/http/HttpLink.d.ts +3 -3
- package/link/http/HttpLink.js +2 -2
- package/link/http/HttpLink.js.map +1 -1
- package/link/http/checkFetcher.d.ts +1 -1
- package/link/http/checkFetcher.d.ts.map +1 -1
- package/link/http/checkFetcher.js +2 -2
- package/link/http/checkFetcher.js.map +1 -1
- package/link/http/createHttpLink.d.ts +2 -2
- package/link/http/createHttpLink.d.ts.map +1 -1
- package/link/http/createHttpLink.js +27 -26
- package/link/http/createHttpLink.js.map +1 -1
- package/link/http/createSignalIfSupported.js +1 -1
- package/link/http/createSignalIfSupported.js.map +1 -1
- package/link/http/http.cjs +39 -35
- package/link/http/http.cjs.map +1 -1
- package/link/http/http.cjs.native.js +39 -35
- package/link/http/index.d.ts +13 -13
- package/link/http/index.js +10 -10
- package/link/http/index.js.map +1 -1
- package/link/http/iterators/nodeStream.d.ts.map +1 -1
- package/link/http/iterators/nodeStream.js.map +1 -1
- package/link/http/parseAndCheckHttpResponse.d.ts.map +1 -1
- package/link/http/parseAndCheckHttpResponse.js +2 -2
- package/link/http/parseAndCheckHttpResponse.js.map +1 -1
- package/link/http/rewriteURIForGET.d.ts +1 -1
- package/link/http/rewriteURIForGET.js +12 -12
- package/link/http/rewriteURIForGET.js.map +1 -1
- package/link/http/selectHttpOptionsAndBody.d.ts +5 -5
- package/link/http/selectHttpOptionsAndBody.d.ts.map +1 -1
- package/link/http/selectHttpOptionsAndBody.js +8 -7
- package/link/http/selectHttpOptionsAndBody.js.map +1 -1
- package/link/http/selectURI.d.ts +1 -1
- package/link/http/selectURI.js +2 -2
- package/link/http/selectURI.js.map +1 -1
- package/link/http/serializeFetchParameter.d.ts +1 -1
- package/link/http/serializeFetchParameter.js +1 -1
- package/link/http/serializeFetchParameter.js.map +1 -1
- package/link/persisted-queries/index.d.ts +4 -4
- package/link/persisted-queries/index.d.ts.map +1 -1
- package/link/persisted-queries/index.js +26 -25
- package/link/persisted-queries/index.js.map +1 -1
- package/link/persisted-queries/persisted-queries.cjs +22 -17
- package/link/persisted-queries/persisted-queries.cjs.map +1 -1
- package/link/persisted-queries/persisted-queries.cjs.native.js +22 -17
- package/link/retry/delayFunction.d.ts +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/retry.cjs +2 -2
- package/link/retry/retry.cjs.map +1 -1
- package/link/retry/retry.cjs.native.js +2 -2
- package/link/retry/retryFunction.d.ts +1 -1
- package/link/retry/retryFunction.js.map +1 -1
- package/link/retry/retryLink.d.ts +5 -5
- package/link/retry/retryLink.d.ts.map +1 -1
- package/link/retry/retryLink.js +6 -6
- package/link/retry/retryLink.js.map +1 -1
- package/link/schema/index.d.ts +4 -4
- package/link/schema/index.d.ts.map +1 -1
- package/link/schema/index.js +13 -8
- package/link/schema/index.js.map +1 -1
- package/link/schema/schema.cjs +10 -5
- package/link/schema/schema.cjs.map +1 -1
- package/link/schema/schema.cjs.native.js +10 -5
- package/link/subscriptions/index.js +1 -1
- package/link/subscriptions/index.js.map +1 -1
- package/link/subscriptions/subscriptions.cjs.map +1 -1
- package/link/utils/createOperation.d.ts +1 -1
- package/link/utils/createOperation.js +3 -3
- package/link/utils/createOperation.js.map +1 -1
- package/link/utils/filterOperationVariables.d.ts +1 -1
- package/link/utils/filterOperationVariables.js +2 -2
- package/link/utils/filterOperationVariables.js.map +1 -1
- package/link/utils/fromError.d.ts +1 -1
- package/link/utils/fromError.js +1 -1
- package/link/utils/fromError.js.map +1 -1
- package/link/utils/fromPromise.d.ts +1 -1
- package/link/utils/fromPromise.js +1 -1
- package/link/utils/fromPromise.js.map +1 -1
- package/link/utils/index.d.ts +10 -10
- package/link/utils/index.js +9 -9
- package/link/utils/index.js.map +1 -1
- package/link/utils/throwServerError.js +1 -1
- package/link/utils/throwServerError.js.map +1 -1
- package/link/utils/toPromise.d.ts +1 -1
- package/link/utils/toPromise.js +1 -1
- package/link/utils/toPromise.js.map +1 -1
- package/link/utils/transformOperation.d.ts +1 -1
- package/link/utils/transformOperation.js +3 -3
- package/link/utils/transformOperation.js.map +1 -1
- package/link/utils/utils.cjs +12 -12
- package/link/utils/utils.cjs.map +1 -1
- package/link/utils/utils.cjs.native.js +12 -12
- package/link/utils/validateOperation.d.ts +1 -1
- package/link/utils/validateOperation.js +6 -6
- package/link/utils/validateOperation.js.map +1 -1
- package/link/ws/index.d.ts +5 -5
- package/link/ws/index.js +2 -2
- package/link/ws/index.js.map +1 -1
- package/link/ws/ws.cjs.map +1 -1
- package/package.json +22 -22
- package/react/cache/QueryReference.d.ts +1 -1
- package/react/cache/QueryReference.d.ts.map +1 -1
- package/react/cache/QueryReference.js +2 -0
- package/react/cache/QueryReference.js.map +1 -1
- package/react/hooks/constants.js +1 -1
- package/react/hooks/constants.js.map +1 -1
- package/react/hooks/hooks.cjs +10 -21
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/hooks.cjs.native.js +10 -21
- package/react/hooks/useBackgroundQuery.d.ts +1 -1
- package/react/hooks/useBackgroundQuery.d.ts.map +1 -1
- package/react/hooks/useBackgroundQuery.js.map +1 -1
- package/react/hooks/useQuery.d.ts.map +1 -1
- package/react/hooks/useQuery.js +1 -8
- package/react/hooks/useQuery.js.map +1 -1
- package/react/hooks/useReactiveVar.d.ts.map +1 -1
- package/react/hooks/useReactiveVar.js +7 -12
- package/react/hooks/useReactiveVar.js.map +1 -1
- package/react/hooks/useReadQuery.d.ts +1 -1
- package/react/hooks/useReadQuery.d.ts.map +1 -1
- package/react/hooks/useReadQuery.js +1 -1
- package/react/hooks/useReadQuery.js.map +1 -1
- package/react/hooks/useSuspenseQuery.d.ts +1 -1
- package/react/hooks/useSuspenseQuery.d.ts.map +1 -1
- package/react/hooks/useSuspenseQuery.js.map +1 -1
- package/react/react.cjs +2 -0
- package/react/react.cjs.map +1 -1
- package/react/react.cjs.native.js +2 -0
- package/react/types/types.js.map +1 -1
- package/testing/core/core.cjs +37 -28
- package/testing/core/core.cjs.map +1 -1
- package/testing/core/core.cjs.native.js +37 -28
- package/testing/core/itAsync.d.ts.map +1 -1
- package/testing/core/itAsync.js +8 -4
- package/testing/core/itAsync.js.map +1 -1
- package/testing/core/mocking/mockClient.d.ts +3 -3
- package/testing/core/mocking/mockClient.d.ts.map +1 -1
- package/testing/core/mocking/mockClient.js +6 -4
- package/testing/core/mocking/mockClient.js.map +1 -1
- package/testing/core/mocking/mockFetch.d.ts +1 -1
- package/testing/core/mocking/mockFetch.d.ts.map +1 -1
- package/testing/core/mocking/mockFetch.js +3 -3
- package/testing/core/mocking/mockFetch.js.map +1 -1
- package/testing/core/mocking/mockLink.d.ts +3 -3
- package/testing/core/mocking/mockLink.d.ts.map +1 -1
- package/testing/core/mocking/mockLink.js +24 -23
- package/testing/core/mocking/mockLink.js.map +1 -1
- package/testing/core/mocking/mockQueryManager.d.ts +2 -2
- package/testing/core/mocking/mockQueryManager.js +3 -3
- package/testing/core/mocking/mockQueryManager.js.map +1 -1
- package/testing/core/mocking/mockSubscriptionLink.d.ts +3 -3
- package/testing/core/mocking/mockSubscriptionLink.js +4 -4
- package/testing/core/mocking/mockSubscriptionLink.js.map +1 -1
- package/testing/core/mocking/mockWatchQuery.d.ts +2 -2
- package/testing/core/mocking/mockWatchQuery.js +2 -2
- package/testing/core/mocking/mockWatchQuery.js.map +1 -1
- package/testing/core/observableToPromise.d.ts +3 -3
- package/testing/core/observableToPromise.d.ts.map +1 -1
- package/testing/core/observableToPromise.js +8 -4
- package/testing/core/observableToPromise.js.map +1 -1
- package/testing/core/subscribeAndCount.d.ts +1 -1
- package/testing/core/subscribeAndCount.d.ts.map +1 -1
- package/testing/core/subscribeAndCount.js +5 -3
- package/testing/core/subscribeAndCount.js.map +1 -1
- package/testing/core/wait.js.map +1 -1
- package/testing/core/withConsoleSpy.d.ts.map +1 -1
- package/testing/core/withConsoleSpy.js.map +1 -1
- package/testing/core/wrap.d.ts.map +1 -1
- package/testing/core/wrap.js +14 -12
- package/testing/core/wrap.js.map +1 -1
- package/testing/index.d.ts +4 -4
- package/testing/index.js +3 -3
- package/testing/index.js.map +1 -1
- package/testing/react/MockedProvider.d.ts +7 -7
- package/testing/react/MockedProvider.d.ts.map +1 -1
- package/testing/react/MockedProvider.js +10 -11
- package/testing/react/MockedProvider.js.map +1 -1
- package/testing/testing.cjs +3 -5
- package/testing/testing.cjs.map +1 -1
- package/testing/testing.cjs.native.js +3 -5
- package/utilities/common/canUse.d.ts.map +1 -1
- package/utilities/common/canUse.js +4 -5
- package/utilities/common/canUse.js.map +1 -1
- package/utilities/common/cloneDeep.js +2 -2
- package/utilities/common/cloneDeep.js.map +1 -1
- package/utilities/common/compact.d.ts +1 -1
- package/utilities/common/compact.js.map +1 -1
- package/utilities/common/filterInPlace.js.map +1 -1
- package/utilities/common/maybeDeepFreeze.js +1 -1
- package/utilities/common/maybeDeepFreeze.js.map +1 -1
- package/utilities/common/mergeDeep.d.ts.map +1 -1
- package/utilities/common/mergeDeep.js +3 -1
- package/utilities/common/mergeDeep.js.map +1 -1
- package/utilities/common/mergeOptions.d.ts.map +1 -1
- package/utilities/common/mergeOptions.js.map +1 -1
- package/utilities/common/objects.js +2 -2
- package/utilities/common/objects.js.map +1 -1
- package/utilities/common/stringifyForDisplay.d.ts.map +1 -1
- package/utilities/common/stringifyForDisplay.js +3 -1
- package/utilities/common/stringifyForDisplay.js.map +1 -1
- package/utilities/globals/global.d.ts.map +1 -1
- package/utilities/globals/global.js +3 -1
- package/utilities/globals/global.js.map +1 -1
- package/utilities/globals/globals.cjs +8 -4
- package/utilities/globals/globals.cjs.map +1 -1
- package/utilities/globals/globals.cjs.native.js +8 -4
- package/utilities/globals/index.d.ts.map +1 -1
- package/utilities/globals/index.js +1 -1
- package/utilities/globals/index.js.map +1 -1
- package/utilities/globals/invariantWrappers.js +1 -1
- package/utilities/globals/invariantWrappers.js.map +1 -1
- package/utilities/globals/maybe.d.ts.map +1 -1
- package/utilities/globals/maybe.js.map +1 -1
- package/utilities/graphql/directives.d.ts +1 -1
- package/utilities/graphql/directives.d.ts.map +1 -1
- package/utilities/graphql/directives.js +17 -13
- package/utilities/graphql/directives.js.map +1 -1
- package/utilities/graphql/fragments.d.ts +1 -1
- package/utilities/graphql/fragments.d.ts.map +1 -1
- package/utilities/graphql/fragments.js +12 -12
- package/utilities/graphql/fragments.js.map +1 -1
- package/utilities/graphql/getFromAST.d.ts +1 -1
- package/utilities/graphql/getFromAST.js +16 -16
- package/utilities/graphql/getFromAST.js.map +1 -1
- package/utilities/graphql/storeUtils.d.ts +2 -2
- package/utilities/graphql/storeUtils.d.ts.map +1 -1
- package/utilities/graphql/storeUtils.js +36 -34
- package/utilities/graphql/storeUtils.js.map +1 -1
- package/utilities/graphql/transform.d.ts +1 -1
- package/utilities/graphql/transform.d.ts.map +1 -1
- package/utilities/graphql/transform.js +48 -32
- package/utilities/graphql/transform.js.map +1 -1
- package/utilities/observables/Concast.d.ts.map +1 -1
- package/utilities/observables/Concast.js +5 -9
- package/utilities/observables/Concast.js.map +1 -1
- package/utilities/observables/Observable.d.ts +4 -4
- package/utilities/observables/Observable.d.ts.map +1 -1
- package/utilities/observables/Observable.js +6 -4
- package/utilities/observables/Observable.js.map +1 -1
- package/utilities/observables/asyncMap.d.ts.map +1 -1
- package/utilities/observables/asyncMap.js +5 -2
- package/utilities/observables/asyncMap.js.map +1 -1
- package/utilities/observables/iteration.js.map +1 -1
- package/utilities/policies/pagination.d.ts +1 -1
- package/utilities/policies/pagination.d.ts.map +1 -1
- package/utilities/policies/pagination.js +9 -7
- package/utilities/policies/pagination.js.map +1 -1
- package/utilities/types/IsStrictlyAny.d.ts +2 -2
- package/utilities/types/IsStrictlyAny.d.ts.map +1 -1
- package/utilities/types/IsStrictlyAny.js.map +1 -1
- package/utilities/utilities.cjs +147 -121
- package/utilities/utilities.cjs.map +1 -1
- package/utilities/utilities.cjs.native.js +147 -121
- package/version.js +1 -1
- package/version.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fromError.js","sourceRoot":"","sources":["../../../src/link/utils/fromError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,MAAM,UAAU,SAAS,CAAI,UAAe;IAC1C,OAAO,IAAI,UAAU,CAAI,
|
|
1
|
+
{"version":3,"file":"fromError.js","sourceRoot":"","sources":["../../../src/link/utils/fromError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,MAAM,UAAU,SAAS,CAAI,UAAe;IAC1C,OAAO,IAAI,UAAU,CAAI,UAAC,QAAQ;QAChC,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { Observable } from \"../../utilities/index.js\";\n\nexport function fromError<T>(errorValue: any): Observable<T> {\n return new Observable<T>((observer) => {\n observer.error(errorValue);\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fromPromise.js","sourceRoot":"","sources":["../../../src/link/utils/fromPromise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,MAAM,UAAU,WAAW,CAAI,OAAmB;IAChD,OAAO,IAAI,UAAU,CAAI,
|
|
1
|
+
{"version":3,"file":"fromPromise.js","sourceRoot":"","sources":["../../../src/link/utils/fromPromise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,MAAM,UAAU,WAAW,CAAI,OAAmB;IAChD,OAAO,IAAI,UAAU,CAAI,UAAC,QAAQ;QAChC,OAAO;aACJ,IAAI,CAAC,UAAC,KAAQ;YACb,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACrB,QAAQ,CAAC,QAAQ,EAAE,CAAC;QACtB,CAAC,CAAC;aACD,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { Observable } from \"../../utilities/index.js\";\n\nexport function fromPromise<T>(promise: Promise<T>): Observable<T> {\n return new Observable<T>((observer) => {\n promise\n .then((value: T) => {\n observer.next(value);\n observer.complete();\n })\n .catch(observer.error.bind(observer));\n });\n}\n"]}
|
package/link/utils/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { fromError } from
|
|
3
|
-
export { toPromise } from
|
|
4
|
-
export { fromPromise } from
|
|
5
|
-
export type { ServerError } from
|
|
6
|
-
export { throwServerError } from
|
|
7
|
-
export { validateOperation } from
|
|
8
|
-
export { createOperation } from
|
|
9
|
-
export { transformOperation } from
|
|
10
|
-
export { filterOperationVariables } from
|
|
1
|
+
import "../../utilities/globals/index.js";
|
|
2
|
+
export { fromError } from "./fromError.js";
|
|
3
|
+
export { toPromise } from "./toPromise.js";
|
|
4
|
+
export { fromPromise } from "./fromPromise.js";
|
|
5
|
+
export type { ServerError } from "./throwServerError.js";
|
|
6
|
+
export { throwServerError } from "./throwServerError.js";
|
|
7
|
+
export { validateOperation } from "./validateOperation.js";
|
|
8
|
+
export { createOperation } from "./createOperation.js";
|
|
9
|
+
export { transformOperation } from "./transformOperation.js";
|
|
10
|
+
export { filterOperationVariables } from "./filterOperationVariables.js";
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
package/link/utils/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { fromError } from
|
|
3
|
-
export { toPromise } from
|
|
4
|
-
export { fromPromise } from
|
|
5
|
-
export { throwServerError } from
|
|
6
|
-
export { validateOperation } from
|
|
7
|
-
export { createOperation } from
|
|
8
|
-
export { transformOperation } from
|
|
9
|
-
export { filterOperationVariables } from
|
|
1
|
+
import "../../utilities/globals/index.js";
|
|
2
|
+
export { fromError } from "./fromError.js";
|
|
3
|
+
export { toPromise } from "./toPromise.js";
|
|
4
|
+
export { fromPromise } from "./fromPromise.js";
|
|
5
|
+
export { throwServerError } from "./throwServerError.js";
|
|
6
|
+
export { validateOperation } from "./validateOperation.js";
|
|
7
|
+
export { createOperation } from "./createOperation.js";
|
|
8
|
+
export { transformOperation } from "./transformOperation.js";
|
|
9
|
+
export { filterOperationVariables } from "./filterOperationVariables.js";
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
package/link/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/link/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC","sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/link/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC","sourcesContent":["import \"../../utilities/globals/index.js\";\n\nexport { fromError } from \"./fromError.js\";\nexport { toPromise } from \"./toPromise.js\";\nexport { fromPromise } from \"./fromPromise.js\";\nexport type { ServerError } from \"./throwServerError.js\";\nexport { throwServerError } from \"./throwServerError.js\";\nexport { validateOperation } from \"./validateOperation.js\";\nexport { createOperation } from \"./createOperation.js\";\nexport { transformOperation } from \"./transformOperation.js\";\nexport { filterOperationVariables } from \"./filterOperationVariables.js\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"throwServerError.js","sourceRoot":"","sources":["../../../src/link/utils/throwServerError.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAC9B,QAAkB,EAClB,MAAW,EACX,OAAe;IAEf,IAAM,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,CAAgB,CAAC;IAChD,KAAK,CAAC,IAAI,GAAG,aAAa,CAAC;IAC3B,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC1B,KAAK,CAAC,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC;IACnC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;IACtB,MAAM,KAAK,CAAC;AACd,CAAC,CAAC","sourcesContent":["export type ServerError = Error & {\n response: Response;\n result: Record<string, any> | string;\n statusCode: number;\n};\n\nexport const throwServerError = (\n response: Response,\n result: any,\n message: string\n) => {\n const error = new Error(message) as ServerError;\n error.name =
|
|
1
|
+
{"version":3,"file":"throwServerError.js","sourceRoot":"","sources":["../../../src/link/utils/throwServerError.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAC9B,QAAkB,EAClB,MAAW,EACX,OAAe;IAEf,IAAM,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,CAAgB,CAAC;IAChD,KAAK,CAAC,IAAI,GAAG,aAAa,CAAC;IAC3B,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC1B,KAAK,CAAC,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC;IACnC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;IACtB,MAAM,KAAK,CAAC;AACd,CAAC,CAAC","sourcesContent":["export type ServerError = Error & {\n response: Response;\n result: Record<string, any> | string;\n statusCode: number;\n};\n\nexport const throwServerError = (\n response: Response,\n result: any,\n message: string\n) => {\n const error = new Error(message) as ServerError;\n error.name = \"ServerError\";\n error.response = response;\n error.statusCode = response.status;\n error.result = result;\n throw error;\n};\n"]}
|
package/link/utils/toPromise.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toPromise.js","sourceRoot":"","sources":["../../../src/link/utils/toPromise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAG7D,MAAM,UAAU,SAAS,CAAI,UAAyB;IACpD,IAAI,SAAS,GAAG,KAAK,CAAC;IACtB,OAAO,IAAI,OAAO,CAAI,UAAC,OAAO,EAAE,MAAM;QACpC,UAAU,CAAC,SAAS,CAAC;YACnB,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"toPromise.js","sourceRoot":"","sources":["../../../src/link/utils/toPromise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAG7D,MAAM,UAAU,SAAS,CAAI,UAAyB;IACpD,IAAI,SAAS,GAAG,KAAK,CAAC;IACtB,OAAO,IAAI,OAAO,CAAI,UAAC,OAAO,EAAE,MAAM;QACpC,UAAU,CAAC,SAAS,CAAC;YACnB,IAAI,EAAE,UAAC,IAAI;gBACT,IAAI,SAAS,EAAE;oBACb,SAAS,CAAC,IAAI,CACZ,mEAAmE,CACpE,CAAC;iBACH;qBAAM;oBACL,SAAS,GAAG,IAAI,CAAC;oBACjB,OAAO,CAAC,IAAI,CAAC,CAAC;iBACf;YACH,CAAC;YACD,KAAK,EAAE,MAAM;SACd,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { invariant } from \"../../utilities/globals/index.js\";\nimport type { Observable } from \"../../utilities/index.js\";\n\nexport function toPromise<R>(observable: Observable<R>): Promise<R> {\n let completed = false;\n return new Promise<R>((resolve, reject) => {\n observable.subscribe({\n next: (data) => {\n if (completed) {\n invariant.warn(\n `Promise Wrapper does not support multiple results from Observable`\n );\n } else {\n completed = true;\n resolve(data);\n }\n },\n error: reject,\n });\n });\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getOperationName } from
|
|
1
|
+
import { getOperationName } from "../../utilities/index.js";
|
|
2
2
|
export function transformOperation(operation) {
|
|
3
3
|
var transformedOperation = {
|
|
4
4
|
variables: operation.variables || {},
|
|
@@ -8,9 +8,9 @@ export function transformOperation(operation) {
|
|
|
8
8
|
};
|
|
9
9
|
if (!transformedOperation.operationName) {
|
|
10
10
|
transformedOperation.operationName =
|
|
11
|
-
typeof transformedOperation.query !==
|
|
11
|
+
typeof transformedOperation.query !== "string"
|
|
12
12
|
? getOperationName(transformedOperation.query) || undefined
|
|
13
|
-
:
|
|
13
|
+
: "";
|
|
14
14
|
}
|
|
15
15
|
return transformedOperation;
|
|
16
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformOperation.js","sourceRoot":"","sources":["../../../src/link/utils/transformOperation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,MAAM,UAAU,kBAAkB,CAAC,SAAyB;IAC1D,IAAM,oBAAoB,GAAmB;QAC3C,SAAS,EAAE,SAAS,CAAC,SAAS,IAAI,EAAE;QACpC,UAAU,EAAE,SAAS,CAAC,UAAU,IAAI,EAAE;QACtC,aAAa,EAAE,SAAS,CAAC,aAAa;QACtC,KAAK,EAAE,SAAS,CAAC,KAAK;KACvB,CAAC;IAGF,IAAI,CAAC,oBAAoB,CAAC,aAAa,EAAE;QACvC,oBAAoB,CAAC,aAAa;YAChC,OAAO,oBAAoB,CAAC,KAAK,KAAK,QAAQ;gBAC5C,CAAC,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,KAAK,CAAC,IAAI,SAAS;gBAC3D,CAAC,CAAC,EAAE,CAAC;KACV;IAED,OAAO,oBAAiC,CAAC;AAC3C,CAAC","sourcesContent":["import type { GraphQLRequest, Operation } from
|
|
1
|
+
{"version":3,"file":"transformOperation.js","sourceRoot":"","sources":["../../../src/link/utils/transformOperation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,MAAM,UAAU,kBAAkB,CAAC,SAAyB;IAC1D,IAAM,oBAAoB,GAAmB;QAC3C,SAAS,EAAE,SAAS,CAAC,SAAS,IAAI,EAAE;QACpC,UAAU,EAAE,SAAS,CAAC,UAAU,IAAI,EAAE;QACtC,aAAa,EAAE,SAAS,CAAC,aAAa;QACtC,KAAK,EAAE,SAAS,CAAC,KAAK;KACvB,CAAC;IAGF,IAAI,CAAC,oBAAoB,CAAC,aAAa,EAAE;QACvC,oBAAoB,CAAC,aAAa;YAChC,OAAO,oBAAoB,CAAC,KAAK,KAAK,QAAQ;gBAC5C,CAAC,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,KAAK,CAAC,IAAI,SAAS;gBAC3D,CAAC,CAAC,EAAE,CAAC;KACV;IAED,OAAO,oBAAiC,CAAC;AAC3C,CAAC","sourcesContent":["import type { GraphQLRequest, Operation } from \"../core/index.js\";\nimport { getOperationName } from \"../../utilities/index.js\";\n\nexport function transformOperation(operation: GraphQLRequest): GraphQLRequest {\n const transformedOperation: GraphQLRequest = {\n variables: operation.variables || {},\n extensions: operation.extensions || {},\n operationName: operation.operationName,\n query: operation.query,\n };\n\n // Best guess at an operation name\n if (!transformedOperation.operationName) {\n transformedOperation.operationName =\n typeof transformedOperation.query !== \"string\"\n ? getOperationName(transformedOperation.query) || undefined\n : \"\";\n }\n\n return transformedOperation as Operation;\n}\n"]}
|
package/link/utils/utils.cjs
CHANGED
|
@@ -44,7 +44,7 @@ function fromPromise(promise) {
|
|
|
44
44
|
|
|
45
45
|
var throwServerError = function (response, result, message) {
|
|
46
46
|
var error = new Error(message);
|
|
47
|
-
error.name =
|
|
47
|
+
error.name = "ServerError";
|
|
48
48
|
error.response = response;
|
|
49
49
|
error.statusCode = response.status;
|
|
50
50
|
error.result = result;
|
|
@@ -53,11 +53,11 @@ var throwServerError = function (response, result, message) {
|
|
|
53
53
|
|
|
54
54
|
function validateOperation(operation) {
|
|
55
55
|
var OPERATION_FIELDS = [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
"query",
|
|
57
|
+
"operationName",
|
|
58
|
+
"variables",
|
|
59
|
+
"extensions",
|
|
60
|
+
"context",
|
|
61
61
|
];
|
|
62
62
|
for (var _i = 0, _a = Object.keys(operation); _i < _a.length; _i++) {
|
|
63
63
|
var key = _a[_i];
|
|
@@ -71,7 +71,7 @@ function validateOperation(operation) {
|
|
|
71
71
|
function createOperation(starting, operation) {
|
|
72
72
|
var context = tslib.__assign({}, starting);
|
|
73
73
|
var setContext = function (next) {
|
|
74
|
-
if (typeof next ===
|
|
74
|
+
if (typeof next === "function") {
|
|
75
75
|
context = tslib.__assign(tslib.__assign({}, context), next(context));
|
|
76
76
|
}
|
|
77
77
|
else {
|
|
@@ -79,11 +79,11 @@ function createOperation(starting, operation) {
|
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
var getContext = function () { return (tslib.__assign({}, context)); };
|
|
82
|
-
Object.defineProperty(operation,
|
|
82
|
+
Object.defineProperty(operation, "setContext", {
|
|
83
83
|
enumerable: false,
|
|
84
84
|
value: setContext,
|
|
85
85
|
});
|
|
86
|
-
Object.defineProperty(operation,
|
|
86
|
+
Object.defineProperty(operation, "getContext", {
|
|
87
87
|
enumerable: false,
|
|
88
88
|
value: getContext,
|
|
89
89
|
});
|
|
@@ -99,9 +99,9 @@ function transformOperation(operation) {
|
|
|
99
99
|
};
|
|
100
100
|
if (!transformedOperation.operationName) {
|
|
101
101
|
transformedOperation.operationName =
|
|
102
|
-
typeof transformedOperation.query !==
|
|
102
|
+
typeof transformedOperation.query !== "string"
|
|
103
103
|
? utilities.getOperationName(transformedOperation.query) || undefined
|
|
104
|
-
:
|
|
104
|
+
: "";
|
|
105
105
|
}
|
|
106
106
|
return transformedOperation;
|
|
107
107
|
}
|
|
@@ -112,7 +112,7 @@ function filterOperationVariables(variables, query) {
|
|
|
112
112
|
graphql.visit(query, {
|
|
113
113
|
Variable: function (node, _key, parent) {
|
|
114
114
|
if (parent &&
|
|
115
|
-
parent.kind !==
|
|
115
|
+
parent.kind !== "VariableDefinition") {
|
|
116
116
|
unusedNames.delete(node.name.value);
|
|
117
117
|
}
|
|
118
118
|
},
|
package/link/utils/utils.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.cjs","sources":["fromError.js","toPromise.js","fromPromise.js","throwServerError.js","validateOperation.js","createOperation.js","transformOperation.js","filterOperationVariables.js"],"sourcesContent":["import { Observable } from
|
|
1
|
+
{"version":3,"file":"utils.cjs","sources":["fromError.js","toPromise.js","fromPromise.js","throwServerError.js","validateOperation.js","createOperation.js","transformOperation.js","filterOperationVariables.js"],"sourcesContent":["import { Observable } from \"../../utilities/index.js\";\nexport function fromError(errorValue) {\n return new Observable(function (observer) {\n observer.error(errorValue);\n });\n}\n//# sourceMappingURL=fromError.js.map","import { invariant } from \"../../utilities/globals/index.js\";\nexport function toPromise(observable) {\n var completed = false;\n return new Promise(function (resolve, reject) {\n observable.subscribe({\n next: function (data) {\n if (completed) {\n globalThis.__DEV__ !== false && invariant.warn(40);\n }\n else {\n completed = true;\n resolve(data);\n }\n },\n error: reject,\n });\n });\n}\n//# sourceMappingURL=toPromise.js.map","import { Observable } from \"../../utilities/index.js\";\nexport function fromPromise(promise) {\n return new Observable(function (observer) {\n promise\n .then(function (value) {\n observer.next(value);\n observer.complete();\n })\n .catch(observer.error.bind(observer));\n });\n}\n//# sourceMappingURL=fromPromise.js.map","export var throwServerError = function (response, result, message) {\n var error = new Error(message);\n error.name = \"ServerError\";\n error.response = response;\n error.statusCode = response.status;\n error.result = result;\n throw error;\n};\n//# sourceMappingURL=throwServerError.js.map","import { newInvariantError } from \"../../utilities/globals/index.js\";\nexport function validateOperation(operation) {\n var OPERATION_FIELDS = [\n \"query\",\n \"operationName\",\n \"variables\",\n \"extensions\",\n \"context\",\n ];\n for (var _i = 0, _a = Object.keys(operation); _i < _a.length; _i++) {\n var key = _a[_i];\n if (OPERATION_FIELDS.indexOf(key) < 0) {\n throw newInvariantError(41, key);\n }\n }\n return operation;\n}\n//# sourceMappingURL=validateOperation.js.map","import { __assign } from \"tslib\";\nexport function createOperation(starting, operation) {\n var context = __assign({}, starting);\n var setContext = function (next) {\n if (typeof next === \"function\") {\n context = __assign(__assign({}, context), next(context));\n }\n else {\n context = __assign(__assign({}, context), next);\n }\n };\n var getContext = function () { return (__assign({}, context)); };\n Object.defineProperty(operation, \"setContext\", {\n enumerable: false,\n value: setContext,\n });\n Object.defineProperty(operation, \"getContext\", {\n enumerable: false,\n value: getContext,\n });\n return operation;\n}\n//# sourceMappingURL=createOperation.js.map","import { getOperationName } from \"../../utilities/index.js\";\nexport function transformOperation(operation) {\n var transformedOperation = {\n variables: operation.variables || {},\n extensions: operation.extensions || {},\n operationName: operation.operationName,\n query: operation.query,\n };\n if (!transformedOperation.operationName) {\n transformedOperation.operationName =\n typeof transformedOperation.query !== \"string\"\n ? getOperationName(transformedOperation.query) || undefined\n : \"\";\n }\n return transformedOperation;\n}\n//# sourceMappingURL=transformOperation.js.map","import { __assign } from \"tslib\";\nimport { visit } from \"graphql\";\nexport function filterOperationVariables(variables, query) {\n var result = __assign({}, variables);\n var unusedNames = new Set(Object.keys(variables));\n visit(query, {\n Variable: function (node, _key, parent) {\n if (parent &&\n parent.kind !== \"VariableDefinition\") {\n unusedNames.delete(node.name.value);\n }\n },\n });\n unusedNames.forEach(function (name) {\n delete result[name];\n });\n return result;\n}\n//# sourceMappingURL=filterOperationVariables.js.map"],"names":["Observable","invariant","newInvariantError","__assign","getOperationName","visit"],"mappings":";;;;;;;;;AACO,SAAS,SAAS,CAAC,UAAU,EAAE;AACtC,IAAI,OAAO,IAAIA,oBAAU,CAAC,UAAU,QAAQ,EAAE;AAC9C,QAAQ,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;AACnC,KAAK,CAAC,CAAC;AACP;;ACJO,SAAS,SAAS,CAAC,UAAU,EAAE;AACtC,IAAI,IAAI,SAAS,GAAG,KAAK,CAAC;AAC1B,IAAI,OAAO,IAAI,OAAO,CAAC,UAAU,OAAO,EAAE,MAAM,EAAE;AAClD,QAAQ,UAAU,CAAC,SAAS,CAAC;AAC7B,YAAY,IAAI,EAAE,UAAU,IAAI,EAAE;AAClC,gBAAgB,IAAI,SAAS,EAAE;AAC/B,oBAAoB,UAAU,CAAC,OAAO,KAAK,KAAK,IAAIC,iBAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvE,iBAAiB;AACjB,qBAAqB;AACrB,oBAAoB,SAAS,GAAG,IAAI,CAAC;AACrC,oBAAoB,OAAO,CAAC,IAAI,CAAC,CAAC;AAClC,iBAAiB;AACjB,aAAa;AACb,YAAY,KAAK,EAAE,MAAM;AACzB,SAAS,CAAC,CAAC;AACX,KAAK,CAAC,CAAC;AACP;;AChBO,SAAS,WAAW,CAAC,OAAO,EAAE;AACrC,IAAI,OAAO,IAAID,oBAAU,CAAC,UAAU,QAAQ,EAAE;AAC9C,QAAQ,OAAO;AACf,aAAa,IAAI,CAAC,UAAU,KAAK,EAAE;AACnC,YAAY,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACjC,YAAY,QAAQ,CAAC,QAAQ,EAAE,CAAC;AAChC,SAAS,CAAC;AACV,aAAa,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;AAClD,KAAK,CAAC,CAAC;AACP;;ACVU,IA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AAoB,CAAC;AAChC;;ACbO,SAAS,wBAAwB,CAAC,SAAS,EAAE,KAAK,EAAE;AAC3D,IAAI,IAAI,MAAM,GAAGD,cAAQ,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;AACzC,IAAI,IAAI,WAAW,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;AACtD,IAAIE,aAAK,CAAC,KAAK,EAAE;AACjB,QAAQ,QAAQ,EAAE,UAAU,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE;AAChD,YAAY,IAAI,MAAM;AACtB,gBAAgB,MAAM,CAAC,IAAI,KAAK,oBAAoB,EAAE;AACtD,gBAAgB,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACpD,aAAa;AACb,SAAS;AACT,KAAK,CAAC,CAAC;AACP,IAAI,WAAW,CAAC,OAAO,CAAC,UAAU,IAAI,EAAE;AACxC,QAAQ,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;AAC5B,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,MAAM,CAAC;AAClB;;;;;;;;;;;"}
|
|
@@ -44,7 +44,7 @@ function fromPromise(promise) {
|
|
|
44
44
|
|
|
45
45
|
var throwServerError = function (response, result, message) {
|
|
46
46
|
var error = new Error(message);
|
|
47
|
-
error.name =
|
|
47
|
+
error.name = "ServerError";
|
|
48
48
|
error.response = response;
|
|
49
49
|
error.statusCode = response.status;
|
|
50
50
|
error.result = result;
|
|
@@ -53,11 +53,11 @@ var throwServerError = function (response, result, message) {
|
|
|
53
53
|
|
|
54
54
|
function validateOperation(operation) {
|
|
55
55
|
var OPERATION_FIELDS = [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
"query",
|
|
57
|
+
"operationName",
|
|
58
|
+
"variables",
|
|
59
|
+
"extensions",
|
|
60
|
+
"context",
|
|
61
61
|
];
|
|
62
62
|
for (var _i = 0, _a = Object.keys(operation); _i < _a.length; _i++) {
|
|
63
63
|
var key = _a[_i];
|
|
@@ -71,7 +71,7 @@ function validateOperation(operation) {
|
|
|
71
71
|
function createOperation(starting, operation) {
|
|
72
72
|
var context = tslib.__assign({}, starting);
|
|
73
73
|
var setContext = function (next) {
|
|
74
|
-
if (typeof next ===
|
|
74
|
+
if (typeof next === "function") {
|
|
75
75
|
context = tslib.__assign(tslib.__assign({}, context), next(context));
|
|
76
76
|
}
|
|
77
77
|
else {
|
|
@@ -79,11 +79,11 @@ function createOperation(starting, operation) {
|
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
var getContext = function () { return (tslib.__assign({}, context)); };
|
|
82
|
-
Object.defineProperty(operation,
|
|
82
|
+
Object.defineProperty(operation, "setContext", {
|
|
83
83
|
enumerable: false,
|
|
84
84
|
value: setContext,
|
|
85
85
|
});
|
|
86
|
-
Object.defineProperty(operation,
|
|
86
|
+
Object.defineProperty(operation, "getContext", {
|
|
87
87
|
enumerable: false,
|
|
88
88
|
value: getContext,
|
|
89
89
|
});
|
|
@@ -99,9 +99,9 @@ function transformOperation(operation) {
|
|
|
99
99
|
};
|
|
100
100
|
if (!transformedOperation.operationName) {
|
|
101
101
|
transformedOperation.operationName =
|
|
102
|
-
typeof transformedOperation.query !==
|
|
102
|
+
typeof transformedOperation.query !== "string"
|
|
103
103
|
? utilities.getOperationName(transformedOperation.query) || undefined
|
|
104
|
-
:
|
|
104
|
+
: "";
|
|
105
105
|
}
|
|
106
106
|
return transformedOperation;
|
|
107
107
|
}
|
|
@@ -112,7 +112,7 @@ function filterOperationVariables(variables, query) {
|
|
|
112
112
|
graphql.visit(query, {
|
|
113
113
|
Variable: function (node, _key, parent) {
|
|
114
114
|
if (parent &&
|
|
115
|
-
parent.kind !==
|
|
115
|
+
parent.kind !== "VariableDefinition") {
|
|
116
116
|
unusedNames.delete(node.name.value);
|
|
117
117
|
}
|
|
118
118
|
},
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { newInvariantError } from
|
|
1
|
+
import { newInvariantError } from "../../utilities/globals/index.js";
|
|
2
2
|
export function validateOperation(operation) {
|
|
3
3
|
var OPERATION_FIELDS = [
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
"query",
|
|
5
|
+
"operationName",
|
|
6
|
+
"variables",
|
|
7
|
+
"extensions",
|
|
8
|
+
"context",
|
|
9
9
|
];
|
|
10
10
|
for (var _i = 0, _a = Object.keys(operation); _i < _a.length; _i++) {
|
|
11
11
|
var key = _a[_i];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateOperation.js","sourceRoot":"","sources":["../../../src/link/utils/validateOperation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,
|
|
1
|
+
{"version":3,"file":"validateOperation.js","sourceRoot":"","sources":["../../../src/link/utils/validateOperation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAGrE,MAAM,UAAU,iBAAiB,CAAC,SAAyB;IACzD,IAAM,gBAAgB,GAAG;QACvB,OAAO;QACP,eAAe;QACf,WAAW;QACX,YAAY;QACZ,SAAS;KACV,CAAC;IACF,KAAgB,UAAsB,EAAtB,KAAA,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,EAAtB,cAAsB,EAAtB,IAAsB,EAAE;QAAnC,IAAI,GAAG,SAAA;QACV,IAAI,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YACrC,MAAM,iBAAiB,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC;SACtD;KACF;IAED,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import { newInvariantError } from \"../../utilities/globals/index.js\";\nimport type { GraphQLRequest } from \"../core/index.js\";\n\nexport function validateOperation(operation: GraphQLRequest): GraphQLRequest {\n const OPERATION_FIELDS = [\n \"query\",\n \"operationName\",\n \"variables\",\n \"extensions\",\n \"context\",\n ];\n for (let key of Object.keys(operation)) {\n if (OPERATION_FIELDS.indexOf(key) < 0) {\n throw newInvariantError(`illegal argument: %s`, key);\n }\n }\n\n return operation;\n}\n"]}
|
package/link/ws/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ClientOptions } from
|
|
2
|
-
import { SubscriptionClient } from
|
|
3
|
-
import type { Operation, FetchResult } from
|
|
4
|
-
import { ApolloLink } from
|
|
5
|
-
import type { Observable } from
|
|
1
|
+
import type { ClientOptions } from "subscriptions-transport-ws";
|
|
2
|
+
import { SubscriptionClient } from "subscriptions-transport-ws";
|
|
3
|
+
import type { Operation, FetchResult } from "../core/index.js";
|
|
4
|
+
import { ApolloLink } from "../core/index.js";
|
|
5
|
+
import type { Observable } from "../../utilities/index.js";
|
|
6
6
|
export declare namespace WebSocketLink {
|
|
7
7
|
interface Configuration {
|
|
8
8
|
uri: string;
|
package/link/ws/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __extends } from "tslib";
|
|
2
|
-
import { SubscriptionClient } from
|
|
3
|
-
import { ApolloLink } from
|
|
2
|
+
import { SubscriptionClient } from "subscriptions-transport-ws";
|
|
3
|
+
import { ApolloLink } from "../core/index.js";
|
|
4
4
|
var WebSocketLink = (function (_super) {
|
|
5
5
|
__extends(WebSocketLink, _super);
|
|
6
6
|
function WebSocketLink(paramsOrClient) {
|
package/link/ws/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/link/ws/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AA4B9C;IAAmC,iCAAU;IAG3C,uBACE,cAAgE;QADlE,YAGE,iBAAO,SAWR;QATC,IAAI,cAAc,YAAY,kBAAkB,EAAE;YAChD,KAAI,CAAC,kBAAkB,GAAG,cAAc,CAAC;SAC1C;aAAM;YACL,KAAI,CAAC,kBAAkB,GAAG,IAAI,kBAAkB,CAC9C,cAAc,CAAC,GAAG,EAClB,cAAc,CAAC,OAAO,EACtB,cAAc,CAAC,aAAa,CAC7B,CAAC;SACH;;IACH,CAAC;IAEM,+BAAO,GAAd,UAAe,SAAoB;QACjC,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/link/ws/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AA4B9C;IAAmC,iCAAU;IAG3C,uBACE,cAAgE;QADlE,YAGE,iBAAO,SAWR;QATC,IAAI,cAAc,YAAY,kBAAkB,EAAE;YAChD,KAAI,CAAC,kBAAkB,GAAG,cAAc,CAAC;SAC1C;aAAM;YACL,KAAI,CAAC,kBAAkB,GAAG,IAAI,kBAAkB,CAC9C,cAAc,CAAC,GAAG,EAClB,cAAc,CAAC,OAAO,EACtB,cAAc,CAAC,aAAa,CAC7B,CAAC;SACH;;IACH,CAAC;IAEM,+BAAO,GAAd,UAAe,SAAoB;QACjC,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CACpC,SAAS,CACiB,CAAC;IAC/B,CAAC;IACH,oBAAC;AAAD,CAAC,AAxBD,CAAmC,UAAU,GAwB5C","sourcesContent":["import type { ClientOptions } from \"subscriptions-transport-ws\";\nimport { SubscriptionClient } from \"subscriptions-transport-ws\";\n\nimport type { Operation, FetchResult } from \"../core/index.js\";\nimport { ApolloLink } from \"../core/index.js\";\nimport type { Observable } from \"../../utilities/index.js\";\n\nexport namespace WebSocketLink {\n /**\n * Configuration to use when constructing the subscription client (subscriptions-transport-ws).\n */\n export interface Configuration {\n /**\n * The endpoint to connect to.\n */\n uri: string;\n\n /**\n * Options to pass when constructing the subscription client.\n */\n options?: ClientOptions;\n\n /**\n * A custom WebSocket implementation to use.\n */\n webSocketImpl?: any;\n }\n}\n\n// For backwards compatibility.\nexport import WebSocketParams = WebSocketLink.Configuration;\n\nexport class WebSocketLink extends ApolloLink {\n private subscriptionClient: SubscriptionClient;\n\n constructor(\n paramsOrClient: WebSocketLink.Configuration | SubscriptionClient\n ) {\n super();\n\n if (paramsOrClient instanceof SubscriptionClient) {\n this.subscriptionClient = paramsOrClient;\n } else {\n this.subscriptionClient = new SubscriptionClient(\n paramsOrClient.uri,\n paramsOrClient.options,\n paramsOrClient.webSocketImpl\n );\n }\n }\n\n public request(operation: Operation): Observable<FetchResult> | null {\n return this.subscriptionClient.request(\n operation\n ) as Observable<FetchResult>;\n }\n}\n"]}
|
package/link/ws/ws.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws.cjs","sources":["index.js"],"sourcesContent":["import { __extends } from \"tslib\";\nimport { SubscriptionClient } from
|
|
1
|
+
{"version":3,"file":"ws.cjs","sources":["index.js"],"sourcesContent":["import { __extends } from \"tslib\";\nimport { SubscriptionClient } from \"subscriptions-transport-ws\";\nimport { ApolloLink } from \"../core/index.js\";\nvar WebSocketLink = (function (_super) {\n __extends(WebSocketLink, _super);\n function WebSocketLink(paramsOrClient) {\n var _this = _super.call(this) || this;\n if (paramsOrClient instanceof SubscriptionClient) {\n _this.subscriptionClient = paramsOrClient;\n }\n else {\n _this.subscriptionClient = new SubscriptionClient(paramsOrClient.uri, paramsOrClient.options, paramsOrClient.webSocketImpl);\n }\n return _this;\n }\n WebSocketLink.prototype.request = function (operation) {\n return this.subscriptionClient.request(operation);\n };\n return WebSocketLink;\n}(ApolloLink));\nexport { WebSocketLink };\n//# sourceMappingURL=index.js.map"],"names":["__extends","SubscriptionClient","ApolloLink"],"mappings":";;;;;;;;AAGG,IAAC,aAAa,IAAI,UAAU,MAAM,EAAE;AACvC,IAAIA,eAAS,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;AACrC,IAAI,SAAS,aAAa,CAAC,cAAc,EAAE;AAC3C,QAAQ,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;AAC9C,QAAQ,IAAI,cAAc,YAAYC,2CAAkB,EAAE;AAC1D,YAAY,KAAK,CAAC,kBAAkB,GAAG,cAAc,CAAC;AACtD,SAAS;AACT,aAAa;AACb,YAAY,KAAK,CAAC,kBAAkB,GAAG,IAAIA,2CAAkB,CAAC,cAAc,CAAC,GAAG,EAAE,cAAc,CAAC,OAAO,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;AACxI,SAAS;AACT,QAAQ,OAAO,KAAK,CAAC;AACrB,KAAK;AACL,IAAI,aAAa,CAAC,SAAS,CAAC,OAAO,GAAG,UAAU,SAAS,EAAE;AAC3D,QAAQ,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAC1D,KAAK,CAAC;AACN,IAAI,OAAO,aAAa,CAAC;AACzB,CAAC,CAACC,eAAU,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apollo/client",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.3",
|
|
4
4
|
"description": "A fully-featured caching GraphQL client.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"keywords": [
|
|
@@ -66,15 +66,15 @@
|
|
|
66
66
|
"zen-observable-ts": "^1.2.5"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@arethetypeswrong/cli": "0.
|
|
70
|
-
"@babel/parser": "7.22.
|
|
69
|
+
"@arethetypeswrong/cli": "0.9.0",
|
|
70
|
+
"@babel/parser": "7.22.11",
|
|
71
71
|
"@changesets/changelog-github": "0.4.8",
|
|
72
72
|
"@changesets/cli": "2.26.2",
|
|
73
73
|
"@graphql-tools/schema": "10.0.0",
|
|
74
74
|
"@rollup/plugin-node-resolve": "11.2.1",
|
|
75
75
|
"@size-limit/esbuild-why": "8.2.6",
|
|
76
76
|
"@size-limit/preset-small-lib": "8.2.6",
|
|
77
|
-
"@testing-library/jest-dom": "5.
|
|
77
|
+
"@testing-library/jest-dom": "5.17.0",
|
|
78
78
|
"@testing-library/react": "14.0.0",
|
|
79
79
|
"@testing-library/react-12": "npm:@testing-library/react@^12",
|
|
80
80
|
"@testing-library/user-event": "14.4.3",
|
|
@@ -82,40 +82,40 @@
|
|
|
82
82
|
"@types/fetch-mock": "7.3.5",
|
|
83
83
|
"@types/glob": "8.1.0",
|
|
84
84
|
"@types/hoist-non-react-statics": "3.3.1",
|
|
85
|
-
"@types/jest": "29.5.
|
|
86
|
-
"@types/lodash": "4.14.
|
|
87
|
-
"@types/node": "20.
|
|
85
|
+
"@types/jest": "29.5.4",
|
|
86
|
+
"@types/lodash": "4.14.197",
|
|
87
|
+
"@types/node": "20.5.7",
|
|
88
88
|
"@types/node-fetch": "2.6.4",
|
|
89
|
-
"@types/react": "18.2.
|
|
89
|
+
"@types/react": "18.2.21",
|
|
90
90
|
"@types/react-dom": "18.2.7",
|
|
91
91
|
"@types/use-sync-external-store": "0.0.3",
|
|
92
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
93
|
-
"@typescript-eslint/parser": "5.
|
|
92
|
+
"@typescript-eslint/eslint-plugin": "5.62.0",
|
|
93
|
+
"@typescript-eslint/parser": "5.62.0",
|
|
94
94
|
"acorn": "8.10.0",
|
|
95
95
|
"blob-polyfill": "7.0.20220408",
|
|
96
96
|
"bytes": "3.1.2",
|
|
97
97
|
"cross-fetch": "3.1.8",
|
|
98
|
-
"eslint": "8.
|
|
99
|
-
"eslint-import-resolver-typescript": "3.
|
|
100
|
-
"eslint-plugin-import": "npm:@phryneas/eslint-plugin-import
|
|
98
|
+
"eslint": "8.48.0",
|
|
99
|
+
"eslint-import-resolver-typescript": "3.6.0",
|
|
100
|
+
"eslint-plugin-import": "npm:@phryneas/eslint-plugin-import@2.27.5-pr.2813.2817.199971c",
|
|
101
101
|
"eslint-plugin-testing-library": "5.11.1",
|
|
102
|
-
"expect-type": "0.
|
|
102
|
+
"expect-type": "0.16.0",
|
|
103
103
|
"fetch-mock": "9.11.0",
|
|
104
104
|
"glob": "8.1.0",
|
|
105
|
-
"graphql": "16.
|
|
105
|
+
"graphql": "16.8.0",
|
|
106
106
|
"graphql-ws": "5.14.0",
|
|
107
|
-
"jest": "29.6.
|
|
108
|
-
"jest-environment-jsdom": "29.6.
|
|
107
|
+
"jest": "29.6.4",
|
|
108
|
+
"jest-environment-jsdom": "29.6.4",
|
|
109
109
|
"jest-junit": "16.0.0",
|
|
110
110
|
"lodash": "4.17.21",
|
|
111
111
|
"patch-package": "7.0.2",
|
|
112
|
-
"prettier": "
|
|
112
|
+
"prettier": "3.0.2",
|
|
113
113
|
"react": "18.2.0",
|
|
114
114
|
"react-17": "npm:react@^17",
|
|
115
115
|
"react-dom": "18.2.0",
|
|
116
116
|
"react-dom-17": "npm:react-dom@^17",
|
|
117
117
|
"react-error-boundary": "3.1.4",
|
|
118
|
-
"recast": "0.23.
|
|
118
|
+
"recast": "0.23.4",
|
|
119
119
|
"resolve": "1.22.4",
|
|
120
120
|
"rimraf": "5.0.1",
|
|
121
121
|
"rollup": "2.79.1",
|
|
@@ -123,12 +123,12 @@
|
|
|
123
123
|
"rxjs": "7.8.1",
|
|
124
124
|
"size-limit": "8.2.6",
|
|
125
125
|
"subscriptions-transport-ws": "0.11.0",
|
|
126
|
-
"terser": "5.
|
|
126
|
+
"terser": "5.19.2",
|
|
127
127
|
"ts-jest": "29.1.1",
|
|
128
128
|
"ts-jest-resolver": "2.0.1",
|
|
129
129
|
"ts-node": "10.9.1",
|
|
130
|
-
"typedoc": "0.
|
|
131
|
-
"typescript": "5.
|
|
130
|
+
"typedoc": "0.25.0",
|
|
131
|
+
"typescript": "5.2.2",
|
|
132
132
|
"wait-for-observables": "1.0.3",
|
|
133
133
|
"web-streams-polyfill": "3.2.1",
|
|
134
134
|
"whatwg-fetch": "3.6.17"
|
|
@@ -14,7 +14,7 @@ interface InternalQueryReferenceOptions {
|
|
|
14
14
|
export declare function wrapQueryRef<TData>(internalQueryRef: InternalQueryReference<TData>): QueryReference<TData>;
|
|
15
15
|
export declare function unwrapQueryRef<TData>(queryRef: QueryReference<TData>): InternalQueryReference<TData>;
|
|
16
16
|
declare const OBSERVED_CHANGED_OPTIONS: readonly ["canonizeResults", "context", "errorPolicy", "fetchPolicy", "refetchWritePolicy", "returnPartialData"];
|
|
17
|
-
type ObservedOptions = Pick<WatchQueryOptions, typeof OBSERVED_CHANGED_OPTIONS[number]>;
|
|
17
|
+
type ObservedOptions = Pick<WatchQueryOptions, (typeof OBSERVED_CHANGED_OPTIONS)[number]>;
|
|
18
18
|
export declare class InternalQueryReference<TData = unknown> {
|
|
19
19
|
result: ApolloQueryResult<TData>;
|
|
20
20
|
readonly key: CacheKey;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryReference.d.ts","sourceRoot":"","sources":["../../../src/react/cache/QueryReference.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,qBAAqB,CAAC;AAO7B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG3C,KAAK,QAAQ,CAAC,KAAK,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC;AAE5E,KAAK,gBAAgB,CAAC,KAAK,IAAI,UAAU,CACvC,eAAe,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,CACpC,CAAC,CAAC,CAAC,CAAC;AAEL,QAAA,MAAM,sBAAsB,EAAE,OAAO,MAAiB,CAAC;AAMvD,MAAM,WAAW,cAAc,CAAC,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MAAM;IAsBN,gBAAgB,CAAC,iBAAiB,EAAE,eAAe;IAOnD,YAAY,CAAC,iBAAiB,EAAE,eAAe;IAyB/C,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC;IAQhC,OAAO,CAAC,SAAS,EAAE,kBAAkB,GAAG,SAAS;IAIjD,SAAS,CAAC,OAAO,EAAE,gBAAgB,CAAC,KAAK,CAAC;IAI1C,OAAO,CAAC,OAAO;IAKf,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,UAAU;IAmClB,OAAO,CAAC,WAAW;IAoBnB,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,aAAa;CA2BtB"}
|
|
@@ -150,6 +150,8 @@ var InternalQueryReference = (function () {
|
|
|
150
150
|
};
|
|
151
151
|
InternalQueryReference.prototype.handleError = function (error) {
|
|
152
152
|
var _a;
|
|
153
|
+
this.subscription.unsubscribe();
|
|
154
|
+
this.subscription = this.observable.resubscribeAfterError(this.handleNext, this.handleError);
|
|
153
155
|
switch (this.status) {
|
|
154
156
|
case "loading": {
|
|
155
157
|
this.status = "idle";
|