@apollo/client 3.8.0-beta.5 → 3.8.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apollo-client.cjs +282 -242
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/cache/cache.cjs +12 -12
- package/cache/cache.cjs.map +1 -1
- package/cache/cache.cjs.native.js +12 -12
- package/cache/core/cache.d.ts +3 -3
- package/cache/core/cache.d.ts.map +1 -1
- package/cache/core/cache.js +1 -1
- package/cache/core/cache.js.map +1 -1
- package/cache/core/types/Cache.d.ts +3 -3
- package/cache/core/types/Cache.d.ts.map +1 -1
- package/cache/core/types/Cache.js.map +1 -1
- package/cache/core/types/DataProxy.d.ts +2 -2
- package/cache/core/types/DataProxy.d.ts.map +1 -1
- package/cache/core/types/DataProxy.js.map +1 -1
- package/cache/core/types/common.d.ts +2 -2
- package/cache/core/types/common.d.ts.map +1 -1
- package/cache/core/types/common.js.map +1 -1
- package/cache/index.d.ts +14 -14
- package/cache/index.d.ts.map +1 -1
- package/cache/index.js +13 -13
- package/cache/index.js.map +1 -1
- package/cache/inmemory/entityStore.d.ts +5 -5
- package/cache/inmemory/entityStore.d.ts.map +1 -1
- package/cache/inmemory/entityStore.js +3 -3
- package/cache/inmemory/entityStore.js.map +1 -1
- package/cache/inmemory/fragmentRegistry.js.map +1 -1
- package/cache/inmemory/helpers.d.ts +5 -5
- package/cache/inmemory/helpers.d.ts.map +1 -1
- package/cache/inmemory/helpers.js +1 -1
- package/cache/inmemory/helpers.js.map +1 -1
- package/cache/inmemory/inMemoryCache.d.ts +8 -8
- package/cache/inmemory/inMemoryCache.d.ts.map +1 -1
- package/cache/inmemory/inMemoryCache.js +13 -13
- package/cache/inmemory/inMemoryCache.js.map +1 -1
- package/cache/inmemory/key-extractor.d.ts +1 -1
- package/cache/inmemory/key-extractor.d.ts.map +1 -1
- package/cache/inmemory/key-extractor.js.map +1 -1
- package/cache/inmemory/object-canon.d.ts.map +1 -1
- package/cache/inmemory/object-canon.js +2 -3
- package/cache/inmemory/object-canon.js.map +1 -1
- package/cache/inmemory/policies.d.ts +6 -6
- package/cache/inmemory/policies.d.ts.map +1 -1
- package/cache/inmemory/policies.js +9 -9
- package/cache/inmemory/policies.js.map +1 -1
- package/cache/inmemory/reactiveVars.d.ts +1 -1
- package/cache/inmemory/reactiveVars.d.ts.map +1 -1
- package/cache/inmemory/reactiveVars.js.map +1 -1
- package/cache/inmemory/readFromStore.d.ts +6 -6
- package/cache/inmemory/readFromStore.d.ts.map +1 -1
- package/cache/inmemory/readFromStore.js +7 -7
- package/cache/inmemory/readFromStore.js.map +1 -1
- package/cache/inmemory/types.d.ts +6 -6
- package/cache/inmemory/types.d.ts.map +1 -1
- package/cache/inmemory/types.js.map +1 -1
- package/cache/inmemory/writeToStore.d.ts +6 -6
- package/cache/inmemory/writeToStore.d.ts.map +1 -1
- package/cache/inmemory/writeToStore.js +10 -10
- package/cache/inmemory/writeToStore.js.map +1 -1
- package/config/jest/setup.d.ts +1 -1
- package/config/jest/setup.d.ts.map +1 -1
- package/config/jest/setup.js +2 -2
- package/config/jest/setup.js.map +1 -1
- package/core/ApolloClient.d.ts +10 -10
- package/core/ApolloClient.d.ts.map +1 -1
- package/core/ApolloClient.js +12 -11
- package/core/ApolloClient.js.map +1 -1
- package/core/LocalState.d.ts +5 -5
- package/core/LocalState.d.ts.map +1 -1
- package/core/LocalState.js +5 -5
- package/core/LocalState.js.map +1 -1
- package/core/ObservableQuery.d.ts +11 -10
- package/core/ObservableQuery.d.ts.map +1 -1
- package/core/ObservableQuery.js +17 -13
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryInfo.d.ts +9 -9
- package/core/QueryInfo.d.ts.map +1 -1
- package/core/QueryInfo.js +4 -4
- package/core/QueryInfo.js.map +1 -1
- package/core/QueryManager.d.ts +12 -12
- package/core/QueryManager.d.ts.map +1 -1
- package/core/QueryManager.js +25 -25
- package/core/QueryManager.js.map +1 -1
- package/core/core.cjs +43 -37
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +43 -37
- package/core/equalByQuery.d.ts +2 -2
- package/core/equalByQuery.d.ts.map +1 -1
- package/core/equalByQuery.js +9 -8
- package/core/equalByQuery.js.map +1 -1
- package/core/index.d.ts +13 -13
- package/core/index.d.ts.map +1 -1
- package/core/index.js +12 -13
- package/core/index.js.map +1 -1
- package/core/types.d.ts +10 -10
- package/core/types.d.ts.map +1 -1
- package/core/types.js.map +1 -1
- package/core/watchQueryOptions.d.ts +4 -4
- package/core/watchQueryOptions.d.ts.map +1 -1
- package/core/watchQueryOptions.js.map +1 -1
- package/dev/dev.cjs +73 -81
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +73 -81
- package/dev/index.d.ts +3 -3
- package/dev/index.d.ts.map +1 -1
- package/dev/index.js +3 -3
- package/dev/index.js.map +1 -1
- package/dev/loadDevMessages.js +2 -2
- package/dev/loadDevMessages.js.map +1 -1
- package/dev/loadErrorMessageHandler.d.ts +1 -1
- package/dev/loadErrorMessageHandler.d.ts.map +1 -1
- package/dev/loadErrorMessageHandler.js +2 -2
- package/dev/loadErrorMessageHandler.js.map +1 -1
- package/dev/loadErrorMessages.js +2 -2
- package/dev/loadErrorMessages.js.map +1 -1
- package/errors/errors.cjs.map +1 -1
- package/errors/index.d.ts +4 -4
- package/errors/index.d.ts.map +1 -1
- package/errors/index.js +2 -2
- package/errors/index.js.map +1 -1
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js +2 -2
- package/index.js.map +1 -1
- package/invariantErrorCodes.js +71 -78
- package/link/batch/batch.cjs.map +1 -1
- package/link/batch/batchLink.d.ts +5 -5
- package/link/batch/batchLink.d.ts.map +1 -1
- package/link/batch/batchLink.js +3 -3
- package/link/batch/batchLink.js.map +1 -1
- package/link/batch/batching.d.ts +2 -2
- package/link/batch/batching.d.ts.map +1 -1
- package/link/batch/batching.js +1 -1
- package/link/batch/batching.js.map +1 -1
- package/link/batch/index.d.ts +1 -1
- package/link/batch/index.d.ts.map +1 -1
- package/link/batch/index.js +1 -1
- package/link/batch/index.js.map +1 -1
- package/link/batch-http/batch-http.cjs.map +1 -1
- package/link/batch-http/batchHttpLink.d.ts +5 -5
- package/link/batch-http/batchHttpLink.d.ts.map +1 -1
- package/link/batch-http/batchHttpLink.js +5 -5
- package/link/batch-http/batchHttpLink.js.map +1 -1
- package/link/batch-http/index.d.ts +1 -1
- package/link/batch-http/index.d.ts.map +1 -1
- package/link/batch-http/index.js +1 -1
- package/link/batch-http/index.js.map +1 -1
- package/link/context/context.cjs.map +1 -1
- package/link/context/index.d.ts +3 -3
- package/link/context/index.d.ts.map +1 -1
- package/link/context/index.js +2 -2
- package/link/context/index.js.map +1 -1
- package/link/core/ApolloLink.d.ts +3 -3
- package/link/core/ApolloLink.d.ts.map +1 -1
- package/link/core/ApolloLink.js +5 -5
- package/link/core/ApolloLink.js.map +1 -1
- package/link/core/concat.d.ts +1 -1
- package/link/core/concat.d.ts.map +1 -1
- package/link/core/concat.js +1 -1
- package/link/core/concat.js.map +1 -1
- package/link/core/core.cjs +2 -2
- package/link/core/core.cjs.map +1 -1
- package/link/core/core.cjs.native.js +2 -2
- package/link/core/empty.d.ts +1 -1
- package/link/core/empty.d.ts.map +1 -1
- package/link/core/empty.js +1 -1
- package/link/core/empty.js.map +1 -1
- package/link/core/execute.d.ts +1 -1
- package/link/core/execute.d.ts.map +1 -1
- package/link/core/execute.js +1 -1
- package/link/core/execute.js.map +1 -1
- package/link/core/from.d.ts +1 -1
- package/link/core/from.d.ts.map +1 -1
- package/link/core/from.js +1 -1
- package/link/core/from.js.map +1 -1
- package/link/core/index.d.ts +8 -8
- package/link/core/index.d.ts.map +1 -1
- package/link/core/index.js +8 -8
- package/link/core/index.js.map +1 -1
- package/link/core/split.d.ts +1 -1
- package/link/core/split.d.ts.map +1 -1
- package/link/core/split.js +1 -1
- package/link/core/split.js.map +1 -1
- package/link/core/types.d.ts +2 -2
- package/link/core/types.d.ts.map +1 -1
- package/link/core/types.js.map +1 -1
- package/link/error/error.cjs.map +1 -1
- package/link/error/index.d.ts +4 -4
- package/link/error/index.d.ts.map +1 -1
- package/link/error/index.js +2 -2
- package/link/error/index.js.map +1 -1
- package/link/http/HttpLink.d.ts +3 -3
- package/link/http/HttpLink.d.ts.map +1 -1
- package/link/http/HttpLink.js +2 -2
- package/link/http/HttpLink.js.map +1 -1
- package/link/http/checkFetcher.js +2 -2
- package/link/http/checkFetcher.js.map +1 -1
- package/link/http/createHttpLink.d.ts +2 -2
- package/link/http/createHttpLink.d.ts.map +1 -1
- package/link/http/createHttpLink.js +14 -14
- package/link/http/createHttpLink.js.map +1 -1
- package/link/http/http.cjs +4 -4
- package/link/http/http.cjs.map +1 -1
- package/link/http/http.cjs.native.js +4 -4
- package/link/http/index.d.ts +10 -10
- package/link/http/index.d.ts.map +1 -1
- package/link/http/index.js +10 -10
- package/link/http/index.js.map +1 -1
- package/link/http/iterators/nodeStream.js.map +1 -1
- package/link/http/iterators/promise.js.map +1 -1
- package/link/http/iterators/reader.js.map +1 -1
- package/link/http/parseAndCheckHttpResponse.d.ts +2 -2
- package/link/http/parseAndCheckHttpResponse.d.ts.map +1 -1
- package/link/http/parseAndCheckHttpResponse.js +2 -2
- package/link/http/parseAndCheckHttpResponse.js.map +1 -1
- package/link/http/responseIterator.js.map +1 -1
- package/link/http/rewriteURIForGET.d.ts +1 -1
- package/link/http/rewriteURIForGET.d.ts.map +1 -1
- package/link/http/rewriteURIForGET.js +1 -1
- package/link/http/rewriteURIForGET.js.map +1 -1
- package/link/http/selectHttpOptionsAndBody.d.ts +2 -2
- package/link/http/selectHttpOptionsAndBody.d.ts.map +1 -1
- package/link/http/selectHttpOptionsAndBody.js +1 -1
- package/link/http/selectHttpOptionsAndBody.js.map +1 -1
- package/link/http/selectURI.d.ts +1 -1
- package/link/http/selectURI.d.ts.map +1 -1
- package/link/http/selectURI.js.map +1 -1
- package/link/http/serializeFetchParameter.d.ts +1 -1
- package/link/http/serializeFetchParameter.d.ts.map +1 -1
- package/link/http/serializeFetchParameter.js +2 -2
- package/link/http/serializeFetchParameter.js.map +1 -1
- package/link/persisted-queries/index.d.ts +3 -3
- package/link/persisted-queries/index.d.ts.map +1 -1
- package/link/persisted-queries/index.js +6 -6
- package/link/persisted-queries/index.js.map +1 -1
- package/link/persisted-queries/persisted-queries.cjs +2 -2
- package/link/persisted-queries/persisted-queries.cjs.map +1 -1
- package/link/persisted-queries/persisted-queries.cjs.native.js +2 -2
- package/link/remove-typename/index.d.ts +1 -1
- package/link/remove-typename/index.d.ts.map +1 -1
- package/link/remove-typename/index.js +1 -1
- package/link/remove-typename/index.js.map +1 -1
- package/link/remove-typename/remove-typename.cjs.map +1 -1
- package/link/remove-typename/removeTypenameFromVariables.d.ts +1 -1
- package/link/remove-typename/removeTypenameFromVariables.d.ts.map +1 -1
- package/link/remove-typename/removeTypenameFromVariables.js +2 -2
- package/link/remove-typename/removeTypenameFromVariables.js.map +1 -1
- package/link/retry/delayFunction.d.ts +1 -1
- package/link/retry/delayFunction.d.ts.map +1 -1
- package/link/retry/delayFunction.js.map +1 -1
- package/link/retry/index.d.ts +1 -1
- package/link/retry/index.d.ts.map +1 -1
- package/link/retry/index.js +1 -1
- package/link/retry/index.js.map +1 -1
- package/link/retry/retry.cjs.map +1 -1
- package/link/retry/retryFunction.d.ts +1 -1
- package/link/retry/retryFunction.d.ts.map +1 -1
- package/link/retry/retryFunction.js.map +1 -1
- package/link/retry/retryLink.d.ts +5 -5
- package/link/retry/retryLink.d.ts.map +1 -1
- package/link/retry/retryLink.js +4 -4
- package/link/retry/retryLink.js.map +1 -1
- package/link/schema/index.d.ts +3 -3
- package/link/schema/index.d.ts.map +1 -1
- package/link/schema/index.js +2 -2
- package/link/schema/index.js.map +1 -1
- package/link/schema/schema.cjs.map +1 -1
- package/link/subscriptions/index.d.ts +3 -3
- package/link/subscriptions/index.d.ts.map +1 -1
- package/link/subscriptions/index.js +1 -1
- package/link/subscriptions/index.js.map +1 -1
- package/link/subscriptions/subscriptions.cjs.map +1 -1
- package/link/utils/createOperation.d.ts +1 -1
- package/link/utils/createOperation.d.ts.map +1 -1
- package/link/utils/createOperation.js.map +1 -1
- package/link/utils/fromError.d.ts +1 -1
- package/link/utils/fromError.d.ts.map +1 -1
- package/link/utils/fromError.js +1 -1
- package/link/utils/fromError.js.map +1 -1
- package/link/utils/fromPromise.d.ts +1 -1
- package/link/utils/fromPromise.d.ts.map +1 -1
- package/link/utils/fromPromise.js +1 -1
- package/link/utils/fromPromise.js.map +1 -1
- package/link/utils/index.d.ts +9 -9
- package/link/utils/index.d.ts.map +1 -1
- package/link/utils/index.js +9 -9
- package/link/utils/index.js.map +1 -1
- package/link/utils/toPromise.d.ts +1 -1
- package/link/utils/toPromise.d.ts.map +1 -1
- package/link/utils/toPromise.js +2 -2
- package/link/utils/toPromise.js.map +1 -1
- package/link/utils/transformOperation.d.ts +1 -1
- package/link/utils/transformOperation.d.ts.map +1 -1
- package/link/utils/transformOperation.js +1 -1
- package/link/utils/transformOperation.js.map +1 -1
- package/link/utils/utils.cjs +2 -2
- package/link/utils/utils.cjs.map +1 -1
- package/link/utils/utils.cjs.native.js +2 -2
- package/link/utils/validateOperation.d.ts +1 -1
- package/link/utils/validateOperation.d.ts.map +1 -1
- package/link/utils/validateOperation.js +2 -2
- package/link/utils/validateOperation.js.map +1 -1
- package/link/ws/index.d.ts +3 -3
- package/link/ws/index.d.ts.map +1 -1
- package/link/ws/index.js +1 -1
- package/link/ws/index.js.map +1 -1
- package/link/ws/ws.cjs.map +1 -1
- package/package.json +18 -14
- package/react/cache/QueryReference.d.ts +9 -6
- package/react/cache/QueryReference.d.ts.map +1 -1
- package/react/cache/QueryReference.js +108 -52
- package/react/cache/QueryReference.js.map +1 -1
- package/react/cache/SuspenseCache.d.ts +3 -3
- package/react/cache/SuspenseCache.d.ts.map +1 -1
- package/react/cache/SuspenseCache.js +2 -2
- package/react/cache/SuspenseCache.js.map +1 -1
- package/react/cache/index.d.ts +1 -1
- package/react/cache/index.d.ts.map +1 -1
- package/react/cache/index.js +1 -1
- package/react/cache/index.js.map +1 -1
- package/react/components/Mutation.d.ts +3 -3
- package/react/components/Mutation.d.ts.map +1 -1
- package/react/components/Mutation.js +1 -1
- package/react/components/Mutation.js.map +1 -1
- package/react/components/Query.d.ts +2 -2
- package/react/components/Query.d.ts.map +1 -1
- package/react/components/Query.js +1 -1
- package/react/components/Query.js.map +1 -1
- package/react/components/Subscription.d.ts +2 -2
- package/react/components/Subscription.d.ts.map +1 -1
- package/react/components/Subscription.js +1 -1
- package/react/components/Subscription.js.map +1 -1
- package/react/components/components.cjs.map +1 -1
- package/react/components/index.d.ts +4 -4
- package/react/components/index.d.ts.map +1 -1
- package/react/components/index.js +4 -4
- package/react/components/index.js.map +1 -1
- package/react/components/types.d.ts +2 -2
- package/react/components/types.d.ts.map +1 -1
- package/react/components/types.js.map +1 -1
- package/react/context/ApolloConsumer.d.ts +1 -1
- package/react/context/ApolloConsumer.d.ts.map +1 -1
- package/react/context/ApolloConsumer.js +3 -3
- package/react/context/ApolloConsumer.js.map +1 -1
- package/react/context/ApolloContext.d.ts +4 -5
- package/react/context/ApolloContext.d.ts.map +1 -1
- package/react/context/ApolloContext.js +12 -5
- package/react/context/ApolloContext.js.map +1 -1
- package/react/context/ApolloProvider.d.ts +2 -2
- package/react/context/ApolloProvider.d.ts.map +1 -1
- package/react/context/ApolloProvider.js +3 -3
- package/react/context/ApolloProvider.js.map +1 -1
- package/react/context/context.cjs +12 -5
- package/react/context/context.cjs.map +1 -1
- package/react/context/context.cjs.native.js +12 -5
- package/react/context/index.d.ts +4 -4
- package/react/context/index.d.ts.map +1 -1
- package/react/context/index.js +4 -4
- package/react/context/index.js.map +1 -1
- package/react/hoc/graphql.d.ts +2 -2
- package/react/hoc/graphql.d.ts.map +1 -1
- package/react/hoc/graphql.js +4 -4
- package/react/hoc/graphql.js.map +1 -1
- package/react/hoc/hoc-utils.d.ts +2 -2
- package/react/hoc/hoc-utils.d.ts.map +1 -1
- package/react/hoc/hoc-utils.js +2 -2
- package/react/hoc/hoc-utils.js.map +1 -1
- package/react/hoc/hoc.cjs +2 -2
- package/react/hoc/hoc.cjs.map +1 -1
- package/react/hoc/hoc.cjs.native.js +2 -2
- package/react/hoc/index.d.ts +7 -7
- package/react/hoc/index.d.ts.map +1 -1
- package/react/hoc/index.js +7 -7
- package/react/hoc/index.js.map +1 -1
- package/react/hoc/mutation-hoc.d.ts +3 -3
- package/react/hoc/mutation-hoc.d.ts.map +1 -1
- package/react/hoc/mutation-hoc.js +3 -3
- package/react/hoc/mutation-hoc.js.map +1 -1
- package/react/hoc/query-hoc.d.ts +1 -1
- package/react/hoc/query-hoc.d.ts.map +1 -1
- package/react/hoc/query-hoc.js +3 -3
- package/react/hoc/query-hoc.js.map +1 -1
- package/react/hoc/subscription-hoc.d.ts +1 -1
- package/react/hoc/subscription-hoc.d.ts.map +1 -1
- package/react/hoc/subscription-hoc.js +3 -3
- package/react/hoc/subscription-hoc.js.map +1 -1
- package/react/hoc/types.d.ts +4 -4
- package/react/hoc/types.d.ts.map +1 -1
- package/react/hoc/types.js.map +1 -1
- package/react/hoc/withApollo.d.ts +1 -1
- package/react/hoc/withApollo.d.ts.map +1 -1
- package/react/hoc/withApollo.js +3 -3
- package/react/hoc/withApollo.js.map +1 -1
- package/react/hooks/hooks.cjs +179 -140
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/hooks.cjs.native.js +179 -140
- package/react/hooks/index.d.ts +11 -11
- package/react/hooks/index.d.ts.map +1 -1
- package/react/hooks/index.js +11 -11
- package/react/hooks/index.js.map +1 -1
- package/react/hooks/internal/__use.js +2 -2
- package/react/hooks/internal/__use.js.map +1 -1
- package/react/hooks/internal/index.d.ts +3 -4
- package/react/hooks/internal/index.d.ts.map +1 -1
- package/react/hooks/internal/index.js +3 -4
- package/react/hooks/internal/index.js.map +1 -1
- package/react/hooks/internal/useDeepMemo.js +2 -2
- package/react/hooks/internal/useDeepMemo.js.map +1 -1
- package/react/hooks/internal/useIsomorphicLayoutEffect.d.ts +2 -2
- package/react/hooks/internal/useIsomorphicLayoutEffect.d.ts.map +1 -1
- package/react/hooks/internal/useIsomorphicLayoutEffect.js +4 -4
- package/react/hooks/internal/useIsomorphicLayoutEffect.js.map +1 -1
- package/react/hooks/useApolloClient.d.ts +1 -1
- package/react/hooks/useApolloClient.d.ts.map +1 -1
- package/react/hooks/useApolloClient.js +5 -5
- package/react/hooks/useApolloClient.js.map +1 -1
- package/react/hooks/useBackgroundQuery.d.ts +5 -5
- package/react/hooks/useBackgroundQuery.d.ts.map +1 -1
- package/react/hooks/useBackgroundQuery.js +16 -17
- package/react/hooks/useBackgroundQuery.js.map +1 -1
- package/react/hooks/useFragment.d.ts +4 -4
- package/react/hooks/useFragment.d.ts.map +1 -1
- package/react/hooks/useFragment.js +2 -2
- package/react/hooks/useFragment.js.map +1 -1
- package/react/hooks/useLazyQuery.d.ts +2 -2
- package/react/hooks/useLazyQuery.d.ts.map +1 -1
- package/react/hooks/useLazyQuery.js +9 -9
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/react/hooks/useMutation.d.ts +2 -2
- package/react/hooks/useMutation.d.ts.map +1 -1
- package/react/hooks/useMutation.js +10 -10
- package/react/hooks/useMutation.js.map +1 -1
- package/react/hooks/useQuery.d.ts +4 -4
- package/react/hooks/useQuery.d.ts.map +1 -1
- package/react/hooks/useQuery.js +17 -17
- package/react/hooks/useQuery.js.map +1 -1
- package/react/hooks/useReactiveVar.d.ts +1 -1
- package/react/hooks/useReactiveVar.d.ts.map +1 -1
- package/react/hooks/useReactiveVar.js +3 -3
- package/react/hooks/useReactiveVar.js.map +1 -1
- package/react/hooks/useReadQuery.d.ts +3 -3
- package/react/hooks/useReadQuery.d.ts.map +1 -1
- package/react/hooks/useReadQuery.js +6 -6
- package/react/hooks/useReadQuery.js.map +1 -1
- package/react/hooks/useSubscription.d.ts +2 -2
- package/react/hooks/useSubscription.d.ts.map +1 -1
- package/react/hooks/useSubscription.js +14 -14
- package/react/hooks/useSubscription.js.map +1 -1
- package/react/hooks/useSuspenseCache.d.ts +1 -1
- package/react/hooks/useSuspenseCache.d.ts.map +1 -1
- package/react/hooks/useSuspenseCache.js +5 -5
- package/react/hooks/useSuspenseCache.js.map +1 -1
- package/react/hooks/useSuspenseQuery.d.ts +4 -6
- package/react/hooks/useSuspenseQuery.d.ts.map +1 -1
- package/react/hooks/useSuspenseQuery.js +30 -34
- package/react/hooks/useSuspenseQuery.js.map +1 -1
- package/react/hooks/useSyncExternalStore.js +4 -4
- package/react/hooks/useSyncExternalStore.js.map +1 -1
- package/react/index.d.ts +6 -6
- package/react/index.d.ts.map +1 -1
- package/react/index.js +6 -6
- package/react/index.js.map +1 -1
- package/react/parser/index.js +6 -6
- package/react/parser/index.js.map +1 -1
- package/react/parser/parser.cjs +5 -5
- package/react/parser/parser.cjs.map +1 -1
- package/react/parser/parser.cjs.native.js +5 -5
- package/react/react.cjs +106 -50
- package/react/react.cjs.map +1 -1
- package/react/react.cjs.native.js +106 -50
- package/react/ssr/RenderPromises.d.ts +2 -2
- package/react/ssr/RenderPromises.d.ts.map +1 -1
- package/react/ssr/RenderPromises.js.map +1 -1
- package/react/ssr/getDataFromTree.js +2 -2
- package/react/ssr/getDataFromTree.js.map +1 -1
- package/react/ssr/index.d.ts +3 -3
- package/react/ssr/index.d.ts.map +1 -1
- package/react/ssr/index.js +3 -3
- package/react/ssr/index.js.map +1 -1
- package/react/ssr/renderToStringWithData.js +1 -1
- package/react/ssr/renderToStringWithData.js.map +1 -1
- package/react/ssr/ssr.cjs.map +1 -1
- package/react/types/types.d.ts +7 -7
- package/react/types/types.d.ts.map +1 -1
- package/react/types/types.js.map +1 -1
- package/testing/core/core.cjs +1 -1
- package/testing/core/core.cjs.map +1 -1
- package/testing/core/core.cjs.native.js +1 -1
- package/testing/core/index.d.ts +7 -7
- package/testing/core/index.d.ts.map +1 -1
- package/testing/core/index.js +7 -7
- package/testing/core/index.js.map +1 -1
- package/testing/core/mocking/mockClient.d.ts +2 -2
- package/testing/core/mocking/mockClient.d.ts.map +1 -1
- package/testing/core/mocking/mockClient.js +3 -3
- package/testing/core/mocking/mockClient.js.map +1 -1
- package/testing/core/mocking/mockLink.d.ts +3 -3
- package/testing/core/mocking/mockLink.d.ts.map +1 -1
- package/testing/core/mocking/mockLink.js +4 -4
- package/testing/core/mocking/mockLink.js.map +1 -1
- package/testing/core/mocking/mockQueryManager.d.ts +3 -3
- package/testing/core/mocking/mockQueryManager.d.ts.map +1 -1
- package/testing/core/mocking/mockQueryManager.js +3 -3
- package/testing/core/mocking/mockQueryManager.js.map +1 -1
- package/testing/core/mocking/mockSubscriptionLink.d.ts +3 -3
- package/testing/core/mocking/mockSubscriptionLink.d.ts.map +1 -1
- package/testing/core/mocking/mockSubscriptionLink.js +2 -2
- package/testing/core/mocking/mockSubscriptionLink.js.map +1 -1
- package/testing/core/mocking/mockWatchQuery.d.ts +2 -2
- package/testing/core/mocking/mockWatchQuery.d.ts.map +1 -1
- package/testing/core/mocking/mockWatchQuery.js +1 -1
- package/testing/core/mocking/mockWatchQuery.js.map +1 -1
- package/testing/core/observableToPromise.d.ts +2 -2
- package/testing/core/observableToPromise.d.ts.map +1 -1
- package/testing/core/observableToPromise.js.map +1 -1
- package/testing/core/subscribeAndCount.d.ts +1 -1
- package/testing/core/subscribeAndCount.d.ts.map +1 -1
- package/testing/core/subscribeAndCount.js +1 -1
- package/testing/core/subscribeAndCount.js.map +1 -1
- package/testing/index.d.ts +3 -3
- package/testing/index.d.ts.map +1 -1
- package/testing/index.js +3 -3
- package/testing/index.js.map +1 -1
- package/testing/matchers/index.js +2 -2
- package/testing/matchers/index.js.map +1 -1
- package/testing/matchers/toHaveSuspenseCacheEntryUsing.d.ts +1 -1
- package/testing/matchers/toHaveSuspenseCacheEntryUsing.d.ts.map +1 -1
- package/testing/matchers/toHaveSuspenseCacheEntryUsing.js +2 -2
- package/testing/matchers/toHaveSuspenseCacheEntryUsing.js.map +1 -1
- package/testing/matchers/toMatchDocument.d.ts +1 -1
- package/testing/matchers/toMatchDocument.d.ts.map +1 -1
- package/testing/matchers/toMatchDocument.js +1 -1
- package/testing/matchers/toMatchDocument.js.map +1 -1
- package/testing/react/MockedProvider.d.ts +7 -7
- package/testing/react/MockedProvider.d.ts.map +1 -1
- package/testing/react/MockedProvider.js +5 -5
- package/testing/react/MockedProvider.js.map +1 -1
- package/testing/testing.cjs.map +1 -1
- package/utilities/common/canUse.js.map +1 -1
- package/utilities/common/compact.d.ts +1 -1
- package/utilities/common/compact.d.ts.map +1 -1
- package/utilities/common/compact.js.map +1 -1
- package/utilities/common/errorHandling.d.ts +1 -1
- package/utilities/common/errorHandling.d.ts.map +1 -1
- package/utilities/common/errorHandling.js.map +1 -1
- package/utilities/common/incrementalResult.d.ts +1 -1
- package/utilities/common/incrementalResult.d.ts.map +1 -1
- package/utilities/common/incrementalResult.js.map +1 -1
- package/utilities/common/maybeDeepFreeze.d.ts.map +1 -1
- package/utilities/common/maybeDeepFreeze.js +3 -4
- package/utilities/common/maybeDeepFreeze.js.map +1 -1
- package/utilities/common/mergeDeep.d.ts +1 -1
- package/utilities/common/mergeDeep.d.ts.map +1 -1
- package/utilities/common/mergeDeep.js.map +1 -1
- package/utilities/common/mergeOptions.d.ts +1 -1
- package/utilities/common/mergeOptions.d.ts.map +1 -1
- package/utilities/common/mergeOptions.js.map +1 -1
- package/utilities/common/omitDeep.d.ts +1 -1
- package/utilities/common/omitDeep.d.ts.map +1 -1
- package/utilities/common/omitDeep.js +1 -1
- package/utilities/common/omitDeep.js.map +1 -1
- package/utilities/common/responseIterator.js.map +1 -1
- package/utilities/common/stringifyForDisplay.js.map +1 -1
- package/utilities/common/stripTypename.d.ts +1 -1
- package/utilities/common/stripTypename.d.ts.map +1 -1
- package/utilities/common/stripTypename.js +1 -1
- package/utilities/common/stripTypename.js.map +1 -1
- package/utilities/globals/global.d.ts.map +1 -1
- package/utilities/globals/global.js.map +1 -1
- package/utilities/globals/globals.cjs +4 -16
- package/utilities/globals/globals.cjs.map +1 -1
- package/utilities/globals/globals.cjs.native.js +4 -16
- package/utilities/globals/index.d.ts +5 -6
- package/utilities/globals/index.d.ts.map +1 -1
- package/utilities/globals/index.js +2 -5
- package/utilities/globals/index.js.map +1 -1
- package/utilities/globals/invariantWrappers.d.ts +1 -1
- package/utilities/globals/invariantWrappers.d.ts.map +1 -1
- package/utilities/globals/invariantWrappers.js +3 -3
- package/utilities/globals/invariantWrappers.js.map +1 -1
- package/utilities/graphql/DocumentTransform.js +4 -4
- package/utilities/graphql/DocumentTransform.js.map +1 -1
- package/utilities/graphql/directives.js +5 -5
- package/utilities/graphql/directives.js.map +1 -1
- package/utilities/graphql/fragments.js +4 -4
- package/utilities/graphql/fragments.js.map +1 -1
- package/utilities/graphql/getFromAST.js +10 -10
- package/utilities/graphql/getFromAST.js.map +1 -1
- package/utilities/graphql/operations.d.ts +1 -1
- package/utilities/graphql/operations.d.ts.map +1 -1
- package/utilities/graphql/operations.js +1 -1
- package/utilities/graphql/operations.js.map +1 -1
- package/utilities/graphql/print.js +1 -1
- package/utilities/graphql/print.js.map +1 -1
- package/utilities/graphql/storeUtils.d.ts +1 -1
- package/utilities/graphql/storeUtils.d.ts.map +1 -1
- package/utilities/graphql/storeUtils.js +4 -4
- package/utilities/graphql/storeUtils.js.map +1 -1
- package/utilities/graphql/transform.js +7 -7
- package/utilities/graphql/transform.js.map +1 -1
- package/utilities/index.d.ts +34 -34
- package/utilities/index.d.ts.map +1 -1
- package/utilities/index.js +32 -32
- package/utilities/index.js.map +1 -1
- package/utilities/observables/Concast.d.ts +2 -2
- package/utilities/observables/Concast.d.ts.map +1 -1
- package/utilities/observables/Concast.js.map +1 -1
- package/utilities/observables/asyncMap.d.ts +1 -1
- package/utilities/observables/asyncMap.d.ts.map +1 -1
- package/utilities/observables/asyncMap.js.map +1 -1
- package/utilities/observables/iteration.d.ts +1 -1
- package/utilities/observables/iteration.d.ts.map +1 -1
- package/utilities/observables/iteration.js.map +1 -1
- package/utilities/observables/subclassing.d.ts +1 -1
- package/utilities/observables/subclassing.d.ts.map +1 -1
- package/utilities/observables/subclassing.js.map +1 -1
- package/utilities/policies/pagination.d.ts +1 -1
- package/utilities/policies/pagination.d.ts.map +1 -1
- package/utilities/policies/pagination.js +1 -1
- package/utilities/policies/pagination.js.map +1 -1
- package/utilities/promises/decoration.d.ts.map +1 -1
- package/utilities/promises/decoration.js +1 -0
- package/utilities/promises/decoration.js.map +1 -1
- package/utilities/types/DeepOmit.d.ts +1 -1
- package/utilities/types/DeepOmit.d.ts.map +1 -1
- package/utilities/types/DeepOmit.js.map +1 -1
- package/utilities/types/DeepPartial.d.ts +1 -1
- package/utilities/types/DeepPartial.d.ts.map +1 -1
- package/utilities/types/DeepPartial.js.map +1 -1
- package/utilities/utilities.cjs +22 -21
- package/utilities/utilities.cjs.map +1 -1
- package/utilities/utilities.cjs.native.js +22 -21
- package/version.js +1 -1
- package/react/hooks/internal/useStrictModeSafeCleanupEffect.d.ts +0 -2
- package/react/hooks/internal/useStrictModeSafeCleanupEffect.d.ts.map +0 -1
- package/react/hooks/internal/useStrictModeSafeCleanupEffect.js +0 -11
- package/react/hooks/internal/useStrictModeSafeCleanupEffect.js.map +0 -1
- package/utilities/globals/DEV.d.ts +0 -3
- package/utilities/globals/DEV.d.ts.map +0 -1
- package/utilities/globals/DEV.js +0 -4
- package/utilities/globals/DEV.js.map +0 -1
- package/utilities/globals/fix-graphql.d.ts +0 -2
- package/utilities/globals/fix-graphql.d.ts.map +0 -1
- package/utilities/globals/fix-graphql.js +0 -6
- package/utilities/globals/fix-graphql.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watchQueryOptions.js","sourceRoot":"","sources":["../../src/core/watchQueryOptions.ts"],"names":[],"mappings":"","sourcesContent":["import type { DocumentNode } from 'graphql';\nimport type { TypedDocumentNode } from '@graphql-typed-document-node/core';\n\nimport type { FetchResult } from '../link/core';\nimport type {\n DefaultContext,\n MutationQueryReducersMap,\n OperationVariables,\n MutationUpdaterFunction,\n OnQueryUpdated,\n InternalRefetchQueriesInclude,\n} from './types';\nimport type { ApolloCache } from '../cache';\nimport type { ObservableQuery } from './ObservableQuery';\n\n/**\n * fetchPolicy determines where the client may return a result from. The options are:\n * - cache-first (default): return result from cache. Only fetch from network if cached result is not available.\n * - cache-and-network: return result from cache first (if it exists), then return network result once it's available.\n * - cache-only: return result from cache if available, fail otherwise.\n * - no-cache: return result from network, fail if network call doesn't succeed, don't save to cache\n * - network-only: return result from network, fail if network call doesn't succeed, save to cache\n * - standby: only for queries that aren't actively watched, but should be available for refetch and updateQueries.\n */\nexport type FetchPolicy =\n | 'cache-first'\n | 'network-only'\n | 'cache-only'\n | 'no-cache'\n | 'standby';\n\nexport type WatchQueryFetchPolicy = FetchPolicy | 'cache-and-network';\n\nexport type MutationFetchPolicy = Extract<\n FetchPolicy,\n | 'network-only' // default behavior (mutation results written to cache)\n | 'no-cache' // alternate behavior (results not written to cache)\n>;\n\nexport type RefetchWritePolicy = \"merge\" | \"overwrite\";\n\n/**\n * errorPolicy determines the level of events for errors in the execution result. The options are:\n * - none (default): any errors from the request are treated like runtime errors and the observable is stopped (XXX this is default to lower breaking changes going from AC 1.0 => 2.0)\n * - ignore: errors from the request do not stop the observable, but also don't call `next`\n * - all: errors are treated like data and will notify observables\n */\nexport type ErrorPolicy = 'none' | 'ignore' | 'all';\n\n/**\n * Query options.\n */\nexport interface QueryOptions<TVariables = OperationVariables, TData = any> {\n /**\n * A GraphQL document that consists of a single query to be sent down to the\n * server.\n */\n // TODO REFACTOR: rename this to document. Didn't do it yet because it's in a\n // lot of tests.\n query: DocumentNode | TypedDocumentNode<TData, TVariables>;\n\n /**\n * A map going from variable name to variable value, where the variables are used\n * within the GraphQL query.\n */\n variables?: TVariables;\n\n /**\n * Specifies the {@link ErrorPolicy} to be used for this query\n */\n errorPolicy?: ErrorPolicy;\n\n /**\n * Context to be passed to link execution chain\n */\n context?: DefaultContext;\n\n /**\n * Specifies the {@link FetchPolicy} to be used for this query\n */\n fetchPolicy?: FetchPolicy;\n\n /**\n * The time interval (in milliseconds) on which this query should be\n * refetched from the server.\n */\n pollInterval?: number;\n\n /**\n * Whether or not updates to the network status should trigger next on the observer of this query\n */\n notifyOnNetworkStatusChange?: boolean;\n\n /**\n * Allow returning incomplete data from the cache when a larger query cannot\n * be fully satisfied by the cache, instead of returning nothing.\n */\n returnPartialData?: boolean;\n\n /**\n * If `true`, perform a query `refetch` if the query result is marked as\n * being partial, and the returned data is reset to an empty Object by the\n * Apollo Client `QueryManager` (due to a cache miss).\n */\n partialRefetch?: boolean;\n\n /**\n * Whether to canonize cache results before returning them. Canonization\n * takes some extra time, but it speeds up future deep equality comparisons.\n * Defaults to false.\n */\n canonizeResults?: boolean;\n}\n\n/**\n * Watched query options.\n */\nexport interface WatchQueryOptions<TVariables extends OperationVariables = OperationVariables, TData = any>\n extends Omit<QueryOptions<TVariables, TData>, 'fetchPolicy'> {\n /**\n * Specifies the {@link FetchPolicy} to be used for this query.\n */\n fetchPolicy?: WatchQueryFetchPolicy;\n\n /**\n * Specifies the {@link FetchPolicy} to be used after this query has completed.\n */\n nextFetchPolicy?: WatchQueryFetchPolicy | ((\n this: WatchQueryOptions<TVariables, TData>,\n currentFetchPolicy: WatchQueryFetchPolicy,\n context: NextFetchPolicyContext<TData, TVariables>,\n ) => WatchQueryFetchPolicy);\n\n /**\n * Defaults to the initial value of options.fetchPolicy, but can be explicitly\n * configured to specify the WatchQueryFetchPolicy to revert back to whenever\n * variables change (unless nextFetchPolicy intervenes).\n */\n initialFetchPolicy?: WatchQueryFetchPolicy;\n\n /**\n * Specifies whether a {@link NetworkStatus.refetch} operation should merge\n * incoming field data with existing data, or overwrite the existing data.\n * Overwriting is probably preferable, but merging is currently the default\n * behavior, for backwards compatibility with Apollo Client 3.x.\n */\n refetchWritePolicy?: RefetchWritePolicy;\n}\n\nexport interface NextFetchPolicyContext<TData, TVariables extends OperationVariables> {\n reason:\n | \"after-fetch\"\n | \"variables-changed\";\n observable: ObservableQuery<TData, TVariables>;\n options: WatchQueryOptions<TVariables, TData>;\n initialFetchPolicy: WatchQueryFetchPolicy;\n}\n\nexport interface FetchMoreQueryOptions<TVariables, TData = any> {\n query?: DocumentNode | TypedDocumentNode<TData, TVariables>;\n variables?: Partial<TVariables>;\n context?: DefaultContext;\n}\n\nexport type UpdateQueryFn<\n TData = any,\n TSubscriptionVariables = OperationVariables,\n TSubscriptionData = TData\n> = (\n previousQueryResult: TData,\n options: {\n subscriptionData: { data: TSubscriptionData };\n variables?: TSubscriptionVariables;\n },\n) => TData;\n\nexport type SubscribeToMoreOptions<\n TData = any,\n TSubscriptionVariables = OperationVariables,\n TSubscriptionData = TData\n> = {\n document: DocumentNode | TypedDocumentNode<TSubscriptionData, TSubscriptionVariables>;\n variables?: TSubscriptionVariables;\n updateQuery?: UpdateQueryFn<TData, TSubscriptionVariables, TSubscriptionData>;\n onError?: (error: Error) => void;\n context?: DefaultContext;\n};\n\nexport interface SubscriptionOptions<TVariables = OperationVariables, TData = any> {\n /**\n * A GraphQL document, often created with `gql` from the `graphql-tag`\n * package, that contains a single subscription inside of it.\n */\n query: DocumentNode | TypedDocumentNode<TData, TVariables>;\n\n /**\n * An object that maps from the name of a variable as used in the subscription\n * GraphQL document to that variable's value.\n */\n variables?: TVariables;\n\n /**\n * Specifies the {@link FetchPolicy} to be used for this subscription.\n */\n fetchPolicy?: FetchPolicy;\n\n /**\n * Specifies the {@link ErrorPolicy} to be used for this operation\n */\n errorPolicy?: ErrorPolicy;\n\n /**\n * Context object to be passed through the link execution chain.\n */\n context?: DefaultContext;\n}\n\nexport interface MutationBaseOptions<\n TData = any,\n TVariables = OperationVariables,\n TContext = DefaultContext,\n TCache extends ApolloCache<any> = ApolloCache<any>,\n> {\n /**\n * An object that represents the result of this mutation that will be\n * optimistically stored before the server has actually returned a result.\n * This is most often used for optimistic UI, where we want to be able to see\n * the result of a mutation immediately, and update the UI later if any errors\n * appear.\n */\n optimisticResponse?: TData | ((vars: TVariables) => TData);\n\n /**\n * A {@link MutationQueryReducersMap}, which is map from query names to\n * mutation query reducers. Briefly, this map defines how to incorporate the\n * results of the mutation into the results of queries that are currently\n * being watched by your application.\n */\n updateQueries?: MutationQueryReducersMap<TData>;\n\n /**\n * A list of query names which will be refetched once this mutation has\n * returned. This is often used if you have a set of queries which may be\n * affected by a mutation and will have to update. Rather than writing a\n * mutation query reducer (i.e. `updateQueries`) for this, you can simply\n * refetch the queries that will be affected and achieve a consistent store\n * once these queries return.\n */\n refetchQueries?:\n | ((result: FetchResult<TData>) => InternalRefetchQueriesInclude)\n | InternalRefetchQueriesInclude;\n\n /**\n * By default, `refetchQueries` does not wait for the refetched queries to\n * be completed, before resolving the mutation `Promise`. This ensures that\n * query refetching does not hold up mutation response handling (query\n * refetching is handled asynchronously). Set `awaitRefetchQueries` to\n * `true` if you would like to wait for the refetched queries to complete,\n * before the mutation can be marked as resolved.\n */\n awaitRefetchQueries?: boolean;\n\n /**\n * A function which provides an {@link ApolloCache} instance, and the result\n * of the mutation, to allow the user to update the store based on the\n * results of the mutation.\n *\n * This function will be called twice over the lifecycle of a mutation. Once\n * at the very beginning if an `optimisticResponse` was provided. The writes\n * created from the optimistic data will be rolled back before the second time\n * this function is called which is when the mutation has successfully\n * resolved. At that point `update` will be called with the *actual* mutation\n * result and those writes will not be rolled back.\n *\n * Note that since this function is intended to be used to update the\n * store, it cannot be used with a `no-cache` fetch policy. If you're\n * interested in performing some action after a mutation has completed,\n * and you don't need to update the store, use the Promise returned from\n * `client.mutate` instead.\n */\n update?: MutationUpdaterFunction<TData, TVariables, TContext, TCache>;\n\n /**\n * A function that will be called for each ObservableQuery affected by\n * this mutation, after the mutation has completed.\n */\n onQueryUpdated?: OnQueryUpdated<any>;\n\n /**\n * Specifies the {@link ErrorPolicy} to be used for this operation\n */\n errorPolicy?: ErrorPolicy;\n\n /**\n * An object that maps from the name of a variable as used in the mutation\n * GraphQL document to that variable's value.\n */\n variables?: TVariables;\n\n /**\n * The context to be passed to the link execution chain. This context will\n * only be used with this mutation. It will not be used with\n * `refetchQueries`. Refetched queries use the context they were\n * initialized with (since the initial context is stored as part of the\n * `ObservableQuery` instance). If a specific context is needed when\n * refetching queries, make sure it is configured (via the\n * [query `context` option](https://www.apollographql.com/docs/react/api/apollo-client#ApolloClient.query))\n * when the query is first initialized/run.\n */\n context?: TContext;\n}\n\nexport interface MutationOptions<\n TData = any,\n TVariables = OperationVariables,\n TContext = DefaultContext,\n TCache extends ApolloCache<any> = ApolloCache<any>,\n> extends MutationBaseOptions<TData, TVariables, TContext, TCache> {\n /**\n * A GraphQL document, often created with `gql` from the `graphql-tag`\n * package, that contains a single mutation inside of it.\n */\n mutation: DocumentNode | TypedDocumentNode<TData, TVariables>;\n\n /**\n * Specifies the {@link MutationFetchPolicy} to be used for this query.\n * Mutations support only 'network-only' and 'no-cache' fetchPolicy strings.\n * If fetchPolicy is not provided, it defaults to 'network-only'.\n */\n fetchPolicy?: MutationFetchPolicy;\n\n /**\n * To avoid retaining sensitive information from mutation root field\n * arguments, Apollo Client v3.4+ automatically clears any `ROOT_MUTATION`\n * fields from the cache after each mutation finishes. If you need this\n * information to remain in the cache, you can prevent the removal by passing\n * `keepRootFields: true` to the mutation. `ROOT_MUTATION` result data are\n * also passed to the mutation `update` function, so we recommend obtaining\n * the results that way, rather than using this option, if possible.\n */\n keepRootFields?: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"watchQueryOptions.js","sourceRoot":"","sources":["../../src/core/watchQueryOptions.ts"],"names":[],"mappings":"","sourcesContent":["import type { DocumentNode } from 'graphql';\nimport type { TypedDocumentNode } from '@graphql-typed-document-node/core';\n\nimport type { FetchResult } from '../link/core/index.js';\nimport type {\n DefaultContext,\n MutationQueryReducersMap,\n OperationVariables,\n MutationUpdaterFunction,\n OnQueryUpdated,\n InternalRefetchQueriesInclude,\n} from './types.js';\nimport type { ApolloCache } from '../cache/index.js';\nimport type { ObservableQuery } from './ObservableQuery.js';\n\n/**\n * fetchPolicy determines where the client may return a result from. The options are:\n * - cache-first (default): return result from cache. Only fetch from network if cached result is not available.\n * - cache-and-network: return result from cache first (if it exists), then return network result once it's available.\n * - cache-only: return result from cache if available, fail otherwise.\n * - no-cache: return result from network, fail if network call doesn't succeed, don't save to cache\n * - network-only: return result from network, fail if network call doesn't succeed, save to cache\n * - standby: only for queries that aren't actively watched, but should be available for refetch and updateQueries.\n */\nexport type FetchPolicy =\n | 'cache-first'\n | 'network-only'\n | 'cache-only'\n | 'no-cache'\n | 'standby';\n\nexport type WatchQueryFetchPolicy = FetchPolicy | 'cache-and-network';\n\nexport type MutationFetchPolicy = Extract<\n FetchPolicy,\n | 'network-only' // default behavior (mutation results written to cache)\n | 'no-cache' // alternate behavior (results not written to cache)\n>;\n\nexport type RefetchWritePolicy = \"merge\" | \"overwrite\";\n\n/**\n * errorPolicy determines the level of events for errors in the execution result. The options are:\n * - none (default): any errors from the request are treated like runtime errors and the observable is stopped (XXX this is default to lower breaking changes going from AC 1.0 => 2.0)\n * - ignore: errors from the request do not stop the observable, but also don't call `next`\n * - all: errors are treated like data and will notify observables\n */\nexport type ErrorPolicy = 'none' | 'ignore' | 'all';\n\n/**\n * Query options.\n */\nexport interface QueryOptions<TVariables = OperationVariables, TData = any> {\n /**\n * A GraphQL document that consists of a single query to be sent down to the\n * server.\n */\n // TODO REFACTOR: rename this to document. Didn't do it yet because it's in a\n // lot of tests.\n query: DocumentNode | TypedDocumentNode<TData, TVariables>;\n\n /**\n * A map going from variable name to variable value, where the variables are used\n * within the GraphQL query.\n */\n variables?: TVariables;\n\n /**\n * Specifies the {@link ErrorPolicy} to be used for this query\n */\n errorPolicy?: ErrorPolicy;\n\n /**\n * Context to be passed to link execution chain\n */\n context?: DefaultContext;\n\n /**\n * Specifies the {@link FetchPolicy} to be used for this query\n */\n fetchPolicy?: FetchPolicy;\n\n /**\n * The time interval (in milliseconds) on which this query should be\n * refetched from the server.\n */\n pollInterval?: number;\n\n /**\n * Whether or not updates to the network status should trigger next on the observer of this query\n */\n notifyOnNetworkStatusChange?: boolean;\n\n /**\n * Allow returning incomplete data from the cache when a larger query cannot\n * be fully satisfied by the cache, instead of returning nothing.\n */\n returnPartialData?: boolean;\n\n /**\n * If `true`, perform a query `refetch` if the query result is marked as\n * being partial, and the returned data is reset to an empty Object by the\n * Apollo Client `QueryManager` (due to a cache miss).\n */\n partialRefetch?: boolean;\n\n /**\n * Whether to canonize cache results before returning them. Canonization\n * takes some extra time, but it speeds up future deep equality comparisons.\n * Defaults to false.\n */\n canonizeResults?: boolean;\n}\n\n/**\n * Watched query options.\n */\nexport interface WatchQueryOptions<TVariables extends OperationVariables = OperationVariables, TData = any>\n extends Omit<QueryOptions<TVariables, TData>, 'fetchPolicy'> {\n /**\n * Specifies the {@link FetchPolicy} to be used for this query.\n */\n fetchPolicy?: WatchQueryFetchPolicy;\n\n /**\n * Specifies the {@link FetchPolicy} to be used after this query has completed.\n */\n nextFetchPolicy?: WatchQueryFetchPolicy | ((\n this: WatchQueryOptions<TVariables, TData>,\n currentFetchPolicy: WatchQueryFetchPolicy,\n context: NextFetchPolicyContext<TData, TVariables>,\n ) => WatchQueryFetchPolicy);\n\n /**\n * Defaults to the initial value of options.fetchPolicy, but can be explicitly\n * configured to specify the WatchQueryFetchPolicy to revert back to whenever\n * variables change (unless nextFetchPolicy intervenes).\n */\n initialFetchPolicy?: WatchQueryFetchPolicy;\n\n /**\n * Specifies whether a {@link NetworkStatus.refetch} operation should merge\n * incoming field data with existing data, or overwrite the existing data.\n * Overwriting is probably preferable, but merging is currently the default\n * behavior, for backwards compatibility with Apollo Client 3.x.\n */\n refetchWritePolicy?: RefetchWritePolicy;\n}\n\nexport interface NextFetchPolicyContext<TData, TVariables extends OperationVariables> {\n reason:\n | \"after-fetch\"\n | \"variables-changed\";\n observable: ObservableQuery<TData, TVariables>;\n options: WatchQueryOptions<TVariables, TData>;\n initialFetchPolicy: WatchQueryFetchPolicy;\n}\n\nexport interface FetchMoreQueryOptions<TVariables, TData = any> {\n query?: DocumentNode | TypedDocumentNode<TData, TVariables>;\n variables?: Partial<TVariables>;\n context?: DefaultContext;\n}\n\nexport type UpdateQueryFn<\n TData = any,\n TSubscriptionVariables = OperationVariables,\n TSubscriptionData = TData\n> = (\n previousQueryResult: TData,\n options: {\n subscriptionData: { data: TSubscriptionData };\n variables?: TSubscriptionVariables;\n },\n) => TData;\n\nexport type SubscribeToMoreOptions<\n TData = any,\n TSubscriptionVariables = OperationVariables,\n TSubscriptionData = TData\n> = {\n document: DocumentNode | TypedDocumentNode<TSubscriptionData, TSubscriptionVariables>;\n variables?: TSubscriptionVariables;\n updateQuery?: UpdateQueryFn<TData, TSubscriptionVariables, TSubscriptionData>;\n onError?: (error: Error) => void;\n context?: DefaultContext;\n};\n\nexport interface SubscriptionOptions<TVariables = OperationVariables, TData = any> {\n /**\n * A GraphQL document, often created with `gql` from the `graphql-tag`\n * package, that contains a single subscription inside of it.\n */\n query: DocumentNode | TypedDocumentNode<TData, TVariables>;\n\n /**\n * An object that maps from the name of a variable as used in the subscription\n * GraphQL document to that variable's value.\n */\n variables?: TVariables;\n\n /**\n * Specifies the {@link FetchPolicy} to be used for this subscription.\n */\n fetchPolicy?: FetchPolicy;\n\n /**\n * Specifies the {@link ErrorPolicy} to be used for this operation\n */\n errorPolicy?: ErrorPolicy;\n\n /**\n * Context object to be passed through the link execution chain.\n */\n context?: DefaultContext;\n}\n\nexport interface MutationBaseOptions<\n TData = any,\n TVariables = OperationVariables,\n TContext = DefaultContext,\n TCache extends ApolloCache<any> = ApolloCache<any>,\n> {\n /**\n * An object that represents the result of this mutation that will be\n * optimistically stored before the server has actually returned a result.\n * This is most often used for optimistic UI, where we want to be able to see\n * the result of a mutation immediately, and update the UI later if any errors\n * appear.\n */\n optimisticResponse?: TData | ((vars: TVariables) => TData);\n\n /**\n * A {@link MutationQueryReducersMap}, which is map from query names to\n * mutation query reducers. Briefly, this map defines how to incorporate the\n * results of the mutation into the results of queries that are currently\n * being watched by your application.\n */\n updateQueries?: MutationQueryReducersMap<TData>;\n\n /**\n * A list of query names which will be refetched once this mutation has\n * returned. This is often used if you have a set of queries which may be\n * affected by a mutation and will have to update. Rather than writing a\n * mutation query reducer (i.e. `updateQueries`) for this, you can simply\n * refetch the queries that will be affected and achieve a consistent store\n * once these queries return.\n */\n refetchQueries?:\n | ((result: FetchResult<TData>) => InternalRefetchQueriesInclude)\n | InternalRefetchQueriesInclude;\n\n /**\n * By default, `refetchQueries` does not wait for the refetched queries to\n * be completed, before resolving the mutation `Promise`. This ensures that\n * query refetching does not hold up mutation response handling (query\n * refetching is handled asynchronously). Set `awaitRefetchQueries` to\n * `true` if you would like to wait for the refetched queries to complete,\n * before the mutation can be marked as resolved.\n */\n awaitRefetchQueries?: boolean;\n\n /**\n * A function which provides an {@link ApolloCache} instance, and the result\n * of the mutation, to allow the user to update the store based on the\n * results of the mutation.\n *\n * This function will be called twice over the lifecycle of a mutation. Once\n * at the very beginning if an `optimisticResponse` was provided. The writes\n * created from the optimistic data will be rolled back before the second time\n * this function is called which is when the mutation has successfully\n * resolved. At that point `update` will be called with the *actual* mutation\n * result and those writes will not be rolled back.\n *\n * Note that since this function is intended to be used to update the\n * store, it cannot be used with a `no-cache` fetch policy. If you're\n * interested in performing some action after a mutation has completed,\n * and you don't need to update the store, use the Promise returned from\n * `client.mutate` instead.\n */\n update?: MutationUpdaterFunction<TData, TVariables, TContext, TCache>;\n\n /**\n * A function that will be called for each ObservableQuery affected by\n * this mutation, after the mutation has completed.\n */\n onQueryUpdated?: OnQueryUpdated<any>;\n\n /**\n * Specifies the {@link ErrorPolicy} to be used for this operation\n */\n errorPolicy?: ErrorPolicy;\n\n /**\n * An object that maps from the name of a variable as used in the mutation\n * GraphQL document to that variable's value.\n */\n variables?: TVariables;\n\n /**\n * The context to be passed to the link execution chain. This context will\n * only be used with this mutation. It will not be used with\n * `refetchQueries`. Refetched queries use the context they were\n * initialized with (since the initial context is stored as part of the\n * `ObservableQuery` instance). If a specific context is needed when\n * refetching queries, make sure it is configured (via the\n * [query `context` option](https://www.apollographql.com/docs/react/api/apollo-client#ApolloClient.query))\n * when the query is first initialized/run.\n */\n context?: TContext;\n}\n\nexport interface MutationOptions<\n TData = any,\n TVariables = OperationVariables,\n TContext = DefaultContext,\n TCache extends ApolloCache<any> = ApolloCache<any>,\n> extends MutationBaseOptions<TData, TVariables, TContext, TCache> {\n /**\n * A GraphQL document, often created with `gql` from the `graphql-tag`\n * package, that contains a single mutation inside of it.\n */\n mutation: DocumentNode | TypedDocumentNode<TData, TVariables>;\n\n /**\n * Specifies the {@link MutationFetchPolicy} to be used for this query.\n * Mutations support only 'network-only' and 'no-cache' fetchPolicy strings.\n * If fetchPolicy is not provided, it defaults to 'network-only'.\n */\n fetchPolicy?: MutationFetchPolicy;\n\n /**\n * To avoid retaining sensitive information from mutation root field\n * arguments, Apollo Client v3.4+ automatically clears any `ROOT_MUTATION`\n * fields from the cache after each mutation finishes. If you need this\n * information to remain in the cache, you can prevent the removal by passing\n * `keepRootFields: true` to the mutation. `ROOT_MUTATION` result data are\n * also passed to the mutation `update` function, so we recommend obtaining\n * the results that way, rather than using this option, if possible.\n */\n keepRootFields?: boolean;\n}\n"]}
|
package/dev/dev.cjs
CHANGED
|
@@ -62,7 +62,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
62
62
|
"For more information, please visit: https://go.apollo.dev/c/docs"
|
|
63
63
|
},
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
14: {
|
|
66
66
|
file: "@apollo/client/core/ApolloClient.js",
|
|
67
67
|
condition: "options.fetchPolicy !== 'cache-and-network'",
|
|
68
68
|
|
|
@@ -72,42 +72,42 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
72
72
|
'using a different fetchPolicy, such as cache-first or network-only.'
|
|
73
73
|
},
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
16: {
|
|
76
76
|
file: "@apollo/client/core/LocalState.js",
|
|
77
77
|
condition: "fragment",
|
|
78
78
|
message: "No fragment named %s"
|
|
79
79
|
},
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
17: {
|
|
82
82
|
file: "@apollo/client/core/LocalState.js",
|
|
83
83
|
condition: "fragment",
|
|
84
84
|
message: "No fragment named %s"
|
|
85
85
|
},
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
20: {
|
|
88
88
|
file: "@apollo/client/core/ObservableQuery.js",
|
|
89
89
|
condition: "pollInterval",
|
|
90
90
|
message: 'Attempted to start a polling query without a polling interval.'
|
|
91
91
|
},
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
23: {
|
|
94
94
|
file: "@apollo/client/core/QueryManager.js",
|
|
95
95
|
message: 'QueryManager stopped while query was in flight'
|
|
96
96
|
},
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
24: {
|
|
99
99
|
file: "@apollo/client/core/QueryManager.js",
|
|
100
100
|
condition: "mutation",
|
|
101
101
|
message: 'mutation option is required. You must specify your GraphQL document in the mutation option.'
|
|
102
102
|
},
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
25: {
|
|
105
105
|
file: "@apollo/client/core/QueryManager.js",
|
|
106
106
|
condition: "fetchPolicy === 'network-only' ||\n fetchPolicy === 'no-cache'",
|
|
107
107
|
message: "Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."
|
|
108
108
|
},
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
26: {
|
|
111
111
|
file: "@apollo/client/core/QueryManager.js",
|
|
112
112
|
condition: "options.query",
|
|
113
113
|
|
|
@@ -115,45 +115,45 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
115
115
|
'in the query option.'
|
|
116
116
|
},
|
|
117
117
|
|
|
118
|
-
|
|
118
|
+
27: {
|
|
119
119
|
file: "@apollo/client/core/QueryManager.js",
|
|
120
120
|
condition: "options.query.kind === 'Document'",
|
|
121
121
|
message: 'You must wrap the query string in a "gql" tag.'
|
|
122
122
|
},
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
28: {
|
|
125
125
|
file: "@apollo/client/core/QueryManager.js",
|
|
126
126
|
condition: "!options.returnPartialData",
|
|
127
127
|
message: 'returnPartialData option only supported on watchQuery.'
|
|
128
128
|
},
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
29: {
|
|
131
131
|
file: "@apollo/client/core/QueryManager.js",
|
|
132
132
|
condition: "!options.pollInterval",
|
|
133
133
|
message: 'pollInterval option only supported on watchQuery.'
|
|
134
134
|
},
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
30: {
|
|
137
137
|
file: "@apollo/client/core/QueryManager.js",
|
|
138
138
|
message: 'Store reset while query was in flight (not completed in link chain)'
|
|
139
139
|
},
|
|
140
140
|
|
|
141
|
-
|
|
141
|
+
34: {
|
|
142
142
|
file: "@apollo/client/link/core/ApolloLink.js",
|
|
143
143
|
message: 'request is not implemented'
|
|
144
144
|
},
|
|
145
145
|
|
|
146
|
-
|
|
146
|
+
35: {
|
|
147
147
|
file: "@apollo/client/link/http/checkFetcher.js",
|
|
148
148
|
message: "\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 "
|
|
149
149
|
},
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
37: {
|
|
152
152
|
file: "@apollo/client/link/http/serializeFetchParameter.js",
|
|
153
153
|
message: "Network request failed. %s is not serializable: %s"
|
|
154
154
|
},
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
38: {
|
|
157
157
|
file: "@apollo/client/link/persisted-queries/index.js",
|
|
158
158
|
condition: "options && (typeof options.sha256 === 'function' ||\n typeof options.generateHash === 'function')",
|
|
159
159
|
|
|
@@ -162,18 +162,18 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
162
162
|
'parameter.'
|
|
163
163
|
},
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
39: {
|
|
166
166
|
file: "@apollo/client/link/persisted-queries/index.js",
|
|
167
167
|
condition: "forward",
|
|
168
168
|
message: 'PersistedQueryLink cannot be the last link in the chain.'
|
|
169
169
|
},
|
|
170
170
|
|
|
171
|
-
|
|
171
|
+
41: {
|
|
172
172
|
file: "@apollo/client/link/utils/validateOperation.js",
|
|
173
173
|
message: "illegal argument: %s"
|
|
174
174
|
},
|
|
175
175
|
|
|
176
|
-
|
|
176
|
+
42: {
|
|
177
177
|
file: "@apollo/client/react/context/ApolloConsumer.js",
|
|
178
178
|
condition: "context && context.client",
|
|
179
179
|
|
|
@@ -181,7 +181,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
181
181
|
'Wrap the root component in an <ApolloProvider>.'
|
|
182
182
|
},
|
|
183
183
|
|
|
184
|
-
|
|
184
|
+
43: {
|
|
185
185
|
file: "@apollo/client/react/context/ApolloContext.js",
|
|
186
186
|
condition: "'createContext' in React",
|
|
187
187
|
|
|
@@ -191,7 +191,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
191
191
|
'For more information, see https://nextjs.org/docs/getting-started/react-essentials#client-components'
|
|
192
192
|
},
|
|
193
193
|
|
|
194
|
-
|
|
194
|
+
44: {
|
|
195
195
|
file: "@apollo/client/react/context/ApolloProvider.js",
|
|
196
196
|
condition: "context.client",
|
|
197
197
|
|
|
@@ -199,7 +199,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
199
199
|
'sure you pass in your client via the "client" prop.'
|
|
200
200
|
},
|
|
201
201
|
|
|
202
|
-
|
|
202
|
+
45: {
|
|
203
203
|
file: "@apollo/client/react/hoc/hoc-utils.js",
|
|
204
204
|
condition: "this.withRef",
|
|
205
205
|
|
|
@@ -207,7 +207,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
207
207
|
"{ withRef: true } in the options"
|
|
208
208
|
},
|
|
209
209
|
|
|
210
|
-
|
|
210
|
+
46: {
|
|
211
211
|
file: "@apollo/client/react/hoc/withApollo.js",
|
|
212
212
|
condition: "operationOptions.withRef",
|
|
213
213
|
|
|
@@ -215,7 +215,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
215
215
|
"{ withRef: true } in the options"
|
|
216
216
|
},
|
|
217
217
|
|
|
218
|
-
|
|
218
|
+
47: {
|
|
219
219
|
file: "@apollo/client/react/hooks/useApolloClient.js",
|
|
220
220
|
condition: "!!client",
|
|
221
221
|
|
|
@@ -224,7 +224,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
224
224
|
'instance in via options.'
|
|
225
225
|
},
|
|
226
226
|
|
|
227
|
-
|
|
227
|
+
49: {
|
|
228
228
|
file: "@apollo/client/react/hooks/useReadQuery.js",
|
|
229
229
|
condition: "internalQueryRef.promiseCache",
|
|
230
230
|
|
|
@@ -233,7 +233,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
233
233
|
'Please ensure you are passing the `queryRef` returned from `useBackgroundQuery`.'
|
|
234
234
|
},
|
|
235
235
|
|
|
236
|
-
|
|
236
|
+
54: {
|
|
237
237
|
file: "@apollo/client/react/hooks/useSuspenseCache.js",
|
|
238
238
|
condition: "suspenseCache",
|
|
239
239
|
|
|
@@ -242,13 +242,13 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
242
242
|
'or pass a SuspenseCache instance in via options.'
|
|
243
243
|
},
|
|
244
244
|
|
|
245
|
-
|
|
245
|
+
55: {
|
|
246
246
|
file: "@apollo/client/react/hooks/useSuspenseQuery.js",
|
|
247
247
|
condition: "supportedFetchPolicies.includes(fetchPolicy)",
|
|
248
248
|
message: "The fetch policy `%s` is not supported with suspense."
|
|
249
249
|
},
|
|
250
250
|
|
|
251
|
-
|
|
251
|
+
58: {
|
|
252
252
|
file: "@apollo/client/react/parser/index.js",
|
|
253
253
|
condition: "!!document && !!document.kind",
|
|
254
254
|
|
|
@@ -257,7 +257,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
257
257
|
"to convert your operation into a document"
|
|
258
258
|
},
|
|
259
259
|
|
|
260
|
-
|
|
260
|
+
59: {
|
|
261
261
|
file: "@apollo/client/react/parser/index.js",
|
|
262
262
|
condition: "!fragments.length ||\n (queries.length || mutations.length || subscriptions.length)",
|
|
263
263
|
|
|
@@ -265,7 +265,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
265
265
|
"You must include a query, subscription or mutation as well"
|
|
266
266
|
},
|
|
267
267
|
|
|
268
|
-
|
|
268
|
+
60: {
|
|
269
269
|
file: "@apollo/client/react/parser/index.js",
|
|
270
270
|
condition: "queries.length + mutations.length + subscriptions.length <= 1",
|
|
271
271
|
|
|
@@ -275,7 +275,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
275
275
|
"You can use 'compose' to join multiple operation types to a component"
|
|
276
276
|
},
|
|
277
277
|
|
|
278
|
-
|
|
278
|
+
61: {
|
|
279
279
|
file: "@apollo/client/react/parser/index.js",
|
|
280
280
|
condition: "definitions.length === 1",
|
|
281
281
|
|
|
@@ -284,7 +284,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
284
284
|
"You can use 'compose' to join multiple operation types to a component"
|
|
285
285
|
},
|
|
286
286
|
|
|
287
|
-
|
|
287
|
+
62: {
|
|
288
288
|
file: "@apollo/client/react/parser/index.js",
|
|
289
289
|
condition: "operation.type === type",
|
|
290
290
|
|
|
@@ -292,108 +292,108 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
292
292
|
"%s, but a %s was used instead."
|
|
293
293
|
},
|
|
294
294
|
|
|
295
|
-
|
|
295
|
+
63: {
|
|
296
296
|
file: "@apollo/client/testing/core/mocking/mockLink.js",
|
|
297
297
|
condition: "queryWithoutConnection",
|
|
298
298
|
message: "query is required"
|
|
299
299
|
},
|
|
300
300
|
|
|
301
|
-
|
|
301
|
+
64: {
|
|
302
302
|
file: "@apollo/client/utilities/graphql/DocumentTransform.js",
|
|
303
303
|
condition: "Array.isArray(cacheKeys)",
|
|
304
304
|
message: '`getCacheKey` must return an array or undefined'
|
|
305
305
|
},
|
|
306
306
|
|
|
307
|
-
|
|
307
|
+
65: {
|
|
308
308
|
file: "@apollo/client/utilities/graphql/directives.js",
|
|
309
309
|
condition: "evaledValue !== void 0",
|
|
310
310
|
message: "Invalid variable referenced in @%s directive."
|
|
311
311
|
},
|
|
312
312
|
|
|
313
|
-
|
|
313
|
+
66: {
|
|
314
314
|
file: "@apollo/client/utilities/graphql/directives.js",
|
|
315
315
|
condition: "directiveArguments && directiveArguments.length === 1",
|
|
316
316
|
message: "Incorrect number of arguments for the @%s directive."
|
|
317
317
|
},
|
|
318
318
|
|
|
319
|
-
|
|
319
|
+
67: {
|
|
320
320
|
file: "@apollo/client/utilities/graphql/directives.js",
|
|
321
321
|
condition: "ifArgument.name && ifArgument.name.value === 'if'",
|
|
322
322
|
message: "Invalid argument for the @%s directive."
|
|
323
323
|
},
|
|
324
324
|
|
|
325
|
-
|
|
325
|
+
68: {
|
|
326
326
|
file: "@apollo/client/utilities/graphql/directives.js",
|
|
327
327
|
condition: "ifValue &&\n (ifValue.kind === 'Variable' || ifValue.kind === 'BooleanValue')",
|
|
328
328
|
message: "Argument for the @%s directive must be a variable or a boolean value."
|
|
329
329
|
},
|
|
330
330
|
|
|
331
|
-
|
|
331
|
+
69: {
|
|
332
332
|
file: "@apollo/client/utilities/graphql/fragments.js",
|
|
333
333
|
|
|
334
334
|
message: "Found a %s operation%s. " +
|
|
335
335
|
'No operations are allowed when using a fragment as a query. Only fragments are allowed.'
|
|
336
336
|
},
|
|
337
337
|
|
|
338
|
-
|
|
338
|
+
70: {
|
|
339
339
|
file: "@apollo/client/utilities/graphql/fragments.js",
|
|
340
340
|
condition: "fragments.length === 1",
|
|
341
341
|
message: "Found %s fragments. `fragmentName` must be provided when there is not exactly 1 fragment."
|
|
342
342
|
},
|
|
343
343
|
|
|
344
|
-
|
|
344
|
+
71: {
|
|
345
345
|
file: "@apollo/client/utilities/graphql/fragments.js",
|
|
346
346
|
condition: "fragment",
|
|
347
347
|
message: "No fragment named %s"
|
|
348
348
|
},
|
|
349
349
|
|
|
350
|
-
|
|
350
|
+
72: {
|
|
351
351
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
352
352
|
condition: "doc && doc.kind === 'Document'",
|
|
353
353
|
message: "Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \"gql\" tag? http://docs.apollostack.com/apollo-client/core.html#gql"
|
|
354
354
|
},
|
|
355
355
|
|
|
356
|
-
|
|
356
|
+
73: {
|
|
357
357
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
358
358
|
message: "Schema type definitions not allowed in queries. Found: \"%s\""
|
|
359
359
|
},
|
|
360
360
|
|
|
361
|
-
|
|
361
|
+
74: {
|
|
362
362
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
363
363
|
condition: "operations.length <= 1",
|
|
364
364
|
message: "Ambiguous GraphQL document: contains %s operations"
|
|
365
365
|
},
|
|
366
366
|
|
|
367
|
-
|
|
367
|
+
75: {
|
|
368
368
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
369
369
|
condition: "queryDef && queryDef.operation === 'query'",
|
|
370
370
|
message: 'Must contain a query definition.'
|
|
371
371
|
},
|
|
372
372
|
|
|
373
|
-
|
|
373
|
+
76: {
|
|
374
374
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
375
375
|
condition: "doc.kind === 'Document'",
|
|
376
376
|
message: "Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \"gql\" tag? http://docs.apollostack.com/apollo-client/core.html#gql"
|
|
377
377
|
},
|
|
378
378
|
|
|
379
|
-
|
|
379
|
+
77: {
|
|
380
380
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
381
381
|
condition: "doc.definitions.length <= 1",
|
|
382
382
|
message: 'Fragment must have exactly one definition.'
|
|
383
383
|
},
|
|
384
384
|
|
|
385
|
-
|
|
385
|
+
78: {
|
|
386
386
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
387
387
|
condition: "fragmentDef.kind === 'FragmentDefinition'",
|
|
388
388
|
message: 'Must be a fragment definition.'
|
|
389
389
|
},
|
|
390
390
|
|
|
391
|
-
|
|
391
|
+
79: {
|
|
392
392
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
393
393
|
message: 'Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment.'
|
|
394
394
|
},
|
|
395
395
|
|
|
396
|
-
|
|
396
|
+
80: {
|
|
397
397
|
file: "@apollo/client/utilities/graphql/storeUtils.js",
|
|
398
398
|
|
|
399
399
|
message: "The inline argument \"%s\" of kind \"%s\"" +
|
|
@@ -403,25 +403,18 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
403
403
|
};
|
|
404
404
|
|
|
405
405
|
const devDebug = {
|
|
406
|
-
|
|
406
|
+
15: {
|
|
407
407
|
file: "@apollo/client/core/ApolloClient.js",
|
|
408
408
|
message: "In client.refetchQueries, Promise.all promise rejected with error %o"
|
|
409
409
|
},
|
|
410
410
|
|
|
411
|
-
|
|
411
|
+
22: {
|
|
412
412
|
file: "@apollo/client/core/ObservableQuery.js",
|
|
413
413
|
message: "Missing cache result fields: %o"
|
|
414
414
|
}
|
|
415
415
|
};
|
|
416
416
|
|
|
417
|
-
const devLog = {
|
|
418
|
-
14: {
|
|
419
|
-
file: "@apollo/client/core/ApolloClient.js",
|
|
420
|
-
|
|
421
|
-
message: "Download the Apollo DevTools for a better development " +
|
|
422
|
-
"experience: %s"
|
|
423
|
-
}
|
|
424
|
-
};
|
|
417
|
+
const devLog = {};
|
|
425
418
|
|
|
426
419
|
const devWarn = {
|
|
427
420
|
4: {
|
|
@@ -436,70 +429,70 @@ const devWarn = {
|
|
|
436
429
|
|
|
437
430
|
12: {
|
|
438
431
|
file: "@apollo/client/cache/inmemory/writeToStore.js",
|
|
439
|
-
message: "Cache data may be lost when replacing the %s field of a %s object.\n\nTo address this problem (which is not a bug in Apollo Client), %sdefine a custom merge function for the %s field, so InMemoryCache can safely merge these objects:\n\n existing: %s\n incoming: %s\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"
|
|
432
|
+
message: "Cache data may be lost when replacing the %s field of a %s object.\n\nThis could cause additional (usually avoidable) network requests to fetch data that were otherwise cached.\n\nTo address this problem (which is not a bug in Apollo Client), %sdefine a custom merge function for the %s field, so InMemoryCache can safely merge these objects:\n\n existing: %s\n incoming: %s\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"
|
|
440
433
|
},
|
|
441
434
|
|
|
442
|
-
|
|
435
|
+
18: {
|
|
443
436
|
file: "@apollo/client/core/ObservableQuery.js",
|
|
444
437
|
message: "Called refetch(%o) for query %o, which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"
|
|
445
438
|
},
|
|
446
439
|
|
|
447
|
-
|
|
440
|
+
31: {
|
|
448
441
|
file: "@apollo/client/core/QueryManager.js",
|
|
449
442
|
message: "Unknown query named \"%s\" requested in refetchQueries options.include array"
|
|
450
443
|
},
|
|
451
444
|
|
|
452
|
-
|
|
445
|
+
32: {
|
|
453
446
|
file: "@apollo/client/core/QueryManager.js",
|
|
454
447
|
message: "Unknown query %s requested in refetchQueries options.include array"
|
|
455
448
|
},
|
|
456
449
|
|
|
457
|
-
|
|
450
|
+
33: {
|
|
458
451
|
file: "@apollo/client/link/core/ApolloLink.js",
|
|
459
452
|
message: "You are calling concat on a terminating link, which will have no effect %o"
|
|
460
453
|
},
|
|
461
454
|
|
|
462
|
-
|
|
455
|
+
36: {
|
|
463
456
|
file: "@apollo/client/link/http/createHttpLink.js",
|
|
464
457
|
message: "Multipart-subscriptions do not support @defer"
|
|
465
458
|
},
|
|
466
459
|
|
|
467
|
-
|
|
460
|
+
40: {
|
|
468
461
|
file: "@apollo/client/link/utils/toPromise.js",
|
|
469
462
|
message: "Promise Wrapper does not support multiple results from Observable"
|
|
470
463
|
},
|
|
471
464
|
|
|
472
|
-
|
|
465
|
+
48: {
|
|
473
466
|
file: "@apollo/client/react/hooks/useQuery.js",
|
|
474
467
|
message: "Calling default no-op implementation of InternalState#forceUpdate"
|
|
475
468
|
},
|
|
476
469
|
|
|
477
|
-
|
|
470
|
+
50: {
|
|
478
471
|
file: "@apollo/client/react/hooks/useSubscription.js",
|
|
479
472
|
message: "'useSubscription' supports only the 'onSubscriptionData' or 'onData' option, but not both. Only the 'onData' option will be used."
|
|
480
473
|
},
|
|
481
474
|
|
|
482
|
-
|
|
475
|
+
51: {
|
|
483
476
|
file: "@apollo/client/react/hooks/useSubscription.js",
|
|
484
477
|
message: "'onSubscriptionData' is deprecated and will be removed in a future major version. Please use the 'onData' option instead."
|
|
485
478
|
},
|
|
486
479
|
|
|
487
|
-
|
|
480
|
+
52: {
|
|
488
481
|
file: "@apollo/client/react/hooks/useSubscription.js",
|
|
489
482
|
message: "'useSubscription' supports only the 'onSubscriptionComplete' or 'onComplete' option, but not both. Only the 'onComplete' option will be used."
|
|
490
483
|
},
|
|
491
484
|
|
|
492
|
-
|
|
485
|
+
53: {
|
|
493
486
|
file: "@apollo/client/react/hooks/useSubscription.js",
|
|
494
487
|
message: "'onSubscriptionComplete' is deprecated and will be removed in a future major version. Please use the 'onComplete' option instead."
|
|
495
488
|
},
|
|
496
489
|
|
|
497
|
-
|
|
490
|
+
56: {
|
|
498
491
|
file: "@apollo/client/react/hooks/useSuspenseQuery.js",
|
|
499
492
|
message: 'Using `returnPartialData` with a `no-cache` fetch policy has no effect. To read partial data from the cache, consider using an alternate fetch policy.'
|
|
500
493
|
},
|
|
501
494
|
|
|
502
|
-
|
|
495
|
+
82: {
|
|
503
496
|
file: "@apollo/client/utilities/graphql/transform.js",
|
|
504
497
|
|
|
505
498
|
message: 'Removing an @connection directive even though it does not have a key. ' +
|
|
@@ -513,28 +506,28 @@ const devError = {
|
|
|
513
506
|
message: "Missing field '%s' while writing result %o"
|
|
514
507
|
},
|
|
515
508
|
|
|
516
|
-
|
|
509
|
+
19: {
|
|
517
510
|
file: "@apollo/client/core/ObservableQuery.js",
|
|
518
511
|
message: 'Unhandled GraphQL subscription error'
|
|
519
512
|
},
|
|
520
513
|
|
|
521
|
-
|
|
514
|
+
21: {
|
|
522
515
|
file: "@apollo/client/core/ObservableQuery.js",
|
|
523
516
|
message: 'Unhandled error'
|
|
524
517
|
},
|
|
525
518
|
|
|
526
|
-
|
|
519
|
+
57: {
|
|
527
520
|
file: "@apollo/client/react/hooks/useSyncExternalStore.js",
|
|
528
521
|
message: 'The result of getSnapshot should be cached to avoid an infinite loop'
|
|
529
522
|
},
|
|
530
523
|
|
|
531
|
-
|
|
524
|
+
81: {
|
|
532
525
|
file: "@apollo/client/utilities/graphql/transform.js",
|
|
533
526
|
message: "Could not find operation or fragment"
|
|
534
527
|
}
|
|
535
528
|
};
|
|
536
529
|
|
|
537
|
-
var version = '3.8.0-beta.
|
|
530
|
+
var version = '3.8.0-beta.7';
|
|
538
531
|
|
|
539
532
|
function maybe(thunk) {
|
|
540
533
|
try {
|
|
@@ -546,8 +539,7 @@ function maybe(thunk) {
|
|
|
546
539
|
var global$1 = (maybe(function () { return globalThis; }) ||
|
|
547
540
|
maybe(function () { return window; }) ||
|
|
548
541
|
maybe(function () { return self; }) ||
|
|
549
|
-
maybe(function () { return global; }) ||
|
|
550
|
-
maybe(function () { return maybe.constructor("return this")(); }));
|
|
542
|
+
maybe(function () { return global; }) || maybe(function () { return maybe.constructor("return this")(); }));
|
|
551
543
|
|
|
552
544
|
var prefixCounts = new Map();
|
|
553
545
|
function makeUniqueId(prefix) {
|