@apollo/client 4.1.0-alpha.2 → 4.1.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +94 -0
- package/__cjs/cache/core/cache.cjs +148 -50
- package/__cjs/cache/core/cache.cjs.map +1 -1
- package/__cjs/cache/core/cache.d.cts +72 -23
- package/__cjs/cache/core/types/common.cjs.map +1 -1
- package/__cjs/cache/core/types/common.d.cts +1 -1
- package/__cjs/cache/inmemory/fragmentRegistry.cjs +1 -1
- package/__cjs/cache/inmemory/fragmentRegistry.cjs.map +1 -1
- package/__cjs/cache/inmemory/inMemoryCache.cjs +12 -1
- package/__cjs/cache/inmemory/inMemoryCache.cjs.map +1 -1
- package/__cjs/core/ApolloClient.cjs +24 -27
- package/__cjs/core/ApolloClient.cjs.map +1 -1
- package/__cjs/core/ApolloClient.d.cts +94 -5
- package/__cjs/core/ObservableQuery.cjs +8 -4
- package/__cjs/core/ObservableQuery.cjs.map +1 -1
- package/__cjs/core/ObservableQuery.d.cts +2 -2
- package/__cjs/core/QueryManager.cjs +1 -1
- package/__cjs/core/QueryManager.cjs.map +1 -1
- package/__cjs/dev/setErrorMessageHandler.cjs.map +1 -1
- package/__cjs/dev/setErrorMessageHandler.d.cts +1 -1
- package/__cjs/incremental/handlers/defer20220824.cjs +6 -2
- package/__cjs/incremental/handlers/defer20220824.cjs.map +1 -1
- package/__cjs/incremental/handlers/defer20220824.d.cts +0 -2
- package/__cjs/incremental/handlers/graphql17Alpha9.cjs +9 -3
- package/__cjs/incremental/handlers/graphql17Alpha9.cjs.map +1 -1
- package/__cjs/link/schema/index.cjs +1 -1
- package/__cjs/link/schema/index.cjs.map +1 -1
- package/__cjs/link/schema/index.d.cts +1 -1
- package/__cjs/link/subscriptions/index.cjs +2 -1
- package/__cjs/link/subscriptions/index.cjs.map +1 -1
- package/__cjs/masking/maskDefinition.cjs +1 -1
- package/__cjs/masking/maskDefinition.cjs.map +1 -1
- package/__cjs/masking/types.d.cts +2 -1
- package/__cjs/react/hooks/internal/index.cjs +3 -1
- package/__cjs/react/hooks/internal/index.cjs.map +1 -1
- package/__cjs/react/hooks/internal/index.d.cts +1 -0
- package/__cjs/react/hooks/internal/useDeepMemo.cjs +2 -0
- package/__cjs/react/hooks/internal/useDeepMemo.cjs.map +1 -1
- package/__cjs/react/hooks/internal/useRenderGuard.cjs +1 -1
- package/__cjs/react/hooks/internal/useRenderGuard.cjs.map +1 -1
- package/__cjs/react/hooks/internal/useSuspenseHookCacheKey.cjs +28 -0
- package/__cjs/react/hooks/internal/useSuspenseHookCacheKey.cjs.map +1 -0
- package/__cjs/react/hooks/internal/useSuspenseHookCacheKey.d.cts +11 -0
- package/__cjs/react/hooks/useBackgroundQuery.cjs +3 -11
- package/__cjs/react/hooks/useBackgroundQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useFragment.cjs +38 -87
- package/__cjs/react/hooks/useFragment.cjs.map +1 -1
- package/__cjs/react/hooks/useFragment.d.cts +65 -6
- package/__cjs/react/hooks/useLazyQuery.cjs +2 -0
- package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useLazyQuery.d.cts +1 -1
- package/__cjs/react/hooks/useMutation.d.cts +3 -1
- package/__cjs/react/hooks/useQuery.cjs +1 -4
- package/__cjs/react/hooks/useQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useQuery.d.cts +2 -2
- package/__cjs/react/hooks/useQueryRefHandlers.cjs +1 -3
- package/__cjs/react/hooks/useQueryRefHandlers.cjs.map +1 -1
- package/__cjs/react/hooks/useReactiveVar.cjs +2 -1
- package/__cjs/react/hooks/useReactiveVar.cjs.map +1 -1
- package/__cjs/react/hooks/useReactiveVar.d.cts +2 -1
- package/__cjs/react/hooks/useReadQuery.cjs +1 -3
- package/__cjs/react/hooks/useReadQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useReadQuery.d.cts +1 -1
- package/__cjs/react/hooks/useSubscription.cjs +1 -1
- package/__cjs/react/hooks/useSubscription.cjs.map +1 -1
- package/__cjs/react/hooks/useSuspenseFragment.cjs +16 -16
- package/__cjs/react/hooks/useSuspenseFragment.cjs.map +1 -1
- package/__cjs/react/hooks/useSuspenseFragment.d.cts +33 -7
- package/__cjs/react/hooks/useSuspenseQuery.cjs +6 -12
- package/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useSuspenseQuery.d.cts +1 -1
- package/__cjs/react/hooks/useSyncExternalStore.cjs +1 -1
- package/__cjs/react/hooks/useSyncExternalStore.cjs.map +1 -1
- package/__cjs/react/internal/cache/FragmentReference.cjs +3 -22
- package/__cjs/react/internal/cache/FragmentReference.cjs.map +1 -1
- package/__cjs/react/internal/cache/FragmentReference.d.cts +2 -4
- package/__cjs/react/internal/cache/QueryReference.cjs +1 -1
- package/__cjs/react/internal/cache/QueryReference.cjs.map +1 -1
- package/__cjs/react/internal/cache/QueryReference.d.cts +4 -0
- package/__cjs/react/internal/cache/SuspenseCache.cjs.map +1 -1
- package/__cjs/react/internal/cache/SuspenseCache.d.cts +1 -1
- package/__cjs/react/internal/cache/types.d.cts +2 -2
- package/__cjs/react/ssr/useSSRQuery.cjs +1 -0
- package/__cjs/react/ssr/useSSRQuery.cjs.map +1 -1
- package/__cjs/react/types/types.documentation.d.cts +4 -16
- package/__cjs/testing/core/mocking/mockLink.cjs +2 -2
- package/__cjs/testing/core/mocking/mockLink.cjs.map +1 -1
- package/__cjs/testing/core/mocking/mockLink.d.cts +3 -1
- package/__cjs/utilities/DeepPartial.cjs.map +1 -1
- package/__cjs/utilities/DeepPartial.d.cts +1 -1
- package/__cjs/utilities/internal/combineLatestBatched.cjs +71 -0
- package/__cjs/utilities/internal/combineLatestBatched.cjs.map +1 -0
- package/__cjs/utilities/internal/combineLatestBatched.d.cts +14 -0
- package/__cjs/utilities/internal/getMemoryInternals.cjs.map +1 -1
- package/__cjs/utilities/internal/index.cjs +4 -2
- package/__cjs/utilities/internal/index.cjs.map +1 -1
- package/__cjs/utilities/internal/index.d.cts +1 -0
- package/__cjs/utilities/internal/types/DocumentationTypes.d.cts +1 -1
- package/__cjs/version.cjs +1 -1
- package/cache/core/cache.d.ts +72 -23
- package/cache/core/cache.js +151 -53
- package/cache/core/cache.js.map +1 -1
- package/cache/core/types/common.d.ts +1 -1
- package/cache/core/types/common.js.map +1 -1
- package/cache/inmemory/fragmentRegistry.js +1 -1
- package/cache/inmemory/fragmentRegistry.js.map +1 -1
- package/cache/inmemory/inMemoryCache.js +12 -1
- package/cache/inmemory/inMemoryCache.js.map +1 -1
- package/core/ApolloClient.d.ts +94 -5
- package/core/ApolloClient.js +24 -27
- package/core/ApolloClient.js.map +1 -1
- package/core/ObservableQuery.d.ts +2 -2
- package/core/ObservableQuery.js +8 -4
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryManager.js +1 -1
- package/core/QueryManager.js.map +1 -1
- package/dev/setErrorMessageHandler.d.ts +1 -1
- package/dev/setErrorMessageHandler.js.map +1 -1
- package/incremental/handlers/defer20220824.d.ts +0 -2
- package/incremental/handlers/defer20220824.js +6 -2
- package/incremental/handlers/defer20220824.js.map +1 -1
- package/incremental/handlers/graphql17Alpha9.js +9 -3
- package/incremental/handlers/graphql17Alpha9.js.map +1 -1
- package/link/schema/index.d.ts +1 -1
- package/link/schema/index.js +1 -1
- package/link/schema/index.js.map +1 -1
- package/link/subscriptions/index.js +2 -1
- package/link/subscriptions/index.js.map +1 -1
- package/masking/internal/types.js.map +1 -1
- package/masking/maskDefinition.js +1 -1
- package/masking/maskDefinition.js.map +1 -1
- package/masking/types.d.ts +2 -1
- package/masking/types.js.map +1 -1
- package/package.json +1 -1
- package/react/hooks/internal/index.d.ts +1 -0
- package/react/hooks/internal/index.js +1 -0
- package/react/hooks/internal/index.js.map +1 -1
- package/react/hooks/internal/useDeepMemo.js +2 -0
- package/react/hooks/internal/useDeepMemo.js.map +1 -1
- package/react/hooks/internal/useRenderGuard.js +1 -1
- package/react/hooks/internal/useRenderGuard.js.map +1 -1
- package/react/hooks/internal/useSuspenseHookCacheKey.d.ts +11 -0
- package/react/hooks/internal/useSuspenseHookCacheKey.js +24 -0
- package/react/hooks/internal/useSuspenseHookCacheKey.js.map +1 -0
- package/react/hooks/useBackgroundQuery.js +4 -12
- package/react/hooks/useBackgroundQuery.js.map +1 -1
- package/react/hooks/useFragment.d.ts +65 -6
- package/react/hooks/useFragment.js +38 -87
- package/react/hooks/useFragment.js.map +1 -1
- package/react/hooks/useLazyQuery.d.ts +1 -1
- package/react/hooks/useLazyQuery.js +2 -0
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/react/hooks/useMutation.d.ts +3 -1
- package/react/hooks/useQuery.d.ts +1 -1
- package/react/hooks/useQuery.js +1 -4
- package/react/hooks/useQuery.js.map +1 -1
- package/react/hooks/useQueryRefHandlers.js +1 -3
- package/react/hooks/useQueryRefHandlers.js.map +1 -1
- package/react/hooks/useReactiveVar.d.ts +2 -1
- package/react/hooks/useReactiveVar.js +2 -1
- package/react/hooks/useReactiveVar.js.map +1 -1
- package/react/hooks/useReadQuery.d.ts +1 -1
- package/react/hooks/useReadQuery.js +1 -3
- package/react/hooks/useReadQuery.js.map +1 -1
- package/react/hooks/useSubscription.js +1 -1
- package/react/hooks/useSubscription.js.map +1 -1
- package/react/hooks/useSuspenseFragment.d.ts +33 -7
- package/react/hooks/useSuspenseFragment.js +17 -17
- package/react/hooks/useSuspenseFragment.js.map +1 -1
- package/react/hooks/useSuspenseQuery.d.ts +1 -1
- package/react/hooks/useSuspenseQuery.js +7 -13
- package/react/hooks/useSuspenseQuery.js.map +1 -1
- package/react/hooks/useSyncExternalStore.js +1 -1
- package/react/hooks/useSyncExternalStore.js.map +1 -1
- package/react/hooks-compiled/internal/index.d.ts +1 -0
- package/react/hooks-compiled/internal/index.js +1 -0
- package/react/hooks-compiled/internal/index.js.map +1 -1
- package/react/hooks-compiled/internal/useDeepMemo.js +2 -0
- package/react/hooks-compiled/internal/useDeepMemo.js.map +1 -1
- package/react/hooks-compiled/internal/useRenderGuard.js +1 -1
- package/react/hooks-compiled/internal/useRenderGuard.js.map +1 -1
- package/react/hooks-compiled/internal/useSuspenseHookCacheKey.d.ts +11 -0
- package/react/hooks-compiled/internal/useSuspenseHookCacheKey.js +71 -0
- package/react/hooks-compiled/internal/useSuspenseHookCacheKey.js.map +1 -0
- package/react/hooks-compiled/useBackgroundQuery.js +6 -14
- package/react/hooks-compiled/useBackgroundQuery.js.map +1 -1
- package/react/hooks-compiled/useFragment.d.ts +65 -6
- package/react/hooks-compiled/useFragment.js +110 -88
- package/react/hooks-compiled/useFragment.js.map +1 -1
- package/react/hooks-compiled/useLazyQuery.d.ts +1 -1
- package/react/hooks-compiled/useLazyQuery.js +2 -0
- package/react/hooks-compiled/useLazyQuery.js.map +1 -1
- package/react/hooks-compiled/useLoadableQuery.js +69 -75
- package/react/hooks-compiled/useMutation.d.ts +3 -1
- package/react/hooks-compiled/useMutation.js +0 -12
- package/react/hooks-compiled/useMutation.js.map +1 -1
- package/react/hooks-compiled/useQuery.d.ts +1 -1
- package/react/hooks-compiled/useQuery.js +44 -56
- package/react/hooks-compiled/useQuery.js.map +1 -1
- package/react/hooks-compiled/useQueryRefHandlers.js +1 -5
- package/react/hooks-compiled/useQueryRefHandlers.js.map +1 -1
- package/react/hooks-compiled/useReactiveVar.d.ts +2 -1
- package/react/hooks-compiled/useReactiveVar.js +2 -1
- package/react/hooks-compiled/useReactiveVar.js.map +1 -1
- package/react/hooks-compiled/useReadQuery.d.ts +1 -1
- package/react/hooks-compiled/useReadQuery.js +77 -14
- package/react/hooks-compiled/useReadQuery.js.map +1 -1
- package/react/hooks-compiled/useSubscription.js +237 -93
- package/react/hooks-compiled/useSubscription.js.map +1 -1
- package/react/hooks-compiled/useSuspenseFragment.d.ts +33 -7
- package/react/hooks-compiled/useSuspenseFragment.js +17 -17
- package/react/hooks-compiled/useSuspenseFragment.js.map +1 -1
- package/react/hooks-compiled/useSuspenseQuery.d.ts +1 -1
- package/react/hooks-compiled/useSuspenseQuery.js +9 -19
- package/react/hooks-compiled/useSuspenseQuery.js.map +1 -1
- package/react/hooks-compiled/useSyncExternalStore.js +1 -1
- package/react/hooks-compiled/useSyncExternalStore.js.map +1 -1
- package/react/index.compiled.d.ts +1 -1
- package/react/index.compiled.js +1 -1
- package/react/index.compiled.js.map +1 -1
- package/react/internal/cache/FragmentReference.d.ts +2 -4
- package/react/internal/cache/FragmentReference.js +3 -22
- package/react/internal/cache/FragmentReference.js.map +1 -1
- package/react/internal/cache/QueryReference.d.ts +4 -0
- package/react/internal/cache/QueryReference.js +1 -1
- package/react/internal/cache/QueryReference.js.map +1 -1
- package/react/internal/cache/SuspenseCache.d.ts +1 -1
- package/react/internal/cache/SuspenseCache.js.map +1 -1
- package/react/internal/cache/types.d.ts +2 -2
- package/react/internal/cache/types.js.map +1 -1
- package/react/ssr/useSSRQuery.js +1 -0
- package/react/ssr/useSSRQuery.js.map +1 -1
- package/react/types/types.documentation.d.ts +4 -16
- package/react/types/types.documentation.js.map +1 -1
- package/testing/core/mocking/mockLink.d.ts +3 -1
- package/testing/core/mocking/mockLink.js +2 -2
- package/testing/core/mocking/mockLink.js.map +1 -1
- package/utilities/DeepPartial.d.ts +1 -1
- package/utilities/DeepPartial.js.map +1 -1
- package/utilities/internal/combineLatestBatched.d.ts +14 -0
- package/utilities/internal/combineLatestBatched.js +68 -0
- package/utilities/internal/combineLatestBatched.js.map +1 -0
- package/utilities/internal/getMemoryInternals.js.map +1 -1
- package/utilities/internal/globals/global.js +2 -2
- package/utilities/internal/globals/global.js.map +1 -1
- package/utilities/internal/index.d.ts +1 -0
- package/utilities/internal/index.js +1 -0
- package/utilities/internal/index.js.map +1 -1
- package/utilities/internal/types/DocumentationTypes.d.ts +1 -1
- package/version.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.documentation.js","sourceRoot":"","sources":["../../../src/react/types/types.documentation.ts"],"names":[],"mappings":"","sourcesContent":["export interface QueryOptionsDocumentation {\n /**\n * A GraphQL query string parsed into an AST with the gql template literal.\n *\n * @docGroup 1. Operation options\n */\n query: unknown;\n\n /**\n * An object containing all of the GraphQL variables your query requires to execute.\n *\n * Each key in the object corresponds to a variable name, and that key's value corresponds to the variable value.\n *\n * @docGroup 1. Operation options\n */\n variables: unknown;\n\n /**\n * Specifies how the query handles a response that returns both GraphQL errors and partial results.\n *\n * For details, see [GraphQL error policies](https://www.apollographql.com/docs/react/data/error-handling/#graphql-error-policies).\n *\n * The default value is `none`, meaning that the query result includes error details but not partial results.\n *\n * @docGroup 1. Operation options\n */\n errorPolicy: unknown;\n\n /**\n * If you're using [Apollo Link](https://www.apollographql.com/docs/react/api/link/introduction/), this object is the initial value of the `context` object that's passed along your link chain.\n *\n * @docGroup 2. Networking options\n */\n context: unknown;\n\n /**\n * Specifies how the query interacts with the Apollo Client cache during execution (for example, whether it checks the cache for results before sending a request to the server).\n *\n * For details, see [Setting a fetch policy](https://www.apollographql.com/docs/react/data/queries/#setting-a-fetch-policy).\n *\n * The default value is `cache-first`.\n *\n * @docGroup 3. Caching options\n */\n fetchPolicy: unknown;\n\n /**\n * Specifies the `FetchPolicy` to be used after this query has completed.\n *\n * @docGroup 3. Caching options\n */\n nextFetchPolicy: unknown;\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 * @docGroup 3. Caching options\n */\n initialFetchPolicy: unknown;\n\n /**\n * Specifies the interval (in milliseconds) at which the query polls for updated results.\n *\n * The default value is `0` (no polling).\n *\n * @docGroup 2. Networking options\n */\n pollInterval: unknown;\n\n /**\n * If `true`, the in-progress query's associated component re-renders whenever the network status changes or a network error occurs.\n *\n * The default value is `true`.\n *\n * @docGroup 2. Networking options\n */\n notifyOnNetworkStatusChange: unknown;\n\n /**\n * If `true`, the query can return partial results from the cache if the cache doesn't contain results for all queried fields.\n *\n * The default value is `false`.\n *\n * @docGroup 3. Caching options\n */\n returnPartialData: unknown;\n\n /**\n * Specifies whether a `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 * @docGroup 3. Caching options\n */\n refetchWritePolicy: unknown;\n\n /**\n * Watched queries must opt into overwriting existing data on refetch, by passing refetchWritePolicy: \"overwrite\" in their WatchQueryOptions.\n *\n * The default value is \"overwrite\".\n *\n * @docGroup 3. Caching options\n */\n refetchWritePolicy_suspense: unknown;\n\n /**\n * If true, the query is not executed.\n *\n * The default value is `false`.\n *\n * @docGroup 1. Operation options\n */\n skip: unknown;\n\n /**\n * If `true`, the query is not executed. The default value is `false`.\n *\n * @deprecated We recommend using `skipToken` in place of the `skip` option as\n * it is more type-safe.\n *\n * This option is deprecated and only supported to ease the migration from `useQuery`. It will be removed in a future release.\n * Please use [`skipToken`](https://www.apollographql.com/docs/react/api/react/hooks#skiptoken) instead of the `skip` option as it is more type-safe.\n *\n * @docGroup 1. Operation options\n */\n skip_deprecated: unknown;\n\n /**\n * The instance of `ApolloClient` to use to execute the query.\n *\n * By default, the instance that's passed down via context is used, but you\n * can provide a different instance here.\n *\n * @docGroup 1. Operation options\n */\n client: unknown;\n\n /**\n * A unique identifier for the query. Each item in the array must be a stable\n * identifier to prevent infinite fetches.\n *\n * This is useful when using the same query and variables combination in more\n * than one component, otherwise the components may clobber each other. This\n * can also be used to force the query to re-evaluate fresh.\n *\n * @docGroup 1. Operation options\n */\n queryKey: unknown;\n\n /**\n * Pass `false` to skip executing the query during [server-side rendering](https://www.apollographql.com/docs/react/performance/server-side-rendering/).\n *\n * @docGroup 2. Networking options\n */\n ssr: unknown;\n\n /**\n * A callback function that's called whenever a refetch attempt occurs\n * while polling. If the function returns `true`, the refetch is\n * skipped and not reattempted until the next poll interval.\n *\n * @docGroup 2. Networking options\n */\n skipPollAttempt: unknown;\n}\n\nexport interface QueryResultDocumentation {\n /**\n * The instance of Apollo Client that executed the query.\n * Can be useful for manually executing followup queries or writing data to the cache.\n *\n * @docGroup 2. Network info\n */\n client: unknown;\n /**\n * A reference to the internal `ObservableQuery` used by the hook.\n */\n observable: unknown;\n /**\n * An object containing the result of your GraphQL query after it completes.\n *\n * This value might be `undefined` if a query results in one or more errors (depending on the query's `errorPolicy`).\n *\n * @docGroup 1. Operation data\n */\n data: unknown;\n /**\n * An object containing the result from the most recent _previous_ execution of this query.\n *\n * This value is `undefined` if this is the query's first execution.\n *\n * @docGroup 1. Operation data\n */\n previousData: unknown;\n /**\n * A single ErrorLike object describing the error that occured during the latest\n * query execution.\n *\n * For more information, see [Handling operation errors](https://www.apollographql.com/docs/react/data/error-handling/).\n *\n * @docGroup 1. Operation data\n */\n error: unknown;\n /**\n * If `true`, the query is still in flight.\n *\n * @docGroup 2. Network info\n */\n loading: unknown;\n /**\n * A number indicating the current network state of the query's associated request. [See possible values.](https://github.com/apollographql/apollo-client/blob/d96f4578f89b933c281bb775a39503f6cdb59ee8/src/core/networkStatus.ts#L4)\n *\n * Used in conjunction with the [`notifyOnNetworkStatusChange`](#notifyonnetworkstatuschange) option.\n *\n * @docGroup 2. Network info\n */\n networkStatus: unknown;\n /**\n * An object containing the variables that were provided for the query.\n *\n * @docGroup 1. Operation data\n */\n variables: unknown;\n\n /**\n * A function that enables you to re-execute the query, optionally passing in new `variables`.\n *\n * To guarantee that the refetch performs a network request, its `fetchPolicy` is set to `network-only` (unless the original query's `fetchPolicy` is `no-cache` or `cache-and-network`, which also guarantee a network request).\n *\n * See also [Refetching](https://www.apollographql.com/docs/react/data/queries/#refetching).\n *\n * Returns a `ResultPromise` with an additional `.retain()` method. Calling\n * `.retain()` keeps the network operation running even if the `ObservableQuery`\n * no longer requires the result.\n *\n * @docGroup 3. Helper functions\n */\n refetch: unknown;\n /**\n * {@inheritDoc @apollo/client!ObservableQuery#fetchMore:member(1)}\n *\n * @docGroup 3. Helper functions\n */\n fetchMore: unknown;\n /**\n * {@inheritDoc @apollo/client!ObservableQuery#startPolling:member(1)}\n *\n * @docGroup 3. Helper functions\n */\n startPolling: unknown;\n /**\n * {@inheritDoc @apollo/client!ObservableQuery#stopPolling:member(1)}\n *\n * @docGroup 3. Helper functions\n */\n stopPolling: unknown;\n /**\n * {@inheritDoc @apollo/client!ObservableQuery#subscribeToMore:member(1)}\n *\n * @docGroup 3. Helper functions\n */\n subscribeToMore: unknown;\n /**\n * {@inheritDoc @apollo/client!ObservableQuery#updateQuery:member(1)}\n *\n * @docGroup 3. Helper functions\n */\n updateQuery: unknown;\n\n /**\n * Describes the completeness of `data`.\n *\n * - `empty`: No data could be fulfilled from the cache or the result is\n * incomplete. `data` is `undefined`.\n * - `partial`: Some data could be fulfilled from the cache but `data` is\n * incomplete. This is only possible when `returnPartialData` is `true`.\n * - `streaming`: `data` is incomplete as a result of a deferred query and\n * the result is still streaming in.\n * - `complete`: `data` is a fully satisfied query result fulfilled\n * either from the cache or network.\n *\n * @docGroup 1. Operation data\n */\n dataState: unknown;\n\n /**\n * Describes whether `data` is a complete or partial result. This flag is only\n * set when `returnPartialData` is `true` in query options.\n *\n * @deprecated This field will be removed in a future version of Apollo Client.\n * @docGroup 1. Operation data\n */\n partial: boolean;\n}\n\nexport interface MutationOptionsDocumentation {\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 * @docGroup 1. Operation options\n */\n mutation: unknown;\n\n /**\n * Provide `no-cache` if the mutation's result should _not_ be written to the Apollo Client cache.\n *\n * The default value is `network-only` (which means the result _is_ written to the cache).\n *\n * Unlike queries, mutations _do not_ support [fetch policies](https://www.apollographql.com/docs/react/data/queries/#setting-a-fetch-policy) besides `network-only` and `no-cache`.\n *\n * @docGroup 3. Caching options\n */\n fetchPolicy: unknown;\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: unknown;\n\n /**\n * By providing either an object or a callback function that, when invoked after\n * a mutation, allows you to return optimistic data and optionally skip updates\n * via the `IGNORE` sentinel object, Apollo Client caches this temporary\n * (and potentially incorrect) response until the mutation completes, enabling\n * more responsive UI updates.\n *\n * For more information, see [Optimistic mutation results](https://www.apollographql.com/docs/react/performance/optimistic-ui/).\n *\n * @docGroup 3. Caching options\n */\n optimisticResponse: unknown;\n\n /**\n * A `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: unknown;\n\n /**\n * An array (or a function that _returns_ an array) that specifies which queries you want to refetch after the mutation occurs.\n *\n * Each array value can be either:\n *\n * - An object containing the `query` to execute, along with any `variables`\n *\n * - A string indicating the operation name of the query to refetch\n *\n * @docGroup 1. Operation options\n */\n refetchQueries: unknown;\n\n /**\n * If `true`, makes sure all queries included in `refetchQueries` are completed before the mutation is considered complete.\n *\n * The default value is `false` (queries are refetched asynchronously).\n *\n * @docGroup 1. Operation options\n */\n awaitRefetchQueries: unknown;\n\n /**\n * A function used to update the Apollo Client cache after the mutation completes.\n *\n * For more information, see [Updating the cache after a mutation](https://www.apollographql.com/docs/react/data/mutations#updating-the-cache-after-a-mutation).\n *\n * @docGroup 3. Caching options\n */\n update: unknown;\n\n /**\n * Optional callback for intercepting queries whose cache data has been updated by the mutation, as well as any queries specified in the `refetchQueries: [...]` list passed to `client.mutate`.\n *\n * Returning a `Promise` from `onQueryUpdated` will cause the final mutation `Promise` to await the returned `Promise`. Returning `false` causes the query to be ignored.\n *\n * @docGroup 1. Operation options\n */\n onQueryUpdated: unknown;\n\n /**\n * Specifies how the mutation handles a response that returns both GraphQL errors and partial results.\n *\n * For details, see [GraphQL error policies](https://www.apollographql.com/docs/react/data/error-handling/#graphql-error-policies).\n *\n * The default value is `none`, meaning that the mutation result includes error details but _not_ partial results.\n *\n * @docGroup 1. Operation options\n */\n errorPolicy: unknown;\n\n /**\n * An object containing all of the GraphQL variables your mutation requires to execute.\n *\n * Each key in the object corresponds to a variable name, and that key's value corresponds to the variable value.\n *\n * @docGroup 1. Operation options\n */\n variables: unknown;\n\n /**\n * If you're using [Apollo Link](https://www.apollographql.com/docs/react/api/link/introduction/), this object is the initial value of the `context` object that's passed along your link chain.\n *\n * @docGroup 2. Networking options\n */\n context: unknown;\n\n /**\n * The instance of `ApolloClient` to use to execute the mutation.\n *\n * By default, the instance that's passed down via context is used, but you can provide a different instance here.\n *\n * @docGroup 2. Networking options\n */\n client: unknown;\n /**\n * If `true`, the in-progress mutation's associated component re-renders whenever the network status changes or a network error occurs.\n *\n * The default value is `true`.\n *\n * @docGroup 2. Networking options\n */\n notifyOnNetworkStatusChange: unknown;\n /**\n * A callback function that's called when your mutation successfully completes with zero errors (or if `errorPolicy` is `ignore` and partial data is returned).\n *\n * This function is passed the mutation's result `data` and any options passed to the mutation.\n *\n * @docGroup 1. Operation options\n */\n onCompleted: unknown;\n /**\n * A callback function that's called when the mutation encounters one or more errors (unless `errorPolicy` is `ignore`).\n *\n * This function is passed an [`ApolloError`](https://github.com/apollographql/apollo-client/blob/d96f4578f89b933c281bb775a39503f6cdb59ee8/src/errors/index.ts#L36-L39) object that contains either a `networkError` object or a `graphQLErrors` array, depending on the error(s) that occurred, as well as any options passed the mutation.\n *\n * @docGroup 1. Operation options\n */\n onError: unknown;\n /**\n * If `true`:\n *\n * - The initial state update (setting loading to true) is skipped\n * - The success state update (setting data and setting loading to false) is skipped\n * - Error updates will still occur\n *\n * The default value is `false`.\n *\n * This option is useful when you want to execute a mutation but don't need to track its progress or result in the UI, potentially improving performance by reducing re-renders.\n *\n * @docGroup 1. Operation options\n */\n ignoreResults: unknown;\n}\n\nexport interface MutationResultDocumentation {\n /**\n * The data returned from your mutation. Can be `undefined` if `ignoreResults` is `true`.\n */\n data: unknown;\n /**\n * If the mutation produces one or more errors, this object contains either an array of `graphQLErrors` or a single `networkError`. Otherwise, this value is `undefined`.\n *\n * For more information, see [Handling operation errors](https://www.apollographql.com/docs/react/data/error-handling/).\n */\n error: unknown;\n /**\n * If `true`, the mutation is currently in flight.\n */\n loading: unknown;\n /**\n * If `true`, the mutation's mutate function has been called.\n */\n called: unknown;\n /**\n * The instance of Apollo Client that executed the mutation.\n *\n * Can be useful for manually executing followup operations or writing data to the cache.\n */\n client: unknown;\n /**\n * A function that you can call to reset the mutation's result to its initial, uncalled state.\n */\n reset: unknown;\n /**\n * Custom extensions returned from the GraphQL server\n */\n extensions: unknown;\n}\n\nexport interface SubscriptionOptionsDocumentation {\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: unknown;\n /**\n * An object containing all of the variables your subscription needs to execute\n */\n variables: unknown;\n\n /**\n * Specifies the `ErrorPolicy` to be used for this operation\n */\n errorPolicy: unknown;\n\n /**\n * How you want your component to interact with the Apollo cache. For details, see [Setting a fetch policy](https://www.apollographql.com/docs/react/data/queries/#setting-a-fetch-policy).\n */\n fetchPolicy: unknown;\n\n /**\n * Determines if your subscription should be unsubscribed and subscribed again when an input to the hook (such as `subscription` or `variables`) changes.\n */\n shouldResubscribe: unknown;\n\n /**\n * If `true`, the hook will not cause the component to rerender. This is useful when you want to control the rendering of your component yourself with logic in the `onData` and `onError` callbacks.\n *\n * Changing this to `true` when the hook already has `data` will reset the `data` to `undefined`.\n */\n ignoreResults: unknown;\n /**\n * An `ApolloClient` instance. By default `useSubscription` / `Subscription` uses the client passed down via context, but a different client can be passed in.\n */\n client: unknown;\n\n /**\n * Determines if the current subscription should be skipped. Useful if, for example, variables depend on previous queries and are not ready yet.\n */\n skip: unknown;\n\n /**\n * Shared context between your component and your network interface (Apollo Link).\n */\n context: unknown;\n\n /**\n * Shared context between your component and your network interface (Apollo Link).\n */\n extensions: unknown;\n\n /**\n * Allows the registration of a callback function that will be triggered each time the `useSubscription` Hook / `Subscription` component completes the subscription.\n */\n onComplete: unknown;\n\n /**\n * Allows the registration of a callback function that will be triggered each time the `useSubscription` Hook / `Subscription` component receives data. The callback `options` object param consists of the current Apollo Client instance in `client`, and the received subscription data in `data`.\n */\n onData: unknown;\n\n /**\n * Allows the registration of a callback function that will be triggered each time the `useSubscription` Hook / `Subscription` component receives an error.\n */\n onError: unknown;\n}\n\nexport interface SubscriptionResultDocumentation {\n /**\n * A boolean that indicates whether any initial data has been returned\n */\n loading: unknown;\n /**\n * An object containing the result of your GraphQL subscription. Defaults to an empty object.\n */\n data: unknown;\n /**\n * A runtime error with `graphQLErrors` and `networkError` properties\n */\n error: unknown;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.documentation.js","sourceRoot":"","sources":["../../../src/react/types/types.documentation.ts"],"names":[],"mappings":"","sourcesContent":["export interface QueryOptionsDocumentation {\n /**\n * A GraphQL query string parsed into an AST with the gql template literal.\n *\n * @docGroup 1. Operation options\n */\n query: unknown;\n\n /**\n * An object containing all of the GraphQL variables your query requires to execute.\n *\n * Each key in the object corresponds to a variable name, and that key's value corresponds to the variable value.\n *\n * @docGroup 1. Operation options\n */\n variables: unknown;\n\n /**\n * Specifies how the query handles a response that returns both GraphQL errors and partial results.\n *\n * For details, see [GraphQL error policies](https://www.apollographql.com/docs/react/data/error-handling/#graphql-error-policies).\n *\n * The default value is `none`, meaning that the query result includes error details but not partial results.\n *\n * @docGroup 1. Operation options\n */\n errorPolicy: unknown;\n\n /**\n * If you're using [Apollo Link](https://www.apollographql.com/docs/react/api/link/introduction/), this object is the initial value of the `context` object that's passed along your link chain.\n *\n * @docGroup 2. Networking options\n */\n context: unknown;\n\n /**\n * Specifies how the query interacts with the Apollo Client cache during execution (for example, whether it checks the cache for results before sending a request to the server).\n *\n * For details, see [Setting a fetch policy](https://www.apollographql.com/docs/react/data/queries/#setting-a-fetch-policy).\n *\n * The default value is `cache-first`.\n *\n * @docGroup 3. Caching options\n */\n fetchPolicy: unknown;\n\n /**\n * Specifies the `FetchPolicy` to be used after this query has completed.\n *\n * @docGroup 3. Caching options\n */\n nextFetchPolicy: unknown;\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 * @docGroup 3. Caching options\n */\n initialFetchPolicy: unknown;\n\n /**\n * Specifies the interval (in milliseconds) at which the query polls for updated results.\n *\n * The default value is `0` (no polling).\n *\n * @docGroup 2. Networking options\n */\n pollInterval: unknown;\n\n /**\n * If `true`, the in-progress query's associated component re-renders whenever the network status changes or a network error occurs.\n *\n * The default value is `true`.\n *\n * @docGroup 2. Networking options\n */\n notifyOnNetworkStatusChange: unknown;\n\n /**\n * If `true`, the query can return partial results from the cache if the cache doesn't contain results for all queried fields.\n *\n * The default value is `false`.\n *\n * @docGroup 3. Caching options\n */\n returnPartialData: unknown;\n\n /**\n * Specifies whether a `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 * @docGroup 3. Caching options\n */\n refetchWritePolicy: unknown;\n\n /**\n * Watched queries must opt into overwriting existing data on refetch, by passing refetchWritePolicy: \"overwrite\" in their WatchQueryOptions.\n *\n * The default value is \"overwrite\".\n *\n * @docGroup 3. Caching options\n */\n refetchWritePolicy_suspense: unknown;\n\n /**\n * If true, the query is not executed.\n *\n * The default value is `false`.\n *\n * @docGroup 1. Operation options\n */\n skip: unknown;\n\n /**\n * If `true`, the query is not executed. The default value is `false`.\n *\n * @deprecated We recommend using `skipToken` in place of the `skip` option as\n * it is more type-safe.\n *\n * This option is deprecated and only supported to ease the migration from `useQuery`. It will be removed in a future release.\n * Please use [`skipToken`](https://www.apollographql.com/docs/react/api/react/hooks#skiptoken) instead of the `skip` option as it is more type-safe.\n *\n * @docGroup 1. Operation options\n */\n skip_deprecated: unknown;\n\n /**\n * The instance of `ApolloClient` to use to execute the query.\n *\n * By default, the instance that's passed down via context is used, but you\n * can provide a different instance here.\n *\n * @docGroup 1. Operation options\n */\n client: unknown;\n\n /**\n * A unique identifier for the query. Each item in the array must be a stable\n * identifier to prevent infinite fetches.\n *\n * This is useful when using the same query and variables combination in more\n * than one component, otherwise the components may clobber each other. This\n * can also be used to force the query to re-evaluate fresh.\n *\n * @docGroup 1. Operation options\n */\n queryKey: unknown;\n\n /**\n * Pass `false` to skip executing the query during [server-side rendering](https://www.apollographql.com/docs/react/performance/server-side-rendering/).\n *\n * @docGroup 2. Networking options\n */\n ssr: unknown;\n\n /**\n * A callback function that's called whenever a refetch attempt occurs\n * while polling. If the function returns `true`, the refetch is\n * skipped and not reattempted until the next poll interval.\n *\n * @docGroup 2. Networking options\n */\n skipPollAttempt: unknown;\n}\n\nexport interface QueryResultDocumentation {\n /**\n * The instance of Apollo Client that executed the query.\n * Can be useful for manually executing followup queries or writing data to the cache.\n *\n * @docGroup 2. Network info\n */\n client: unknown;\n /**\n * A reference to the internal `ObservableQuery` used by the hook.\n */\n observable: unknown;\n /**\n * An object containing the result of your GraphQL query after it completes.\n *\n * This value might be `undefined` if a query results in one or more errors (depending on the query's `errorPolicy`).\n *\n * @docGroup 1. Operation data\n */\n data: unknown;\n /**\n * An object containing the result from the most recent _previous_ execution of this query.\n *\n * This value is `undefined` if this is the query's first execution.\n *\n * @docGroup 1. Operation data\n */\n previousData: unknown;\n /**\n * A single ErrorLike object describing the error that occurred during the latest\n * query execution.\n *\n * For more information, see [Handling operation errors](https://www.apollographql.com/docs/react/data/error-handling/).\n *\n * @docGroup 1. Operation data\n */\n error: unknown;\n /**\n * If `true`, the query is still in flight.\n *\n * @docGroup 2. Network info\n */\n loading: unknown;\n /**\n * A number indicating the current network state of the query's associated request. [See possible values.](https://github.com/apollographql/apollo-client/blob/d96f4578f89b933c281bb775a39503f6cdb59ee8/src/core/networkStatus.ts#L4)\n *\n * Used in conjunction with the [`notifyOnNetworkStatusChange`](#notifyonnetworkstatuschange) option.\n *\n * @docGroup 2. Network info\n */\n networkStatus: unknown;\n /**\n * An object containing the variables that were provided for the query.\n *\n * @docGroup 1. Operation data\n */\n variables: unknown;\n\n /**\n * A function that enables you to re-execute the query, optionally passing in new `variables`.\n *\n * To guarantee that the refetch performs a network request, its `fetchPolicy` is set to `network-only` (unless the original query's `fetchPolicy` is `no-cache` or `cache-and-network`, which also guarantee a network request).\n *\n * See also [Refetching](https://www.apollographql.com/docs/react/data/queries/#refetching).\n *\n * Returns a `ResultPromise` with an additional `.retain()` method. Calling\n * `.retain()` keeps the network operation running even if the `ObservableQuery`\n * no longer requires the result.\n *\n * @docGroup 3. Helper functions\n */\n refetch: unknown;\n /**\n * {@inheritDoc @apollo/client!ObservableQuery#fetchMore:member(1)}\n *\n * @docGroup 3. Helper functions\n */\n fetchMore: unknown;\n /**\n * {@inheritDoc @apollo/client!ObservableQuery#startPolling:member(1)}\n *\n * @docGroup 3. Helper functions\n */\n startPolling: unknown;\n /**\n * {@inheritDoc @apollo/client!ObservableQuery#stopPolling:member(1)}\n *\n * @docGroup 3. Helper functions\n */\n stopPolling: unknown;\n /**\n * {@inheritDoc @apollo/client!ObservableQuery#subscribeToMore:member(1)}\n *\n * @docGroup 3. Helper functions\n */\n subscribeToMore: unknown;\n /**\n * {@inheritDoc @apollo/client!ObservableQuery#updateQuery:member(1)}\n *\n * @docGroup 3. Helper functions\n */\n updateQuery: unknown;\n\n /**\n * Describes the completeness of `data`.\n *\n * - `empty`: No data could be fulfilled from the cache or the result is\n * incomplete. `data` is `undefined`.\n * - `partial`: Some data could be fulfilled from the cache but `data` is\n * incomplete. This is only possible when `returnPartialData` is `true`.\n * - `streaming`: `data` is incomplete as a result of a deferred query and\n * the result is still streaming in.\n * - `complete`: `data` is a fully satisfied query result fulfilled\n * either from the cache or network.\n *\n * @docGroup 1. Operation data\n */\n dataState: unknown;\n\n /**\n * Describes whether `data` is a complete or partial result. This flag is only\n * set when `returnPartialData` is `true` in query options.\n *\n * @deprecated This field will be removed in a future version of Apollo Client.\n * @docGroup 1. Operation data\n */\n partial: boolean;\n}\n\nexport interface MutationOptionsDocumentation {\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 * @docGroup 1. Operation options\n */\n mutation: unknown;\n\n /**\n * Provide `no-cache` if the mutation's result should _not_ be written to the Apollo Client cache.\n *\n * The default value is `network-only` (which means the result _is_ written to the cache).\n *\n * Unlike queries, mutations _do not_ support [fetch policies](https://www.apollographql.com/docs/react/data/queries/#setting-a-fetch-policy) besides `network-only` and `no-cache`.\n *\n * @docGroup 3. Caching options\n */\n fetchPolicy: unknown;\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: unknown;\n\n /**\n * By providing either an object or a callback function that, when invoked after\n * a mutation, allows you to return optimistic data and optionally skip updates\n * via the `IGNORE` sentinel object, Apollo Client caches this temporary\n * (and potentially incorrect) response until the mutation completes, enabling\n * more responsive UI updates.\n *\n * For more information, see [Optimistic mutation results](https://www.apollographql.com/docs/react/performance/optimistic-ui/).\n *\n * @docGroup 3. Caching options\n */\n optimisticResponse: unknown;\n\n /**\n * A `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: unknown;\n\n /**\n * An array (or a function that _returns_ an array) that specifies which queries you want to refetch after the mutation occurs.\n *\n * Each array value can be either:\n *\n * - An object containing the `query` to execute, along with any `variables`\n *\n * - A string indicating the operation name of the query to refetch\n *\n * @docGroup 1. Operation options\n */\n refetchQueries: unknown;\n\n /**\n * If `true`, makes sure all queries included in `refetchQueries` are completed before the mutation is considered complete.\n *\n * The default value is `false` (queries are refetched asynchronously).\n *\n * @docGroup 1. Operation options\n */\n awaitRefetchQueries: unknown;\n\n /**\n * A function used to update the Apollo Client cache after the mutation completes.\n *\n * For more information, see [Updating the cache after a mutation](https://www.apollographql.com/docs/react/data/mutations#updating-the-cache-after-a-mutation).\n *\n * @docGroup 3. Caching options\n */\n update: unknown;\n\n /**\n * Optional callback for intercepting queries whose cache data has been updated by the mutation, as well as any queries specified in the `refetchQueries: [...]` list passed to `client.mutate`.\n *\n * Returning a `Promise` from `onQueryUpdated` will cause the final mutation `Promise` to await the returned `Promise`. Returning `false` causes the query to be ignored.\n *\n * @docGroup 1. Operation options\n */\n onQueryUpdated: unknown;\n\n /**\n * Specifies how the mutation handles a response that returns both GraphQL errors and partial results.\n *\n * For details, see [GraphQL error policies](https://www.apollographql.com/docs/react/data/error-handling/#graphql-error-policies).\n *\n * The default value is `none`, meaning that the mutation result includes error details but _not_ partial results.\n *\n * @docGroup 1. Operation options\n */\n errorPolicy: unknown;\n\n /**\n * An object containing all of the GraphQL variables your mutation requires to execute.\n *\n * Each key in the object corresponds to a variable name, and that key's value corresponds to the variable value.\n *\n * @docGroup 1. Operation options\n */\n variables: unknown;\n\n /**\n * If you're using [Apollo Link](https://www.apollographql.com/docs/react/api/link/introduction/), this object is the initial value of the `context` object that's passed along your link chain.\n *\n * @docGroup 2. Networking options\n */\n context: unknown;\n\n /**\n * The instance of `ApolloClient` to use to execute the mutation.\n *\n * By default, the instance that's passed down via context is used, but you can provide a different instance here.\n *\n * @docGroup 2. Networking options\n */\n client: unknown;\n /**\n * If `true`, the in-progress mutation's associated component re-renders whenever the network status changes or a network error occurs.\n *\n * The default value is `true`.\n *\n * @docGroup 2. Networking options\n */\n notifyOnNetworkStatusChange: unknown;\n /**\n * A callback function that's called when your mutation successfully completes with zero errors (or if `errorPolicy` is `ignore` and partial data is returned).\n *\n * This function is passed the mutation's result `data` and any options passed to the mutation.\n *\n * @docGroup 1. Operation options\n */\n onCompleted: unknown;\n /**\n * A callback function that's called when the mutation encounters one or more errors (unless `errorPolicy` is `ignore`).\n *\n * This function is passed an [`ApolloError`](https://github.com/apollographql/apollo-client/blob/d96f4578f89b933c281bb775a39503f6cdb59ee8/src/errors/index.ts#L36-L39) object that contains either a `networkError` object or a `graphQLErrors` array, depending on the error(s) that occurred, as well as any options passed the mutation.\n *\n * @docGroup 1. Operation options\n */\n onError: unknown;\n}\n\nexport interface MutationResultDocumentation {\n /**\n * The data returned from your mutation. Can be `undefined` if the `errorPolicy`\n * is `all` or `ignore` and the server returns a GraphQL response with `errors`\n * but not `data` or a network error is returned.\n */\n data: unknown;\n /**\n * If the mutation produces one or more errors, this object contains either an array of `graphQLErrors` or a single `networkError`. Otherwise, this value is `undefined`.\n *\n * For more information, see [Handling operation errors](https://www.apollographql.com/docs/react/data/error-handling/).\n */\n error: unknown;\n /**\n * If `true`, the mutation is currently in flight.\n */\n loading: unknown;\n /**\n * If `true`, the mutation's mutate function has been called.\n */\n called: unknown;\n /**\n * The instance of Apollo Client that executed the mutation.\n *\n * Can be useful for manually executing followup operations or writing data to the cache.\n */\n client: unknown;\n /**\n * A function that you can call to reset the mutation's result to its initial, uncalled state.\n */\n reset: unknown;\n /**\n * Custom extensions returned from the GraphQL server\n */\n extensions: unknown;\n}\n\nexport interface SubscriptionOptionsDocumentation {\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: unknown;\n /**\n * An object containing all of the variables your subscription needs to execute\n */\n variables: unknown;\n\n /**\n * Specifies the `ErrorPolicy` to be used for this operation\n */\n errorPolicy: unknown;\n\n /**\n * How you want your component to interact with the Apollo cache. For details, see [Setting a fetch policy](https://www.apollographql.com/docs/react/data/queries/#setting-a-fetch-policy).\n */\n fetchPolicy: unknown;\n\n /**\n * Determines if your subscription should be unsubscribed and subscribed again when an input to the hook (such as `subscription` or `variables`) changes.\n */\n shouldResubscribe: unknown;\n\n /**\n * If `true`, the hook will not cause the component to rerender. This is useful when you want to control the rendering of your component yourself with logic in the `onData` and `onError` callbacks.\n *\n * Changing this to `true` when the hook already has `data` will reset the `data` to `undefined`.\n */\n ignoreResults: unknown;\n /**\n * An `ApolloClient` instance. By default `useSubscription` / `Subscription` uses the client passed down via context, but a different client can be passed in.\n */\n client: unknown;\n\n /**\n * Determines if the current subscription should be skipped. Useful if, for example, variables depend on previous queries and are not ready yet.\n */\n skip: unknown;\n\n /**\n * Shared context between your component and your network interface (Apollo Link).\n */\n context: unknown;\n\n /**\n * Shared context between your component and your network interface (Apollo Link).\n */\n extensions: unknown;\n\n /**\n * Allows the registration of a callback function that will be triggered each time the `useSubscription` Hook / `Subscription` component completes the subscription.\n */\n onComplete: unknown;\n\n /**\n * Allows the registration of a callback function that will be triggered each time the `useSubscription` Hook / `Subscription` component receives data. The callback `options` object param consists of the current Apollo Client instance in `client`, and the received subscription data in `data`.\n */\n onData: unknown;\n\n /**\n * Allows the registration of a callback function that will be triggered each time the `useSubscription` Hook / `Subscription` component receives an error.\n */\n onError: unknown;\n}\n\nexport interface SubscriptionResultDocumentation {\n /**\n * A boolean that indicates whether any initial data has been returned\n */\n loading: unknown;\n /**\n * An object containing the result of your GraphQL subscription. Defaults to an empty object.\n */\n data: unknown;\n /**\n * A runtime error with `graphQLErrors` and `networkError` properties\n */\n error: unknown;\n}\n"]}
|
|
@@ -22,7 +22,9 @@ export declare namespace MockLink {
|
|
|
22
22
|
query: DocumentNode;
|
|
23
23
|
variables?: TVariables | VariableMatcher<TVariables>;
|
|
24
24
|
}
|
|
25
|
-
interface MockedResponse<
|
|
25
|
+
interface MockedResponse<
|
|
26
|
+
/* @ts-ignore */
|
|
27
|
+
out TData = Record<string, any>, out TVariables extends OperationVariables = Record<string, any>> {
|
|
26
28
|
request: MockedRequest<TVariables>;
|
|
27
29
|
maxUsageCount?: number;
|
|
28
30
|
result?: ApolloLink.Result<Unmasked<TData>> | ResultFunction<ApolloLink.Result<Unmasked<TData>>, TVariables>;
|
|
@@ -162,10 +162,10 @@ export function stringifyMockedResponse(mockedResponse) {
|
|
|
162
162
|
return value;
|
|
163
163
|
}, 2);
|
|
164
164
|
}
|
|
165
|
-
// This is
|
|
165
|
+
// This is similar to the stringifyForDisplay utility we ship, but includes
|
|
166
166
|
// support for NaN in addition to undefined. More values may be handled in the
|
|
167
167
|
// future. This is not added to the primary stringifyForDisplay helper since it
|
|
168
|
-
// is used for the cache and other purposes. We need this for
|
|
168
|
+
// is used for the cache and other purposes. We need this for debugging only.
|
|
169
169
|
function stringifyForDebugging(value, space = 0) {
|
|
170
170
|
if (typeof value === "string") {
|
|
171
171
|
return value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mockLink.js","sources":["../../../../src/testing/core/mocking/mockLink.ts"],"sourcesContent":["import { equal } from \"@wry/equality\";\nimport type { DocumentNode } from \"graphql\";\nimport { asapScheduler, Observable, observeOn, throwError } from \"rxjs\";\n\nimport type { OperationVariables } from \"@apollo/client\";\nimport { ApolloLink } from \"@apollo/client/link\";\nimport type { Unmasked } from \"@apollo/client/masking\";\nimport { addTypenameToDocument, print } from \"@apollo/client/utilities\";\nimport {\n checkDocument,\n cloneDeep,\n getDefaultValues,\n getOperationDefinition,\n isDocumentNode,\n makeUniqueId,\n removeDirectivesFromDocument,\n} from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\n\n/** @internal */\ntype CovariantUnaryFunction<out Arg, out Ret> = { fn(arg: Arg): Ret }[\"fn\"];\n\ntype VariableMatcher<V = Record<string, any>> = CovariantUnaryFunction<\n V,\n boolean\n>;\n\ninterface NormalizedMockedResponse {\n original: MockLink.MockedResponse;\n request: MockLink.MockedRequest;\n variablesWithDefaults: Record<string, any>;\n maxUsageCount: number;\n result?: ApolloLink.Result | MockLink.ResultFunction<ApolloLink.Result, any>;\n error?: Error;\n delay: number | MockLink.DelayFunction;\n}\n\ntype UnmatchedVariables = Array<\n Record<string, any> | \"<undefined>\" | `<function ${string}>`\n>;\n\nexport declare namespace MockLink {\n export type DelayFunction = (operation: ApolloLink.Operation) => number;\n export type Delay = number | DelayFunction;\n export interface DefaultOptions {\n delay?: MockLink.Delay;\n }\n\n export interface MockedRequest<\n TVariables extends OperationVariables = OperationVariables,\n > {\n query: DocumentNode;\n variables?: TVariables | VariableMatcher<TVariables>;\n }\n\n export interface MockedResponse<\n // @ts-ignore\n out TData = Record<string, any>,\n out TVariables extends OperationVariables = Record<string, any>,\n > {\n request: MockedRequest<TVariables>;\n maxUsageCount?: number;\n result?:\n | ApolloLink.Result<Unmasked<TData>>\n | ResultFunction<ApolloLink.Result<Unmasked<TData>>, TVariables>;\n error?: Error;\n delay?: number | MockLink.DelayFunction;\n }\n\n export type ResultFunction<\n T,\n V = Record<string, any>,\n > = CovariantUnaryFunction<V, T>;\n\n export interface Options {\n showWarnings?: boolean;\n defaultOptions?: DefaultOptions;\n }\n}\n\nexport function realisticDelay({\n min = 20,\n max = 50,\n}: { min?: number; max?: number } = {}): MockLink.DelayFunction {\n invariant(max > min, \"realisticDelay: `min` must be less than `max`\");\n\n return () => Math.floor(Math.random() * (max - min) + min);\n}\n\nexport class MockLink extends ApolloLink {\n public operation!: ApolloLink.Operation;\n public showWarnings: boolean = true;\n\n private defaultDelay: MockLink.Delay;\n private mockedResponsesByKey: { [key: string]: NormalizedMockedResponse[] } =\n {};\n\n public static defaultOptions: MockLink.DefaultOptions = {\n delay: realisticDelay(),\n };\n\n constructor(\n mockedResponses: ReadonlyArray<\n MockLink.MockedResponse<Record<string, any>, Record<string, any>>\n >,\n options: MockLink.Options = {}\n ) {\n super();\n const defaultOptions = options.defaultOptions ?? MockLink.defaultOptions;\n\n this.showWarnings = options.showWarnings ?? true;\n this.defaultDelay = defaultOptions?.delay ?? realisticDelay();\n\n if (mockedResponses) {\n mockedResponses.forEach((mockedResponse) => {\n this.addMockedResponse(mockedResponse);\n });\n }\n }\n\n public addMockedResponse(mockedResponse: MockLink.MockedResponse) {\n validateMockedResponse(mockedResponse);\n\n const normalized = this.normalizeMockedResponse(mockedResponse);\n this.getMockedResponses(normalized.request).push(normalized);\n }\n\n public request(\n operation: ApolloLink.Operation\n ): Observable<ApolloLink.Result> {\n this.operation = operation;\n const unmatchedVars: UnmatchedVariables = [];\n const mocks = this.getMockedResponses(operation);\n\n const index = mocks.findIndex((mock) => {\n const { variables } = mock.request;\n\n if (typeof variables === \"function\") {\n const matched = variables(operation.variables);\n\n if (!matched) {\n unmatchedVars.push(`<function ${variables.name}>`);\n }\n\n return matched;\n }\n\n const withDefaults = mock.variablesWithDefaults;\n\n if (equal(withDefaults, operation.variables)) {\n return true;\n }\n\n unmatchedVars.push(\n // Include default variables from the query in unmatched variables\n // output\n Object.keys(withDefaults).length > 0 ?\n withDefaults\n : variables || \"<undefined>\"\n );\n return false;\n });\n\n const matched = index >= 0 ? mocks[index] : void 0;\n\n if (!matched) {\n const message = getErrorMessage(operation, unmatchedVars);\n\n if (this.showWarnings) {\n console.warn(\n message +\n \"\\nThis typically indicates a configuration error in your mocks \" +\n \"setup, usually due to a typo or mismatched variable.\"\n );\n }\n\n return throwError(() => new Error(message)).pipe(\n observeOn(asapScheduler)\n );\n }\n\n if (matched.maxUsageCount > 1) {\n matched.maxUsageCount--;\n } else {\n mocks.splice(index, 1);\n }\n\n const delay =\n typeof matched.delay === \"function\" ?\n matched.delay(operation)\n : matched.delay;\n\n if (!matched.result && !matched.error && delay !== Infinity) {\n return throwError(\n () =>\n new Error(\n `Mocked response should contain either \\`result\\`, \\`error\\` or a \\`delay\\` of \\`Infinity\\`:\\n${stringifyMockedResponse(\n matched.original\n )}`\n )\n );\n }\n\n if (matched.delay === Infinity) {\n return new Observable();\n }\n\n return new Observable((observer) => {\n const timer = setTimeout(() => {\n if (matched.error) {\n return observer.error(matched.error);\n }\n\n if (matched.result) {\n observer.next(\n typeof matched.result === \"function\" ?\n matched.result(operation.variables)\n : matched.result\n );\n }\n observer.complete();\n }, delay);\n\n return () => {\n clearTimeout(timer);\n };\n });\n }\n\n private getMockedResponses(request: MockLink.MockedRequest) {\n const key = JSON.stringify({\n query: print(addTypenameToDocument(request.query)),\n });\n\n let mockedResponses = this.mockedResponsesByKey[key];\n\n if (!mockedResponses) {\n mockedResponses = this.mockedResponsesByKey[key] = [];\n }\n\n return mockedResponses;\n }\n\n private normalizeMockedResponse(\n mockedResponse: MockLink.MockedResponse\n ): NormalizedMockedResponse {\n const { request } = mockedResponse;\n const response = cloneDeep(mockedResponse) as NormalizedMockedResponse;\n\n response.original = mockedResponse;\n response.request.query = getServerQuery(request.query);\n response.maxUsageCount ??= 1;\n response.variablesWithDefaults = {\n ...getDefaultValues(getOperationDefinition(request.query)),\n ...request.variables,\n };\n response.delay ??= this.defaultDelay;\n\n return response;\n }\n}\n\nfunction getErrorMessage(\n operation: ApolloLink.Operation,\n unmatchedVars: UnmatchedVariables\n) {\n return `No more mocked responses for the query:\n${print(operation.query)}\n\nRequest variables: ${stringifyForDebugging(operation.variables)}\n${\n unmatchedVars.length > 0 ?\n `\nFailed to match variables against ${unmatchedVars.length} mock${\n unmatchedVars.length === 1 ? \"\" : \"s\"\n } for this query. The available mocks had the following variables:\n${unmatchedVars.map((d) => ` ${stringifyForDebugging(d)}`).join(\"\\n\")}\n`\n : \"\"\n}`;\n}\n\nfunction getServerQuery(query: DocumentNode) {\n const queryWithoutClientOnlyDirectives = removeDirectivesFromDocument(\n [{ name: \"connection\" }, { name: \"nonreactive\" }, { name: \"unmask\" }],\n query\n );\n\n invariant(queryWithoutClientOnlyDirectives, \"query is required\");\n\n const serverQuery = removeDirectivesFromDocument(\n [{ name: \"client\", remove: true }],\n queryWithoutClientOnlyDirectives\n );\n\n invariant(\n serverQuery,\n \"Cannot mock a client-only query. Mocked responses should contain at least one non-client field.\"\n );\n\n return serverQuery;\n}\n\nfunction validateMockedResponse(mock: MockLink.MockedResponse) {\n checkDocument(mock.request.query);\n\n invariant(\n (mock.maxUsageCount ?? 1) > 0,\n \"Mocked response `maxUsageCount` must be greater than 0. Given %s\",\n mock.maxUsageCount\n );\n}\n\n/** @internal */\nexport function stringifyMockedResponse(\n mockedResponse: MockLink.MockedResponse\n) {\n return JSON.stringify(\n mockedResponse,\n (_, value) => {\n if (isDocumentNode(value)) {\n return print(value);\n }\n\n if (typeof value === \"function\") {\n return \"<function>\";\n }\n\n return value;\n },\n 2\n );\n}\n\nexport interface MockApolloLink extends ApolloLink {\n operation?: ApolloLink.Operation;\n}\n\n// This is similiar to the stringifyForDisplay utility we ship, but includes\n// support for NaN in addition to undefined. More values may be handled in the\n// future. This is not added to the primary stringifyForDisplay helper since it\n// is used for the cache and other purposes. We need this for debuggging only.\nfunction stringifyForDebugging(value: any, space = 0): string {\n if (typeof value === \"string\") {\n return value;\n }\n\n const undefId = makeUniqueId(\"undefined\");\n const nanId = makeUniqueId(\"NaN\");\n\n return JSON.stringify(\n value,\n (_, value) => {\n if (value === void 0) {\n return undefId;\n }\n\n if (Number.isNaN(value)) {\n return nanId;\n }\n\n return value;\n },\n space\n )\n .replace(new RegExp(JSON.stringify(undefId), \"g\"), \"<undefined>\")\n .replace(new RegExp(JSON.stringify(nanId), \"g\"), \"NaN\");\n}\n"],"names":[],"mappings":"AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAsB,CAAtB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqC;AAErC,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAsB,EAAE,CAAxB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkC,EAAE,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CAAC,CAA7B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAsC,CAAC,CAAvC,CAAA,CAAA,CAAA,CAA4C,CAAC,EAAE,CAA/C,CAAA,CAAkD,CAAC,EAAE,CAArD,CAAA,CAAA,CAAA,CAA0D,CAAC;AAC3D;"}
|
|
1
|
+
{"version":3,"file":"mockLink.js","sources":["../../../../src/testing/core/mocking/mockLink.ts"],"sourcesContent":["import { equal } from \"@wry/equality\";\nimport type { DocumentNode } from \"graphql\";\nimport { asapScheduler, Observable, observeOn, throwError } from \"rxjs\";\n\nimport type { OperationVariables } from \"@apollo/client\";\nimport { ApolloLink } from \"@apollo/client/link\";\nimport type { Unmasked } from \"@apollo/client/masking\";\nimport { addTypenameToDocument, print } from \"@apollo/client/utilities\";\nimport {\n checkDocument,\n cloneDeep,\n getDefaultValues,\n getOperationDefinition,\n isDocumentNode,\n makeUniqueId,\n removeDirectivesFromDocument,\n} from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\n\n/** @internal */\ntype CovariantUnaryFunction<out Arg, out Ret> = { fn(arg: Arg): Ret }[\"fn\"];\n\ntype VariableMatcher<V = Record<string, any>> = CovariantUnaryFunction<\n V,\n boolean\n>;\n\ninterface NormalizedMockedResponse {\n original: MockLink.MockedResponse;\n request: MockLink.MockedRequest;\n variablesWithDefaults: Record<string, any>;\n maxUsageCount: number;\n result?: ApolloLink.Result | MockLink.ResultFunction<ApolloLink.Result, any>;\n error?: Error;\n delay: number | MockLink.DelayFunction;\n}\n\ntype UnmatchedVariables = Array<\n Record<string, any> | \"<undefined>\" | `<function ${string}>`\n>;\n\nexport declare namespace MockLink {\n export type DelayFunction = (operation: ApolloLink.Operation) => number;\n export type Delay = number | DelayFunction;\n export interface DefaultOptions {\n delay?: MockLink.Delay;\n }\n\n export interface MockedRequest<\n TVariables extends OperationVariables = OperationVariables,\n > {\n query: DocumentNode;\n variables?: TVariables | VariableMatcher<TVariables>;\n }\n\n export interface MockedResponse<\n /** @ts-ignore */\n out TData = Record<string, any>,\n out TVariables extends OperationVariables = Record<string, any>,\n > {\n request: MockedRequest<TVariables>;\n maxUsageCount?: number;\n result?:\n | ApolloLink.Result<Unmasked<TData>>\n | ResultFunction<ApolloLink.Result<Unmasked<TData>>, TVariables>;\n error?: Error;\n delay?: number | MockLink.DelayFunction;\n }\n\n export type ResultFunction<\n T,\n V = Record<string, any>,\n > = CovariantUnaryFunction<V, T>;\n\n export interface Options {\n showWarnings?: boolean;\n defaultOptions?: DefaultOptions;\n }\n}\n\nexport function realisticDelay({\n min = 20,\n max = 50,\n}: { min?: number; max?: number } = {}): MockLink.DelayFunction {\n invariant(max > min, \"realisticDelay: `min` must be less than `max`\");\n\n return () => Math.floor(Math.random() * (max - min) + min);\n}\n\nexport class MockLink extends ApolloLink {\n public operation!: ApolloLink.Operation;\n public showWarnings: boolean = true;\n\n private defaultDelay: MockLink.Delay;\n private mockedResponsesByKey: { [key: string]: NormalizedMockedResponse[] } =\n {};\n\n public static defaultOptions: MockLink.DefaultOptions = {\n delay: realisticDelay(),\n };\n\n constructor(\n mockedResponses: ReadonlyArray<\n MockLink.MockedResponse<Record<string, any>, Record<string, any>>\n >,\n options: MockLink.Options = {}\n ) {\n super();\n const defaultOptions = options.defaultOptions ?? MockLink.defaultOptions;\n\n this.showWarnings = options.showWarnings ?? true;\n this.defaultDelay = defaultOptions?.delay ?? realisticDelay();\n\n if (mockedResponses) {\n mockedResponses.forEach((mockedResponse) => {\n this.addMockedResponse(mockedResponse);\n });\n }\n }\n\n public addMockedResponse(mockedResponse: MockLink.MockedResponse) {\n validateMockedResponse(mockedResponse);\n\n const normalized = this.normalizeMockedResponse(mockedResponse);\n this.getMockedResponses(normalized.request).push(normalized);\n }\n\n public request(\n operation: ApolloLink.Operation\n ): Observable<ApolloLink.Result> {\n this.operation = operation;\n const unmatchedVars: UnmatchedVariables = [];\n const mocks = this.getMockedResponses(operation);\n\n const index = mocks.findIndex((mock) => {\n const { variables } = mock.request;\n\n if (typeof variables === \"function\") {\n const matched = variables(operation.variables);\n\n if (!matched) {\n unmatchedVars.push(`<function ${variables.name}>`);\n }\n\n return matched;\n }\n\n const withDefaults = mock.variablesWithDefaults;\n\n if (equal(withDefaults, operation.variables)) {\n return true;\n }\n\n unmatchedVars.push(\n // Include default variables from the query in unmatched variables\n // output\n Object.keys(withDefaults).length > 0 ?\n withDefaults\n : variables || \"<undefined>\"\n );\n return false;\n });\n\n const matched = index >= 0 ? mocks[index] : void 0;\n\n if (!matched) {\n const message = getErrorMessage(operation, unmatchedVars);\n\n if (this.showWarnings) {\n console.warn(\n message +\n \"\\nThis typically indicates a configuration error in your mocks \" +\n \"setup, usually due to a typo or mismatched variable.\"\n );\n }\n\n return throwError(() => new Error(message)).pipe(\n observeOn(asapScheduler)\n );\n }\n\n if (matched.maxUsageCount > 1) {\n matched.maxUsageCount--;\n } else {\n mocks.splice(index, 1);\n }\n\n const delay =\n typeof matched.delay === \"function\" ?\n matched.delay(operation)\n : matched.delay;\n\n if (!matched.result && !matched.error && delay !== Infinity) {\n return throwError(\n () =>\n new Error(\n `Mocked response should contain either \\`result\\`, \\`error\\` or a \\`delay\\` of \\`Infinity\\`:\\n${stringifyMockedResponse(\n matched.original\n )}`\n )\n );\n }\n\n if (matched.delay === Infinity) {\n return new Observable();\n }\n\n return new Observable((observer) => {\n const timer = setTimeout(() => {\n if (matched.error) {\n return observer.error(matched.error);\n }\n\n if (matched.result) {\n observer.next(\n typeof matched.result === \"function\" ?\n matched.result(operation.variables)\n : matched.result\n );\n }\n observer.complete();\n }, delay);\n\n return () => {\n clearTimeout(timer);\n };\n });\n }\n\n private getMockedResponses(request: MockLink.MockedRequest) {\n const key = JSON.stringify({\n query: print(addTypenameToDocument(request.query)),\n });\n\n let mockedResponses = this.mockedResponsesByKey[key];\n\n if (!mockedResponses) {\n mockedResponses = this.mockedResponsesByKey[key] = [];\n }\n\n return mockedResponses;\n }\n\n private normalizeMockedResponse(\n mockedResponse: MockLink.MockedResponse\n ): NormalizedMockedResponse {\n const { request } = mockedResponse;\n const response = cloneDeep(mockedResponse) as NormalizedMockedResponse;\n\n response.original = mockedResponse;\n response.request.query = getServerQuery(request.query);\n response.maxUsageCount ??= 1;\n response.variablesWithDefaults = {\n ...getDefaultValues(getOperationDefinition(request.query)),\n ...request.variables,\n };\n response.delay ??= this.defaultDelay;\n\n return response;\n }\n}\n\nfunction getErrorMessage(\n operation: ApolloLink.Operation,\n unmatchedVars: UnmatchedVariables\n) {\n return `No more mocked responses for the query:\n${print(operation.query)}\n\nRequest variables: ${stringifyForDebugging(operation.variables)}\n${\n unmatchedVars.length > 0 ?\n `\nFailed to match variables against ${unmatchedVars.length} mock${\n unmatchedVars.length === 1 ? \"\" : \"s\"\n } for this query. The available mocks had the following variables:\n${unmatchedVars.map((d) => ` ${stringifyForDebugging(d)}`).join(\"\\n\")}\n`\n : \"\"\n}`;\n}\n\nfunction getServerQuery(query: DocumentNode) {\n const queryWithoutClientOnlyDirectives = removeDirectivesFromDocument(\n [{ name: \"connection\" }, { name: \"nonreactive\" }, { name: \"unmask\" }],\n query\n );\n\n invariant(queryWithoutClientOnlyDirectives, \"query is required\");\n\n const serverQuery = removeDirectivesFromDocument(\n [{ name: \"client\", remove: true }],\n queryWithoutClientOnlyDirectives\n );\n\n invariant(\n serverQuery,\n \"Cannot mock a client-only query. Mocked responses should contain at least one non-client field.\"\n );\n\n return serverQuery;\n}\n\nfunction validateMockedResponse(mock: MockLink.MockedResponse) {\n checkDocument(mock.request.query);\n\n invariant(\n (mock.maxUsageCount ?? 1) > 0,\n \"Mocked response `maxUsageCount` must be greater than 0. Given %s\",\n mock.maxUsageCount\n );\n}\n\n/** @internal */\nexport function stringifyMockedResponse(\n mockedResponse: MockLink.MockedResponse\n) {\n return JSON.stringify(\n mockedResponse,\n (_, value) => {\n if (isDocumentNode(value)) {\n return print(value);\n }\n\n if (typeof value === \"function\") {\n return \"<function>\";\n }\n\n return value;\n },\n 2\n );\n}\n\nexport interface MockApolloLink extends ApolloLink {\n operation?: ApolloLink.Operation;\n}\n\n// This is similar to the stringifyForDisplay utility we ship, but includes\n// support for NaN in addition to undefined. More values may be handled in the\n// future. This is not added to the primary stringifyForDisplay helper since it\n// is used for the cache and other purposes. We need this for debugging only.\nfunction stringifyForDebugging(value: any, space = 0): string {\n if (typeof value === \"string\") {\n return value;\n }\n\n const undefId = makeUniqueId(\"undefined\");\n const nanId = makeUniqueId(\"NaN\");\n\n return JSON.stringify(\n value,\n (_, value) => {\n if (value === void 0) {\n return undefId;\n }\n\n if (Number.isNaN(value)) {\n return nanId;\n }\n\n return value;\n },\n space\n )\n .replace(new RegExp(JSON.stringify(undefId), \"g\"), \"<undefined>\")\n .replace(new RegExp(JSON.stringify(nanId), \"g\"), \"NaN\");\n}\n"],"names":[],"mappings":"AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAsB,CAAtB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqC;AAErC,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAsB,EAAE,CAAxB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkC,EAAE,CAApC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA6C,EAAE,CAA/C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAiE,CAAjE,CAAA,CAAA,CAAA,CAAA,CAAuE;AAGvE,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,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
-
export type DeepPartial<T> = T extends DeepPartialPrimitive ? T : T extends Map<infer TKey, infer TValue> ? DeepPartialMap<TKey, TValue> : T extends ReadonlyMap<infer TKey, infer TValue> ? DeepPartialReadonlyMap<TKey, TValue> : T extends Set<infer TItem> ? DeepPartialSet<TItem> : T extends ReadonlySet<infer TItem> ? DeepPartialReadonlySet<TItem> : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray<infer TItem>) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray<DeepPartial<TItem
|
|
6
|
+
export type DeepPartial<T> = T extends DeepPartialPrimitive ? T : T extends Map<infer TKey, infer TValue> ? DeepPartialMap<TKey, TValue> : T extends ReadonlyMap<infer TKey, infer TValue> ? DeepPartialReadonlyMap<TKey, TValue> : T extends Set<infer TItem> ? DeepPartialSet<TItem> : T extends ReadonlySet<infer TItem> ? DeepPartialReadonlySet<TItem> : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray<infer TItem>) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray<DeepPartial<TItem>> : Array<DeepPartial<TItem>> : DeepPartialObject<T> : DeepPartialObject<T> : unknown;
|
|
7
7
|
type DeepPartialMap<TKey, TValue> = {} & Map<DeepPartial<TKey>, DeepPartial<TValue>>;
|
|
8
8
|
type DeepPartialReadonlyMap<TKey, TValue> = {} & ReadonlyMap<DeepPartial<TKey>, DeepPartial<TValue>>;
|
|
9
9
|
type DeepPartialSet<T> = {} & Set<DeepPartial<T>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeepPartial.js","sourceRoot":"","sources":["../../src/utilities/DeepPartial.ts"],"names":[],"mappings":"AAAA,sJAAsJ;AACtJ,EAAE;AACF,6EAA6E;AAC7E,kEAAkE","sourcesContent":["// Inspired by type-fest PartialDeep: https://github.com/sindresorhus/type-fest/blob/9feb8c89be9a0f2f688bf2f497230298a8e2472e/source/partial-deep.d.ts\n//\n// We're including the license to give credit to the original implementation.\n// https://github.com/sindresorhus/type-fest/blob/main/license-mit\n\n/*\n * MIT License\n *\n * Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nimport type { Primitive } from \"@apollo/client/utilities/internal\";\n\ntype DeepPartialPrimitive = Primitive | Date | RegExp;\n\n/**\n * Deeply makes all properties in `T` optional.\n */\nexport type DeepPartial<T> =\n T extends DeepPartialPrimitive ? T\n : T extends Map<infer TKey, infer TValue> ? DeepPartialMap<TKey, TValue>\n : T extends ReadonlyMap<infer TKey, infer TValue> ?\n DeepPartialReadonlyMap<TKey, TValue>\n : T extends Set<infer TItem> ? DeepPartialSet<TItem>\n : T extends ReadonlySet<infer TItem> ? DeepPartialReadonlySet<TItem>\n : T extends (...args: any[]) => unknown ? T | undefined\n : T extends object ?\n T extends (\n ReadonlyArray<infer TItem> // Test for arrays/tuples\n ) ?\n TItem[] extends (\n T // Test for non-tuples\n ) ?\n readonly TItem[] extends T ?\n ReadonlyArray<DeepPartial<TItem
|
|
1
|
+
{"version":3,"file":"DeepPartial.js","sourceRoot":"","sources":["../../src/utilities/DeepPartial.ts"],"names":[],"mappings":"AAAA,sJAAsJ;AACtJ,EAAE;AACF,6EAA6E;AAC7E,kEAAkE","sourcesContent":["// Inspired by type-fest PartialDeep: https://github.com/sindresorhus/type-fest/blob/9feb8c89be9a0f2f688bf2f497230298a8e2472e/source/partial-deep.d.ts\n//\n// We're including the license to give credit to the original implementation.\n// https://github.com/sindresorhus/type-fest/blob/main/license-mit\n\n/*\n * MIT License\n *\n * Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nimport type { Primitive } from \"@apollo/client/utilities/internal\";\n\ntype DeepPartialPrimitive = Primitive | Date | RegExp;\n\n/**\n * Deeply makes all properties in `T` optional.\n */\nexport type DeepPartial<T> =\n T extends DeepPartialPrimitive ? T\n : T extends Map<infer TKey, infer TValue> ? DeepPartialMap<TKey, TValue>\n : T extends ReadonlyMap<infer TKey, infer TValue> ?\n DeepPartialReadonlyMap<TKey, TValue>\n : T extends Set<infer TItem> ? DeepPartialSet<TItem>\n : T extends ReadonlySet<infer TItem> ? DeepPartialReadonlySet<TItem>\n : T extends (...args: any[]) => unknown ? T | undefined\n : T extends object ?\n T extends (\n ReadonlyArray<infer TItem> // Test for arrays/tuples\n ) ?\n TItem[] extends (\n T // Test for non-tuples\n ) ?\n readonly TItem[] extends T ?\n ReadonlyArray<DeepPartial<TItem>>\n : Array<DeepPartial<TItem>>\n : DeepPartialObject<T>\n : DeepPartialObject<T>\n : unknown;\n\ntype DeepPartialMap<TKey, TValue> = {} & Map<\n DeepPartial<TKey>,\n DeepPartial<TValue>\n>;\n\ntype DeepPartialReadonlyMap<TKey, TValue> = {} & ReadonlyMap<\n DeepPartial<TKey>,\n DeepPartial<TValue>\n>;\n\ntype DeepPartialSet<T> = {} & Set<DeepPartial<T>>;\ntype DeepPartialReadonlySet<T> = {} & ReadonlySet<DeepPartial<T>>;\n\ntype DeepPartialObject<T extends object> = {\n [K in keyof T]?: DeepPartial<T[K]>;\n};\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
/**
|
|
3
|
+
* Like `combineLatest` but with some differences:
|
|
4
|
+
*
|
|
5
|
+
* - It only works on arrays as an input
|
|
6
|
+
* - Batches updates to each array index that contains a referentially equal
|
|
7
|
+
* observable
|
|
8
|
+
* - Doesn't allow for custom scheduler
|
|
9
|
+
* - Expects array of constructed observables instead of `Array<ObservableInput>`
|
|
10
|
+
*/
|
|
11
|
+
export declare function combineLatestBatched<T>(observables: Array<Observable<T> & {
|
|
12
|
+
dirty?: boolean;
|
|
13
|
+
}>): Observable<T[]>;
|
|
14
|
+
//# sourceMappingURL=combineLatestBatched.d.ts.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { EMPTY, Observable } from "rxjs";
|
|
2
|
+
/**
|
|
3
|
+
* Like `combineLatest` but with some differences:
|
|
4
|
+
*
|
|
5
|
+
* - It only works on arrays as an input
|
|
6
|
+
* - Batches updates to each array index that contains a referentially equal
|
|
7
|
+
* observable
|
|
8
|
+
* - Doesn't allow for custom scheduler
|
|
9
|
+
* - Expects array of constructed observables instead of `Array<ObservableInput>`
|
|
10
|
+
*/
|
|
11
|
+
export function combineLatestBatched(observables) {
|
|
12
|
+
if (observables.length === 0) {
|
|
13
|
+
return EMPTY;
|
|
14
|
+
}
|
|
15
|
+
return new Observable((observer) => {
|
|
16
|
+
const { length } = observables;
|
|
17
|
+
// Keeps track of current values for each observable
|
|
18
|
+
const values = new Array(length);
|
|
19
|
+
// Used to batch an update each item in the array that share an observable
|
|
20
|
+
// so that they can be emitted together.
|
|
21
|
+
const indexesByObservable = new Map();
|
|
22
|
+
observables.forEach((source, idx) => {
|
|
23
|
+
if (!indexesByObservable.has(source)) {
|
|
24
|
+
indexesByObservable.set(source, new Set());
|
|
25
|
+
}
|
|
26
|
+
indexesByObservable.get(source).add(idx);
|
|
27
|
+
});
|
|
28
|
+
// Track the number of active subscriptions so we know when to complete this
|
|
29
|
+
// observable
|
|
30
|
+
let active = indexesByObservable.size;
|
|
31
|
+
// Track how many observables are left to emit their first value
|
|
32
|
+
let remainingFirstValues = indexesByObservable.size;
|
|
33
|
+
let currentBatch;
|
|
34
|
+
// Subscribe to each unique observable instead of the raw source array of
|
|
35
|
+
// observables since we want at most 1-subscription per unique observable.
|
|
36
|
+
// This ensures an update can write to multiple indexes before emitting the
|
|
37
|
+
// result.
|
|
38
|
+
indexesByObservable.forEach((indexes, source) => {
|
|
39
|
+
let hasFirstValue = false;
|
|
40
|
+
const subscription = source.subscribe({
|
|
41
|
+
next: (value) => {
|
|
42
|
+
indexes.forEach((idx) => (values[idx] = value));
|
|
43
|
+
if (!hasFirstValue) {
|
|
44
|
+
hasFirstValue = true;
|
|
45
|
+
remainingFirstValues--;
|
|
46
|
+
}
|
|
47
|
+
if (!remainingFirstValues) {
|
|
48
|
+
currentBatch ||= new Set(observables.filter((obs) => obs.dirty));
|
|
49
|
+
currentBatch.delete(source);
|
|
50
|
+
if (!currentBatch.size) {
|
|
51
|
+
observer.next(values.slice());
|
|
52
|
+
currentBatch = undefined;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
complete: () => {
|
|
57
|
+
active--;
|
|
58
|
+
if (!active) {
|
|
59
|
+
observer.complete();
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
error: observer.error.bind(observer),
|
|
63
|
+
});
|
|
64
|
+
observer.add(subscription);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=combineLatestBatched.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combineLatestBatched.js","sourceRoot":"","sources":["../../../src/utilities/internal/combineLatestBatched.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEzC;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAClC,WAAuD;IAEvD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC7B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,IAAI,UAAU,CAAW,CAAC,QAAQ,EAAE,EAAE;QAC3C,MAAM,EAAE,MAAM,EAAE,GAAG,WAAW,CAAC;QAC/B,oDAAoD;QACpD,MAAM,MAAM,GAAQ,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;QACtC,0EAA0E;QAC1E,wCAAwC;QACxC,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAA8B,CAAC;QAElE,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;YAClC,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;gBACrC,mBAAmB,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;YAC7C,CAAC;YAED,mBAAmB,CAAC,GAAG,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AC;wBACZ,QAAQ,CAAC,QAAQ,EAAE,CAAC;oBACtB,CAAC;gBACH,CAAC;gBACD,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC;aACrC,CAAC,CAAC;YAEH,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { EMPTY, Observable } from \"rxjs\";\n\n/**\n * Like `combineLatest` but with some differences:\n *\n * - It only works on arrays as an input\n * - Batches updates to each array index that contains a referentially equal\n * observable\n * - Doesn't allow for custom scheduler\n * - Expects array of constructed observables instead of `Array<ObservableInput>`\n */\nexport function combineLatestBatched<T>(\n observables: Array<Observable<T> & { dirty?: boolean }>\n) {\n if (observables.length === 0) {\n return EMPTY;\n }\n\n return new Observable<Array<T>>((observer) => {\n const { length } = observables;\n // Keeps track of current values for each observable\n const values: T[] = new Array(length);\n // Used to batch an update each item in the array that share an observable\n // so that they can be emitted together.\n const indexesByObservable = new Map<Observable<T>, Set<number>>();\n\n observables.forEach((source, idx) => {\n if (!indexesByObservable.has(source)) {\n indexesByObservable.set(source, new Set());\n }\n\n indexesByObservable.get(source)!.add(idx);\n });\n\n // Track the number of active subscriptions so we know when to complete this\n // observable\n let active = indexesByObservable.size;\n // Track how many observables are left to emit their first value\n let remainingFirstValues = indexesByObservable.size;\n\n let currentBatch: Set<Observable<T>> | undefined;\n\n // Subscribe to each unique observable instead of the raw source array of\n // observables since we want at most 1-subscription per unique observable.\n // This ensures an update can write to multiple indexes before emitting the\n // result.\n indexesByObservable.forEach((indexes, source) => {\n let hasFirstValue = false;\n const subscription = source.subscribe({\n next: (value) => {\n indexes.forEach((idx) => (values[idx] = value));\n\n if (!hasFirstValue) {\n hasFirstValue = true;\n remainingFirstValues--;\n }\n\n if (!remainingFirstValues) {\n currentBatch ||= new Set(observables.filter((obs) => obs.dirty));\n currentBatch.delete(source);\n if (!currentBatch.size) {\n observer.next(values.slice());\n currentBatch = undefined;\n }\n }\n },\n complete: () => {\n active--;\n\n if (!active) {\n observer.complete();\n }\n },\n error: observer.error.bind(observer),\n });\n\n observer.add(subscription);\n });\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getMemoryInternals.js","sources":["../../../src/utilities/internal/getMemoryInternals.ts"],"sourcesContent":["import type { OptimisticWrapperFunction } from \"optimism\";\n\nimport type {\n ApolloCache,\n ApolloLink,\n DocumentTransform,\n InMemoryCache,\n} from \"@apollo/client\";\nimport type { ApolloClient } from \"@apollo/client\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\n\nimport type { CacheSizes } from \"../caching/sizes.js\";\nimport { cacheSizes, defaultCacheSizes } from \"../caching/sizes.js\";\n\nconst globalCaches: {\n print?: () => number;\n canonicalStringify?: () => number;\n} = {};\n\nexport function registerGlobalCache(\n name: keyof typeof globalCaches,\n getSize: () => number\n) {\n globalCaches[name] = getSize;\n}\n\n/**\n * Transformative helper type to turn a function of the form\n *\n * ```ts\n * (this: any) => R;\n * ```\n *\n * into a function of the form\n *\n * ```ts\n * () => R;\n * ```\n *\n * preserving the return type, but removing the `this` parameter.\n *\n * @remarks\n *\n * Further down in the definitions of `_getApolloClientMemoryInternals`,\n * `_getApolloCacheMemoryInternals` and `_getInMemoryCacheMemoryInternals`,\n * having the `this` parameter annotation is extremely useful for type checking\n * inside the function.\n *\n * If this is preserved in the exported types, though, it leads to a situation\n * where `ApolloCache.getMemoryInternals` is a function that requires a `this`\n * of the type `ApolloCache`, while the extending class `InMemoryCache` has a\n * `getMemoryInternals` function that requires a `this` of the type\n * `InMemoryCache`.\n * This is not compatible with TypeScript's inheritence system (although it is\n * perfectly correct), and so TypeScript will complain loudly.\n *\n * We still want to define our functions with the `this` annotation, though,\n * and have the return type inferred.\n * (This requirement for return type inference here makes it impossible to use\n * a function overload that is more explicit on the inner overload than it is\n * on the external overload.)\n *\n * So in the end, we use this helper to remove the `this` annotation from the\n * exported function types, while keeping it in the internal implementation.\n */\ntype RemoveThis<T> = T extends (this: any) => infer R ? () => R : never;\n\n/**\n * For internal purposes only - please call `ApolloClient.getMemoryInternals` instead\n * @internal\n */\nexport const getApolloClientMemoryInternals =\n __DEV__ ?\n (_getApolloClientMemoryInternals as RemoveThis<\n typeof _getApolloClientMemoryInternals\n >)\n : undefined;\n\n/**\n * For internal purposes only - please call `ApolloClient.getMemoryInternals` instead\n * @internal\n */\nexport const getInMemoryCacheMemoryInternals =\n __DEV__ ?\n (_getInMemoryCacheMemoryInternals as RemoveThis<\n typeof _getInMemoryCacheMemoryInternals\n >)\n : undefined;\n\n/**\n * For internal purposes only - please call `ApolloClient.getMemoryInternals` instead\n * @internal\n */\nexport const getApolloCacheMemoryInternals =\n __DEV__ ?\n (_getApolloCacheMemoryInternals as RemoveThis<\n typeof _getApolloCacheMemoryInternals\n >)\n : undefined;\n\nfunction getCurrentCacheSizes() {\n // `defaultCacheSizes` is a `const enum` that will be inlined during build, so we have to reconstruct it's shape here\n const defaults: Record<keyof CacheSizes, number> = {\n canonicalStringify: defaultCacheSizes[\"canonicalStringify\"],\n checkDocument: defaultCacheSizes[\"checkDocument\"],\n print: defaultCacheSizes[\"print\"],\n \"documentTransform.cache\": defaultCacheSizes[\"documentTransform.cache\"],\n \"queryManager.getDocumentInfo\":\n defaultCacheSizes[\"queryManager.getDocumentInfo\"],\n \"PersistedQueryLink.persistedQueryHashes\":\n defaultCacheSizes[\"PersistedQueryLink.persistedQueryHashes\"],\n \"fragmentRegistry.transform\":\n defaultCacheSizes[\"fragmentRegistry.transform\"],\n \"fragmentRegistry.lookup\": defaultCacheSizes[\"fragmentRegistry.lookup\"],\n \"fragmentRegistry.findFragmentSpreads\":\n defaultCacheSizes[\"fragmentRegistry.findFragmentSpreads\"],\n \"cache.fragmentQueryDocuments\":\n defaultCacheSizes[\"cache.fragmentQueryDocuments\"],\n \"removeTypenameFromVariables.getVariableDefinitions\":\n defaultCacheSizes[\"removeTypenameFromVariables.getVariableDefinitions\"],\n \"inMemoryCache.maybeBroadcastWatch\":\n defaultCacheSizes[\"inMemoryCache.maybeBroadcastWatch\"],\n \"inMemoryCache.executeSelectionSet\":\n defaultCacheSizes[\"inMemoryCache.executeSelectionSet\"],\n \"inMemoryCache.executeSubSelectedArray\":\n defaultCacheSizes[\"inMemoryCache.executeSubSelectedArray\"],\n };\n return Object.fromEntries(\n Object.entries(defaults).map(([k, v]) => [\n k,\n cacheSizes[k as keyof CacheSizes] || v,\n ])\n );\n}\n\nfunction _getApolloClientMemoryInternals(this: ApolloClient) {\n if (!__DEV__) throw new Error(\"only supported in development mode\");\n\n return {\n limits: getCurrentCacheSizes(),\n sizes: {\n print: globalCaches.print?.(),\n canonicalStringify: globalCaches.canonicalStringify?.(),\n links: linkInfo(this.link),\n queryManager: {\n getDocumentInfo: this[\"queryManager\"][\"transformCache\"].size,\n documentTransforms: transformInfo(\n this[\"queryManager\"].documentTransform\n ),\n },\n ...(this.cache.getMemoryInternals?.() as Partial<\n ReturnType<typeof _getApolloCacheMemoryInternals>\n > &\n Partial<ReturnType<typeof _getInMemoryCacheMemoryInternals>>),\n },\n };\n}\n\nfunction _getApolloCacheMemoryInternals(this: ApolloCache) {\n return {\n cache: {\n fragmentQueryDocuments: getWrapperInformation(this[\"getFragmentDoc\"]),\n },\n };\n}\n\nfunction _getInMemoryCacheMemoryInternals(this: InMemoryCache) {\n const fragments = this.config.fragments as\n | undefined\n | {\n findFragmentSpreads?: Function;\n transform?: Function;\n lookup?: Function;\n };\n\n return {\n ..._getApolloCacheMemoryInternals.apply(this as any),\n addTypenameDocumentTransform: transformInfo(this[\"addTypenameTransform\"]),\n inMemoryCache: {\n executeSelectionSet: getWrapperInformation(\n this[\"storeReader\"][\"executeSelectionSet\"]\n ),\n executeSubSelectedArray: getWrapperInformation(\n this[\"storeReader\"][\"executeSubSelectedArray\"]\n ),\n maybeBroadcastWatch: getWrapperInformation(this[\"maybeBroadcastWatch\"]),\n },\n fragmentRegistry: {\n findFragmentSpreads: getWrapperInformation(\n fragments?.findFragmentSpreads\n ),\n lookup: getWrapperInformation(fragments?.lookup),\n transform: getWrapperInformation(fragments?.transform),\n },\n };\n}\n\nfunction isWrapper(f?: Function): f is OptimisticWrapperFunction<any, any> {\n return !!f && \"dirtyKey\" in f;\n}\n\nfunction getWrapperInformation(f?: Function) {\n return isWrapper(f) ? f.size : undefined;\n}\n\nfunction isDefined<T>(value: T | undefined | null): value is T {\n return value != null;\n}\n\nfunction transformInfo(transform?: DocumentTransform) {\n return recurseTransformInfo(transform).map((cache) => ({ cache }));\n}\n\nfunction recurseTransformInfo(transform?: DocumentTransform): number[] {\n return transform ?\n [\n getWrapperInformation(transform?.[\"performWork\"]),\n ...recurseTransformInfo(transform?.[\"left\"]),\n ...recurseTransformInfo(transform?.[\"right\"]),\n ].filter(isDefined)\n : [];\n}\n\nfunction linkInfo(link?: ApolloLink): unknown[] {\n return link ?\n [\n link?.getMemoryInternals?.(),\n ...linkInfo(link?.left),\n ...linkInfo(link?.right),\n ].filter(isDefined)\n : [];\n}\n"],"names":[],"mappings":"AASA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAwB,CAAxB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA8D;AAG9D,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAA8C,CAA9C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,C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A,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgC,CAAhC,CAAkC,CAAlC,CAAoC;YAC5B,CAAR,CAAA,CAAW,CAAX,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmB,CAAC,CAApB,CAAA,CAAA,CAAwB,CAAxB,CAA0B,CAA1B,CAAA,CAAA,CAA8B,CAAC;YACvB,CAAR,CAAA,CAAW,CAAX,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmB,CAAC,CAApB,CAAA,CAAA,CAAwB,CAAxB,CAA0B,CAA1B,CAAA,CAAA,CAAA,CAA+B,CAAC;QAChC,CAAO,CAAC,CAAR,CAAA,CAAA,CAAA,CAAA,CAAc,CAAC,CAAf,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAwB;QACpB,EAAE,CAAN,CAAQ;AACR;"}
|
|
1
|
+
{"version":3,"file":"getMemoryInternals.js","sources":["../../../src/utilities/internal/getMemoryInternals.ts"],"sourcesContent":["import type { OptimisticWrapperFunction } from \"optimism\";\n\nimport type {\n ApolloCache,\n ApolloLink,\n DocumentTransform,\n InMemoryCache,\n} from \"@apollo/client\";\nimport type { ApolloClient } from \"@apollo/client\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\n\nimport type { CacheSizes } from \"../caching/sizes.js\";\nimport { cacheSizes, defaultCacheSizes } from \"../caching/sizes.js\";\n\nconst globalCaches: {\n print?: () => number;\n canonicalStringify?: () => number;\n} = {};\n\nexport function registerGlobalCache(\n name: keyof typeof globalCaches,\n getSize: () => number\n) {\n globalCaches[name] = getSize;\n}\n\n/**\n * Transformative helper type to turn a function of the form\n *\n * ```ts\n * (this: any) => R;\n * ```\n *\n * into a function of the form\n *\n * ```ts\n * () => R;\n * ```\n *\n * preserving the return type, but removing the `this` parameter.\n *\n * @remarks\n *\n * Further down in the definitions of `_getApolloClientMemoryInternals`,\n * `_getApolloCacheMemoryInternals` and `_getInMemoryCacheMemoryInternals`,\n * having the `this` parameter annotation is extremely useful for type checking\n * inside the function.\n *\n * If this is preserved in the exported types, though, it leads to a situation\n * where `ApolloCache.getMemoryInternals` is a function that requires a `this`\n * of the type `ApolloCache`, while the extending class `InMemoryCache` has a\n * `getMemoryInternals` function that requires a `this` of the type\n * `InMemoryCache`.\n * This is not compatible with TypeScript's inheritance system (although it is\n * perfectly correct), and so TypeScript will complain loudly.\n *\n * We still want to define our functions with the `this` annotation, though,\n * and have the return type inferred.\n * (This requirement for return type inference here makes it impossible to use\n * a function overload that is more explicit on the inner overload than it is\n * on the external overload.)\n *\n * So in the end, we use this helper to remove the `this` annotation from the\n * exported function types, while keeping it in the internal implementation.\n */\ntype RemoveThis<T> = T extends (this: any) => infer R ? () => R : never;\n\n/**\n * For internal purposes only - please call `ApolloClient.getMemoryInternals` instead\n * @internal\n */\nexport const getApolloClientMemoryInternals =\n __DEV__ ?\n (_getApolloClientMemoryInternals as RemoveThis<\n typeof _getApolloClientMemoryInternals\n >)\n : undefined;\n\n/**\n * For internal purposes only - please call `ApolloClient.getMemoryInternals` instead\n * @internal\n */\nexport const getInMemoryCacheMemoryInternals =\n __DEV__ ?\n (_getInMemoryCacheMemoryInternals as RemoveThis<\n typeof _getInMemoryCacheMemoryInternals\n >)\n : undefined;\n\n/**\n * For internal purposes only - please call `ApolloClient.getMemoryInternals` instead\n * @internal\n */\nexport const getApolloCacheMemoryInternals =\n __DEV__ ?\n (_getApolloCacheMemoryInternals as RemoveThis<\n typeof _getApolloCacheMemoryInternals\n >)\n : undefined;\n\nfunction getCurrentCacheSizes() {\n // `defaultCacheSizes` is a `const enum` that will be inlined during build, so we have to reconstruct it's shape here\n const defaults: Record<keyof CacheSizes, number> = {\n canonicalStringify: defaultCacheSizes[\"canonicalStringify\"],\n checkDocument: defaultCacheSizes[\"checkDocument\"],\n print: defaultCacheSizes[\"print\"],\n \"documentTransform.cache\": defaultCacheSizes[\"documentTransform.cache\"],\n \"queryManager.getDocumentInfo\":\n defaultCacheSizes[\"queryManager.getDocumentInfo\"],\n \"PersistedQueryLink.persistedQueryHashes\":\n defaultCacheSizes[\"PersistedQueryLink.persistedQueryHashes\"],\n \"fragmentRegistry.transform\":\n defaultCacheSizes[\"fragmentRegistry.transform\"],\n \"fragmentRegistry.lookup\": defaultCacheSizes[\"fragmentRegistry.lookup\"],\n \"fragmentRegistry.findFragmentSpreads\":\n defaultCacheSizes[\"fragmentRegistry.findFragmentSpreads\"],\n \"cache.fragmentQueryDocuments\":\n defaultCacheSizes[\"cache.fragmentQueryDocuments\"],\n \"removeTypenameFromVariables.getVariableDefinitions\":\n defaultCacheSizes[\"removeTypenameFromVariables.getVariableDefinitions\"],\n \"inMemoryCache.maybeBroadcastWatch\":\n defaultCacheSizes[\"inMemoryCache.maybeBroadcastWatch\"],\n \"inMemoryCache.executeSelectionSet\":\n defaultCacheSizes[\"inMemoryCache.executeSelectionSet\"],\n \"inMemoryCache.executeSubSelectedArray\":\n defaultCacheSizes[\"inMemoryCache.executeSubSelectedArray\"],\n };\n return Object.fromEntries(\n Object.entries(defaults).map(([k, v]) => [\n k,\n cacheSizes[k as keyof CacheSizes] || v,\n ])\n );\n}\n\nfunction _getApolloClientMemoryInternals(this: ApolloClient) {\n if (!__DEV__) throw new Error(\"only supported in development mode\");\n\n return {\n limits: getCurrentCacheSizes(),\n sizes: {\n print: globalCaches.print?.(),\n canonicalStringify: globalCaches.canonicalStringify?.(),\n links: linkInfo(this.link),\n queryManager: {\n getDocumentInfo: this[\"queryManager\"][\"transformCache\"].size,\n documentTransforms: transformInfo(\n this[\"queryManager\"].documentTransform\n ),\n },\n ...(this.cache.getMemoryInternals?.() as Partial<\n ReturnType<typeof _getApolloCacheMemoryInternals>\n > &\n Partial<ReturnType<typeof _getInMemoryCacheMemoryInternals>>),\n },\n };\n}\n\nfunction _getApolloCacheMemoryInternals(this: ApolloCache) {\n return {\n cache: {\n fragmentQueryDocuments: getWrapperInformation(this[\"getFragmentDoc\"]),\n },\n };\n}\n\nfunction _getInMemoryCacheMemoryInternals(this: InMemoryCache) {\n const fragments = this.config.fragments as\n | undefined\n | {\n findFragmentSpreads?: Function;\n transform?: Function;\n lookup?: Function;\n };\n\n return {\n ..._getApolloCacheMemoryInternals.apply(this as any),\n addTypenameDocumentTransform: transformInfo(this[\"addTypenameTransform\"]),\n inMemoryCache: {\n executeSelectionSet: getWrapperInformation(\n this[\"storeReader\"][\"executeSelectionSet\"]\n ),\n executeSubSelectedArray: getWrapperInformation(\n this[\"storeReader\"][\"executeSubSelectedArray\"]\n ),\n maybeBroadcastWatch: getWrapperInformation(this[\"maybeBroadcastWatch\"]),\n },\n fragmentRegistry: {\n findFragmentSpreads: getWrapperInformation(\n fragments?.findFragmentSpreads\n ),\n lookup: getWrapperInformation(fragments?.lookup),\n transform: getWrapperInformation(fragments?.transform),\n },\n };\n}\n\nfunction isWrapper(f?: Function): f is OptimisticWrapperFunction<any, any> {\n return !!f && \"dirtyKey\" in f;\n}\n\nfunction getWrapperInformation(f?: Function) {\n return isWrapper(f) ? f.size : undefined;\n}\n\nfunction isDefined<T>(value: T | undefined | null): value is T {\n return value != null;\n}\n\nfunction transformInfo(transform?: DocumentTransform) {\n return recurseTransformInfo(transform).map((cache) => ({ cache }));\n}\n\nfunction recurseTransformInfo(transform?: DocumentTransform): number[] {\n return transform ?\n [\n getWrapperInformation(transform?.[\"performWork\"]),\n ...recurseTransformInfo(transform?.[\"left\"]),\n ...recurseTransformInfo(transform?.[\"right\"]),\n ].filter(isDefined)\n : [];\n}\n\nfunction linkInfo(link?: ApolloLink): unknown[] {\n return link ?\n [\n link?.getMemoryInternals?.(),\n ...linkInfo(link?.left),\n ...linkInfo(link?.right),\n ].filter(isDefined)\n : [];\n}\n"],"names":[],"mappings":"AASA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAwB,CAAxB,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AAC,CAAR,CAAA,CAAA,CAAA,CAAA,CAAc,CAAC,CAAf,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAwB;QACpB,EAAE,CAAN,CAAQ;AACR;AAEA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAS,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,CAAC,CAAlB,CAAA,CAAA,CAAmC,EAAnC;IACE,CAAF,CAAA,CAAA,CAAA,CAAA,EAAS,CAAT,CAAA,CAAA,EAAc;QACR;YACE,CAAR,CAAA,CAAA,CAAY,CAAZ,CAAc,CAAd,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgC,CAAhC,CAAkC,CAAlC,CAAoC;YAC5B,CAAR,CAAA,CAAW,CAAX,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmB,CAAC,CAApB,CAAA,CAAA,CAAwB,CAAxB,CAA0B,CAA1B,CAAA,CAAA,CAA8B,CAAC;YACvB,CAAR,CAAA,CAAW,CAAX,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmB,CAAC,CAApB,CAAA,CAAA,CAAwB,CAAxB,CAA0B,CAA1B,CAAA,CAAA,CAAA,CAA+B,CAAC;QAChC,CAAO,CAAC,CAAR,CAAA,CAAA,CAAA,CAAA,CAAc,CAAC,CAAf,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAwB;QACpB,EAAE,CAAN,CAAQ;AACR;"}
|
|
@@ -2,11 +2,11 @@ import { maybe } from "./maybe.js";
|
|
|
2
2
|
export default (// We don't expect the Function constructor ever to be invoked at runtime, as
|
|
3
3
|
// long as at least one of globalThis, window, self, or global is defined, so
|
|
4
4
|
// we are under no obligation to make it easy for static analysis tools to
|
|
5
|
+
// detect syntactic usage of the Function constructor. If you think you can
|
|
5
6
|
maybe(() => globalThis) ||
|
|
6
7
|
maybe(() => window) ||
|
|
7
8
|
maybe(() => self) ||
|
|
8
|
-
maybe(() => global) || //
|
|
9
|
-
// improve your static analysis to detect this obfuscation, think again. This
|
|
9
|
+
maybe(() => global) || // improve your static analysis to detect this obfuscation, think again. This
|
|
10
10
|
// is an arms race you cannot win, at least not in JavaScript.
|
|
11
11
|
maybe(function () {
|
|
12
12
|
return maybe.constructor("return this")();
|