@apollo/client 4.0.0-alpha.1 → 4.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.changeset/cuddly-spiders-tie.md +5 -0
- package/.changeset/four-ghosts-watch.md +5 -0
- package/.changeset/gorgeous-chefs-tap.md +5 -0
- package/.changeset/hip-vans-act.md +5 -0
- package/.changeset/nervous-goats-allow.md +5 -0
- package/.changeset/pre.json +10 -0
- package/.changeset/slimy-maps-press.md +5 -0
- package/.changeset/small-buttons-rhyme.md +5 -0
- package/.changeset/tall-bikes-develop.md +5 -0
- package/.changeset/unlucky-kiwis-sell.md +5 -0
- package/.changeset/young-phones-fold.md +5 -0
- package/CHANGELOG.md +36 -0
- package/__cjs/cache/core/cache.cjs +1 -1
- package/__cjs/cache/core/cache.cjs.map +1 -1
- package/__cjs/cache/core/cache.d.cts +17 -17
- package/__cjs/cache/core/types/Cache.cjs.map +1 -1
- package/__cjs/cache/core/types/Cache.d.cts +9 -16
- package/__cjs/cache/core/types/DataProxy.d.cts +8 -23
- package/__cjs/cache/inmemory/entityStore.cjs +2 -4
- package/__cjs/cache/inmemory/entityStore.cjs.map +1 -1
- package/__cjs/cache/inmemory/entityStore.d.cts +2 -2
- package/__cjs/cache/inmemory/fragmentRegistry.cjs +3 -3
- package/__cjs/cache/inmemory/fragmentRegistry.cjs.map +1 -1
- package/__cjs/cache/inmemory/helpers.cjs +0 -8
- package/__cjs/cache/inmemory/helpers.cjs.map +1 -1
- package/__cjs/cache/inmemory/helpers.d.cts +3 -4
- package/__cjs/cache/inmemory/inMemoryCache.cjs +4 -12
- package/__cjs/cache/inmemory/inMemoryCache.cjs.map +1 -1
- package/__cjs/cache/inmemory/inMemoryCache.d.cts +7 -8
- package/__cjs/cache/inmemory/policies.cjs +5 -5
- package/__cjs/cache/inmemory/policies.cjs.map +1 -1
- package/__cjs/cache/inmemory/policies.d.cts +1 -1
- package/__cjs/cache/inmemory/reactiveVars.cjs.map +1 -1
- package/__cjs/cache/inmemory/reactiveVars.d.cts +6 -6
- package/__cjs/cache/inmemory/readFromStore.cjs +12 -54
- package/__cjs/cache/inmemory/readFromStore.cjs.map +1 -1
- package/__cjs/cache/inmemory/readFromStore.d.cts +1 -6
- package/__cjs/cache/inmemory/types.d.cts +3 -17
- package/__cjs/cache/inmemory/writeToStore.cjs +4 -4
- package/__cjs/cache/inmemory/writeToStore.cjs.map +1 -1
- package/__cjs/cache/inmemory/writeToStore.d.cts +2 -2
- package/__cjs/core/ApolloClient.cjs.map +1 -1
- package/__cjs/core/ApolloClient.d.cts +18 -18
- package/__cjs/core/LocalState.cjs.map +1 -1
- package/__cjs/core/LocalState.d.cts +8 -8
- package/__cjs/core/ObservableQuery.cjs.map +1 -1
- package/__cjs/core/ObservableQuery.d.cts +4 -4
- package/__cjs/core/QueryInfo.cjs +8 -8
- package/__cjs/core/QueryInfo.cjs.map +1 -1
- package/__cjs/core/QueryInfo.d.cts +2 -1
- package/__cjs/core/QueryManager.cjs +22 -11
- package/__cjs/core/QueryManager.cjs.map +1 -1
- package/__cjs/core/QueryManager.d.cts +26 -16
- package/__cjs/core/types.d.cts +4 -4
- package/__cjs/core/watchQueryOptions.d.cts +10 -26
- package/__cjs/link/http/createHttpLink.d.cts +2 -1
- package/__cjs/link/persisted-queries/index.cjs +1 -1
- package/__cjs/link/persisted-queries/index.cjs.map +1 -1
- package/__cjs/link/persisted-queries/index.d.cts +12 -1
- package/__cjs/link/remove-typename/removeTypenameFromVariables.cjs +1 -1
- package/__cjs/link/remove-typename/removeTypenameFromVariables.cjs.map +1 -1
- package/__cjs/link/remove-typename/removeTypenameFromVariables.d.cts +10 -1
- package/__cjs/masking/maskDefinition.cjs.map +1 -1
- package/__cjs/masking/maskDefinition.d.cts +1 -1
- package/__cjs/masking/maskFragment.cjs.map +1 -1
- package/__cjs/masking/maskFragment.d.cts +1 -1
- package/__cjs/masking/maskOperation.cjs.map +1 -1
- package/__cjs/masking/maskOperation.d.cts +1 -1
- package/__cjs/react/context/ApolloConsumer.cjs.map +1 -1
- package/__cjs/react/context/ApolloConsumer.d.cts +1 -1
- package/__cjs/react/context/ApolloContext.cjs.map +1 -1
- package/__cjs/react/context/ApolloContext.d.cts +1 -1
- package/__cjs/react/context/ApolloProvider.cjs.map +1 -1
- package/__cjs/react/context/ApolloProvider.d.cts +3 -3
- package/__cjs/react/hooks/internal/__use.d.cts +3 -1
- package/__cjs/react/hooks/internal/useIsomorphicLayoutEffect.d.cts +1 -1
- package/__cjs/react/hooks/internal/wrapHook.cjs.map +1 -1
- package/__cjs/react/hooks/internal/wrapHook.d.cts +1 -1
- package/__cjs/react/hooks/useApolloClient.cjs.map +1 -1
- package/__cjs/react/hooks/useApolloClient.d.cts +1 -1
- package/__cjs/react/hooks/useFragment.cjs.map +1 -1
- package/__cjs/react/hooks/useFragment.d.cts +3 -3
- package/__cjs/react/hooks/useLazyQuery.cjs +2 -2
- package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useLazyQuery.d.cts +8 -20
- package/__cjs/react/hooks/useMutation.cjs.map +1 -1
- package/__cjs/react/hooks/useMutation.d.cts +1 -1
- package/__cjs/react/hooks/useQuery.cjs +11 -21
- package/__cjs/react/hooks/useQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useQuery.d.cts +1 -1
- package/__cjs/react/hooks/useQueryRefHandlers.cjs.map +1 -1
- package/__cjs/react/hooks/useReadQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useSubscription.cjs.map +1 -1
- package/__cjs/react/hooks/useSubscription.d.cts +7 -1
- package/__cjs/react/hooks/useSuspenseFragment.cjs.map +1 -1
- package/__cjs/react/hooks/useSuspenseFragment.d.cts +1 -1
- package/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useSuspenseQuery.d.cts +2 -2
- package/__cjs/react/internal/cache/FragmentReference.cjs.map +1 -1
- package/__cjs/react/internal/cache/FragmentReference.d.cts +3 -3
- package/__cjs/react/internal/cache/QueryReference.cjs +3 -14
- package/__cjs/react/internal/cache/QueryReference.cjs.map +1 -1
- package/__cjs/react/internal/cache/QueryReference.d.cts +6 -6
- package/__cjs/react/internal/cache/SuspenseCache.cjs.map +1 -1
- package/__cjs/react/internal/cache/SuspenseCache.d.cts +3 -3
- package/__cjs/react/internal/cache/getSuspenseCache.cjs.map +1 -1
- package/__cjs/react/internal/cache/getSuspenseCache.d.cts +2 -2
- package/__cjs/react/parser/index.cjs +1 -1
- package/__cjs/react/parser/index.cjs.map +1 -1
- package/__cjs/react/query-preloader/createQueryPreloader.cjs.map +1 -1
- package/__cjs/react/query-preloader/createQueryPreloader.d.cts +1 -9
- package/__cjs/react/types/types.d.cts +31 -59
- package/__cjs/react/types/types.documentation.d.cts +0 -20
- package/__cjs/testing/core/mocking/mockClient.cjs.map +1 -1
- package/__cjs/testing/core/mocking/mockClient.d.cts +1 -2
- package/__cjs/testing/internal/disposables/withProdMode.d.cts +1 -1
- package/__cjs/testing/internal/incremental.d.cts +3 -2
- package/__cjs/testing/internal/renderHelpers.cjs.map +1 -1
- package/__cjs/testing/internal/renderHelpers.d.cts +2 -2
- package/__cjs/testing/internal/scenarios/index.d.cts +16 -5
- package/__cjs/testing/matchers/toEqualQueryResult.cjs +0 -1
- package/__cjs/testing/matchers/toEqualQueryResult.cjs.map +1 -1
- package/__cjs/testing/matchers/toEqualQueryResult.d.cts +1 -1
- package/__cjs/testing/react/MockedProvider.cjs.map +1 -1
- package/__cjs/testing/react/MockedProvider.d.cts +3 -3
- package/__cjs/utilities/common/errorHandling.d.cts +1 -1
- package/__cjs/utilities/internal/getMemoryInternals.cjs.map +1 -1
- package/__cjs/utilities/internal/getMemoryInternals.d.cts +1 -1
- package/__cjs/utilities/types/NoInfer.d.cts +1 -1
- package/__cjs/version.cjs +1 -1
- package/__cjs/version.d.cts +1 -1
- package/cache/core/cache.d.ts +17 -17
- package/cache/core/cache.js.map +1 -1
- package/cache/core/types/Cache.d.ts +9 -16
- package/cache/core/types/Cache.js.map +1 -1
- package/cache/core/types/DataProxy.d.ts +8 -23
- package/cache/inmemory/entityStore.d.ts +2 -2
- package/cache/inmemory/entityStore.js +2 -4
- package/cache/inmemory/entityStore.js.map +1 -1
- package/cache/inmemory/helpers.d.ts +0 -1
- package/cache/inmemory/helpers.js +0 -7
- package/cache/inmemory/helpers.js.map +1 -1
- package/cache/inmemory/inMemoryCache.d.ts +7 -8
- package/cache/inmemory/inMemoryCache.js +4 -12
- package/cache/inmemory/inMemoryCache.js.map +1 -1
- package/cache/inmemory/policies.d.ts +1 -1
- package/cache/inmemory/policies.js +5 -5
- package/cache/inmemory/policies.js.map +1 -1
- package/cache/inmemory/reactiveVars.d.ts +6 -6
- package/cache/inmemory/reactiveVars.js.map +1 -1
- package/cache/inmemory/readFromStore.d.ts +1 -6
- package/cache/inmemory/readFromStore.js +12 -54
- package/cache/inmemory/readFromStore.js.map +1 -1
- package/cache/inmemory/types.d.ts +3 -17
- package/cache/inmemory/writeToStore.d.ts +2 -2
- package/cache/inmemory/writeToStore.js +4 -4
- package/cache/inmemory/writeToStore.js.map +1 -1
- package/core/ApolloClient.d.ts +18 -18
- package/core/ApolloClient.js.map +1 -1
- package/core/LocalState.d.ts +6 -6
- package/core/LocalState.js.map +1 -1
- package/core/ObservableQuery.d.ts +3 -3
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryInfo.d.ts +2 -1
- package/core/QueryInfo.js +8 -8
- package/core/QueryInfo.js.map +1 -1
- package/core/QueryManager.d.ts +13 -13
- package/core/QueryManager.js +21 -10
- package/core/QueryManager.js.map +1 -1
- package/core/types.d.ts +4 -4
- package/core/watchQueryOptions.d.ts +10 -26
- package/masking/maskDefinition.d.ts +1 -1
- package/masking/maskDefinition.js.map +1 -1
- package/masking/maskFragment.d.ts +1 -1
- package/masking/maskFragment.js.map +1 -1
- package/masking/maskOperation.d.ts +1 -1
- package/masking/maskOperation.js.map +1 -1
- package/package.json +1 -1
- package/react/context/ApolloConsumer.d.ts +1 -1
- package/react/context/ApolloConsumer.js.map +1 -1
- package/react/context/ApolloContext.d.ts +1 -1
- package/react/context/ApolloContext.js.map +1 -1
- package/react/context/ApolloProvider.d.ts +3 -3
- package/react/context/ApolloProvider.js.map +1 -1
- package/react/hooks/internal/wrapHook.d.ts +1 -1
- package/react/hooks/internal/wrapHook.js.map +1 -1
- package/react/hooks/useApolloClient.d.ts +1 -1
- package/react/hooks/useApolloClient.js.map +1 -1
- package/react/hooks/useFragment.d.ts +3 -3
- package/react/hooks/useFragment.js.map +1 -1
- package/react/hooks/useLazyQuery.d.ts +8 -20
- package/react/hooks/useLazyQuery.js +2 -2
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/react/hooks/useMutation.d.ts +1 -1
- package/react/hooks/useMutation.js.map +1 -1
- package/react/hooks/useQuery.d.ts +1 -1
- package/react/hooks/useQuery.js +11 -21
- package/react/hooks/useQuery.js.map +1 -1
- package/react/hooks/useQueryRefHandlers.js.map +1 -1
- package/react/hooks/useReadQuery.js.map +1 -1
- package/react/hooks/useSubscription.d.ts +1 -1
- package/react/hooks/useSubscription.js.map +1 -1
- package/react/hooks/useSuspenseFragment.d.ts +1 -1
- package/react/hooks/useSuspenseFragment.js.map +1 -1
- package/react/hooks/useSuspenseQuery.d.ts +2 -2
- package/react/hooks/useSuspenseQuery.js.map +1 -1
- package/react/internal/cache/FragmentReference.d.ts +3 -3
- package/react/internal/cache/FragmentReference.js.map +1 -1
- package/react/internal/cache/QueryReference.d.ts +1 -1
- package/react/internal/cache/QueryReference.js +3 -14
- package/react/internal/cache/QueryReference.js.map +1 -1
- package/react/internal/cache/SuspenseCache.d.ts +3 -3
- package/react/internal/cache/SuspenseCache.js.map +1 -1
- package/react/internal/cache/getSuspenseCache.d.ts +1 -1
- package/react/internal/cache/getSuspenseCache.js.map +1 -1
- package/react/query-preloader/createQueryPreloader.d.ts +1 -9
- package/react/query-preloader/createQueryPreloader.js.map +1 -1
- package/react/types/types.d.ts +31 -59
- package/react/types/types.documentation.d.ts +0 -20
- package/testing/core/mocking/mockClient.d.ts +1 -2
- package/testing/core/mocking/mockClient.js.map +1 -1
- package/testing/internal/renderHelpers.d.ts +2 -2
- package/testing/internal/renderHelpers.js.map +1 -1
- package/testing/matchers/toEqualQueryResult.d.ts +1 -1
- package/testing/matchers/toEqualQueryResult.js +0 -1
- package/testing/matchers/toEqualQueryResult.js.map +1 -1
- package/testing/react/MockedProvider.d.ts +3 -3
- package/testing/react/MockedProvider.js.map +1 -1
- package/utilities/internal/getMemoryInternals.js.map +1 -1
- package/utilities/types/NoInfer.d.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/__cjs/cache/inmemory/object-canon.cjs +0 -180
- package/__cjs/cache/inmemory/object-canon.cjs.map +0 -1
- package/__cjs/cache/inmemory/object-canon.d.cts +0 -12
- package/cache/inmemory/object-canon.d.ts +0 -12
- package/cache/inmemory/object-canon.js +0 -176
- package/cache/inmemory/object-canon.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createQueryPreloader.cjs","sources":["../../../../src/react/query-preloader/createQueryPreloader.ts"],"sourcesContent":["import type {\n ApolloClient,\n DefaultContext,\n DocumentNode,\n ErrorPolicy,\n OperationVariables,\n RefetchWritePolicy,\n TypedDocumentNode,\n WatchQueryFetchPolicy,\n WatchQueryOptions,\n} from \"@apollo/client/core\";\nimport type { NoInfer, VariablesOption } from \"@apollo/client/react\";\nimport type { PreloadedQueryRef } from \"@apollo/client/react/internal\";\nimport {\n InternalQueryReference,\n wrapQueryRef,\n} from \"@apollo/client/react/internal\";\nimport type {\n DeepPartial,\n OnlyRequiredProperties,\n} from \"@apollo/client/utilities\";\n\nimport { wrapHook } from \"../hooks/internal/index.js\";\n\nexport type PreloadQueryFetchPolicy = Extract<\n WatchQueryFetchPolicy,\n \"cache-first\" | \"network-only\" | \"no-cache\" | \"cache-and-network\"\n>;\n\nexport type PreloadQueryOptions<\n TVariables extends OperationVariables = OperationVariables,\n> = {\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#canonizeResults:member} */\n canonizeResults?: boolean;\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#context:member} */\n context?: DefaultContext;\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#errorPolicy:member} */\n errorPolicy?: ErrorPolicy;\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#fetchPolicy:member} */\n fetchPolicy?: PreloadQueryFetchPolicy;\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#returnPartialData:member} */\n returnPartialData?: boolean;\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#refetchWritePolicy:member} */\n refetchWritePolicy?: RefetchWritePolicy;\n} & VariablesOption<TVariables>;\n\ntype PreloadQueryOptionsArg<\n TVariables extends OperationVariables,\n TOptions = unknown,\n> = [TVariables] extends [never] ?\n [options?: PreloadQueryOptions<never> & TOptions]\n: {} extends OnlyRequiredProperties<TVariables> ?\n [\n options?: PreloadQueryOptions<NoInfer<TVariables>> &\n Omit<TOptions, \"variables\">,\n ]\n: [\n options: PreloadQueryOptions<NoInfer<TVariables>> &\n Omit<TOptions, \"variables\">,\n ];\n\n/**\n * A function that will begin loading a query when called. It's result can be\n * read by `useReadQuery` which will suspend until the query is loaded.\n * This is useful when you want to start loading a query as early as possible\n * outside of a React component.\n *\n * @example\n * ```js\n * const preloadQuery = createQueryPreloader(client);\n * const queryRef = preloadQuery(query, { variables, ...otherOptions });\n *\n * function App() {\n * return (\n * <Suspense fallback={<div>Loading</div>}>\n * <MyQuery />\n * </Suspense>\n * );\n * }\n *\n * function MyQuery() {\n * const { data } = useReadQuery(queryRef);\n *\n * // do something with `data`\n * }\n * ```\n */\nexport interface PreloadQueryFunction {\n /** {@inheritDoc @apollo/client!PreloadQueryFunction:interface} */\n <\n TData,\n TVariables extends OperationVariables,\n TOptions extends Omit<PreloadQueryOptions, \"variables\">,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n ...[options]: PreloadQueryOptionsArg<NoInfer<TVariables>, TOptions>\n ): PreloadedQueryRef<\n TOptions[\"errorPolicy\"] extends \"ignore\" | \"all\" ?\n TOptions[\"returnPartialData\"] extends true ?\n DeepPartial<TData> | undefined\n : TData | undefined\n : TOptions[\"returnPartialData\"] extends true ? DeepPartial<TData>\n : TData,\n TVariables\n >;\n\n /** {@inheritDoc @apollo/client!PreloadQueryFunction:interface} */\n <TData = unknown, TVariables extends OperationVariables = OperationVariables>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: PreloadQueryOptions<NoInfer<TVariables>> & {\n returnPartialData: true;\n errorPolicy: \"ignore\" | \"all\";\n }\n ): PreloadedQueryRef<DeepPartial<TData> | undefined, TVariables>;\n\n /** {@inheritDoc @apollo/client!PreloadQueryFunction:interface} */\n <TData = unknown, TVariables extends OperationVariables = OperationVariables>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: PreloadQueryOptions<NoInfer<TVariables>> & {\n errorPolicy: \"ignore\" | \"all\";\n }\n ): PreloadedQueryRef<TData | undefined, TVariables>;\n\n /** {@inheritDoc @apollo/client!PreloadQueryFunction:interface} */\n <TData = unknown, TVariables extends OperationVariables = OperationVariables>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: PreloadQueryOptions<NoInfer<TVariables>> & {\n returnPartialData: true;\n }\n ): PreloadedQueryRef<DeepPartial<TData>, TVariables>;\n\n /** {@inheritDoc @apollo/client!PreloadQueryFunction:interface} */\n <TData = unknown, TVariables extends OperationVariables = OperationVariables>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n ...[options]: PreloadQueryOptionsArg<NoInfer<TVariables>>\n ): PreloadedQueryRef<TData, TVariables>;\n}\n\n/**\n * A higher order function that returns a `preloadQuery` function which\n * can be used to begin loading a query with the given `client`. This is useful\n * when you want to start loading a query as early as possible outside of a\n * React component.\n *\n * > Refer to the [Suspense - Initiating queries outside React](https://www.apollographql.com/docs/react/data/suspense#initiating-queries-outside-react) section for a more in-depth overview.\n *\n * @param client - The `ApolloClient` instance that will be used to load queries\n * from the returned `preloadQuery` function.\n * @returns The `preloadQuery` function.\n *\n * @example\n * ```js\n * const preloadQuery = createQueryPreloader(client);\n * ```\n * @since 3.9.0\n */\nexport function createQueryPreloader(\n client: ApolloClient<any>\n): PreloadQueryFunction {\n return wrapHook(\n \"createQueryPreloader\",\n _createQueryPreloader,\n client\n )(client);\n}\n\nconst _createQueryPreloader: typeof createQueryPreloader = (client) => {\n return function preloadQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: PreloadQueryOptions<NoInfer<TVariables>> &\n VariablesOption<TVariables> = {} as any\n ): PreloadedQueryRef<TData, TVariables> {\n const queryRef = new InternalQueryReference(\n client.watchQuery({\n ...options,\n query,\n } as WatchQueryOptions<any, any>),\n {\n autoDisposeTimeoutMs:\n client.defaultOptions.react?.suspense?.autoDisposeTimeoutMs,\n }\n );\n\n return wrapQueryRef(queryRef) as PreloadedQueryRef<TData, TVariables>;\n };\n};\n"],"names":[],"mappings":";;AA4JA,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,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AA/IA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA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,CAAA,CAA4B,EAClB,CADV,CAAA,CAAA,CAAA,CAAA,CACgB,CAAC,CADjB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAC+B,CAAC,CADhC,CAAA,CAAA,CAAA,CACqC,CADrC,CACuC,CADvC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAC+C,CAD/C,CACiD,CADjD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACqE;QACrE,CAAO,CACF;QAED,CAAJ,CAAA,CAAA,CAAA,CAAA,EAAW,CAAX,CAAA,EAAW,CAAX,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAuB,CAAvB,CAAwB,CAAxB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgC,CAAyC;IACvE,CAAC;AACH,CAAA;"}
|
|
1
|
+
{"version":3,"file":"createQueryPreloader.cjs","sources":["../../../../src/react/query-preloader/createQueryPreloader.ts"],"sourcesContent":["import type {\n ApolloClient,\n DefaultContext,\n DocumentNode,\n ErrorPolicy,\n OperationVariables,\n RefetchWritePolicy,\n TypedDocumentNode,\n WatchQueryFetchPolicy,\n WatchQueryOptions,\n} from \"@apollo/client/core\";\nimport type { NoInfer, VariablesOption } from \"@apollo/client/react\";\nimport type { PreloadedQueryRef } from \"@apollo/client/react/internal\";\nimport {\n InternalQueryReference,\n wrapQueryRef,\n} from \"@apollo/client/react/internal\";\nimport type {\n DeepPartial,\n OnlyRequiredProperties,\n} from \"@apollo/client/utilities\";\n\nimport { wrapHook } from \"../hooks/internal/index.js\";\n\nexport type PreloadQueryFetchPolicy = Extract<\n WatchQueryFetchPolicy,\n \"cache-first\" | \"network-only\" | \"no-cache\" | \"cache-and-network\"\n>;\n\nexport type PreloadQueryOptions<\n TVariables extends OperationVariables = OperationVariables,\n> = {\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#context:member} */\n context?: DefaultContext;\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#errorPolicy:member} */\n errorPolicy?: ErrorPolicy;\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#fetchPolicy:member} */\n fetchPolicy?: PreloadQueryFetchPolicy;\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#returnPartialData:member} */\n returnPartialData?: boolean;\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#refetchWritePolicy:member} */\n refetchWritePolicy?: RefetchWritePolicy;\n} & VariablesOption<TVariables>;\n\ntype PreloadQueryOptionsArg<\n TVariables extends OperationVariables,\n TOptions = unknown,\n> = [TVariables] extends [never] ?\n [options?: PreloadQueryOptions<never> & TOptions]\n: {} extends OnlyRequiredProperties<TVariables> ?\n [\n options?: PreloadQueryOptions<NoInfer<TVariables>> &\n Omit<TOptions, \"variables\">,\n ]\n: [\n options: PreloadQueryOptions<NoInfer<TVariables>> &\n Omit<TOptions, \"variables\">,\n ];\n\n/**\n * A function that will begin loading a query when called. It's result can be\n * read by `useReadQuery` which will suspend until the query is loaded.\n * This is useful when you want to start loading a query as early as possible\n * outside of a React component.\n *\n * @example\n * ```js\n * const preloadQuery = createQueryPreloader(client);\n * const queryRef = preloadQuery(query, { variables, ...otherOptions });\n *\n * function App() {\n * return (\n * <Suspense fallback={<div>Loading</div>}>\n * <MyQuery />\n * </Suspense>\n * );\n * }\n *\n * function MyQuery() {\n * const { data } = useReadQuery(queryRef);\n *\n * // do something with `data`\n * }\n * ```\n */\nexport interface PreloadQueryFunction {\n /** {@inheritDoc @apollo/client!PreloadQueryFunction:interface} */\n <\n TData,\n TVariables extends OperationVariables,\n TOptions extends Omit<PreloadQueryOptions, \"variables\">,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n ...[options]: PreloadQueryOptionsArg<NoInfer<TVariables>, TOptions>\n ): PreloadedQueryRef<\n TOptions[\"errorPolicy\"] extends \"ignore\" | \"all\" ?\n TOptions[\"returnPartialData\"] extends true ?\n DeepPartial<TData> | undefined\n : TData | undefined\n : TOptions[\"returnPartialData\"] extends true ? DeepPartial<TData>\n : TData,\n TVariables\n >;\n\n /** {@inheritDoc @apollo/client!PreloadQueryFunction:interface} */\n <TData = unknown, TVariables extends OperationVariables = OperationVariables>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: PreloadQueryOptions<NoInfer<TVariables>> & {\n returnPartialData: true;\n errorPolicy: \"ignore\" | \"all\";\n }\n ): PreloadedQueryRef<DeepPartial<TData> | undefined, TVariables>;\n\n /** {@inheritDoc @apollo/client!PreloadQueryFunction:interface} */\n <TData = unknown, TVariables extends OperationVariables = OperationVariables>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: PreloadQueryOptions<NoInfer<TVariables>> & {\n errorPolicy: \"ignore\" | \"all\";\n }\n ): PreloadedQueryRef<TData | undefined, TVariables>;\n\n /** {@inheritDoc @apollo/client!PreloadQueryFunction:interface} */\n <TData = unknown, TVariables extends OperationVariables = OperationVariables>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: PreloadQueryOptions<NoInfer<TVariables>> & {\n returnPartialData: true;\n }\n ): PreloadedQueryRef<DeepPartial<TData>, TVariables>;\n\n /** {@inheritDoc @apollo/client!PreloadQueryFunction:interface} */\n <TData = unknown, TVariables extends OperationVariables = OperationVariables>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n ...[options]: PreloadQueryOptionsArg<NoInfer<TVariables>>\n ): PreloadedQueryRef<TData, TVariables>;\n}\n\n/**\n * A higher order function that returns a `preloadQuery` function which\n * can be used to begin loading a query with the given `client`. This is useful\n * when you want to start loading a query as early as possible outside of a\n * React component.\n *\n * > Refer to the [Suspense - Initiating queries outside React](https://www.apollographql.com/docs/react/data/suspense#initiating-queries-outside-react) section for a more in-depth overview.\n *\n * @param client - The `ApolloClient` instance that will be used to load queries\n * from the returned `preloadQuery` function.\n * @returns The `preloadQuery` function.\n *\n * @example\n * ```js\n * const preloadQuery = createQueryPreloader(client);\n * ```\n * @since 3.9.0\n */\nexport function createQueryPreloader(\n client: ApolloClient\n): PreloadQueryFunction {\n return wrapHook(\n \"createQueryPreloader\",\n _createQueryPreloader,\n client\n )(client);\n}\n\nconst _createQueryPreloader: typeof createQueryPreloader = (client) => {\n return function preloadQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: PreloadQueryOptions<NoInfer<TVariables>> &\n VariablesOption<TVariables> = {} as any\n ): PreloadedQueryRef<TData, TVariables> {\n const queryRef = new InternalQueryReference(\n client.watchQuery({\n ...options,\n query,\n } as WatchQueryOptions<any, any>),\n {\n autoDisposeTimeoutMs:\n client.defaultOptions.react?.suspense?.autoDisposeTimeoutMs,\n }\n );\n\n return wrapQueryRef(queryRef) as PreloadedQueryRef<TData, TVariables>;\n };\n};\n"],"names":[],"mappings":";;AA0JA,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,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AA7IA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA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ADV,CAAA,CAAA,CAAA,CAAA,CACgB,CAAC,CADjB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAC+B,CAAC,CADhC,CAAA,CAAA,CAAA,CACqC,CADrC,CACuC,CADvC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAC+C,CAD/C,CACiD,CADjD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACqE;QACrE,CAAO,CACF;QAED,CAAJ,CAAA,CAAA,CAAA,CAAA,EAAW,CAAX,CAAA,EAAW,CAAX,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAuB,CAAvB,CAAwB,CAAxB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgC,CAAyC;IACvE,CAAC;AACH,CAAA;"}
|
|
@@ -4,14 +4,6 @@ import type { PreloadedQueryRef } from "@apollo/client/react/internal";
|
|
|
4
4
|
import type { DeepPartial, OnlyRequiredProperties } from "@apollo/client/utilities";
|
|
5
5
|
export type PreloadQueryFetchPolicy = Extract<WatchQueryFetchPolicy, "cache-first" | "network-only" | "no-cache" | "cache-and-network">;
|
|
6
6
|
export type PreloadQueryOptions<TVariables extends OperationVariables = OperationVariables> = {
|
|
7
|
-
/**
|
|
8
|
-
* Whether to canonize cache results before returning them. Canonization takes some extra time, but it speeds up future deep equality comparisons. Defaults to false.
|
|
9
|
-
*
|
|
10
|
-
* @deprecated
|
|
11
|
-
*
|
|
12
|
-
* Using `canonizeResults` can result in memory leaks so we generally do not recommend using this option anymore. A future version of Apollo Client will contain a similar feature without the risk of memory leaks.
|
|
13
|
-
*/
|
|
14
|
-
canonizeResults?: boolean;
|
|
15
7
|
/**
|
|
16
8
|
* 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.
|
|
17
9
|
*
|
|
@@ -243,6 +235,6 @@ export interface PreloadQueryFunction {
|
|
|
243
235
|
* ```
|
|
244
236
|
* @since 3.9.0
|
|
245
237
|
*/
|
|
246
|
-
export declare function createQueryPreloader(client: ApolloClient
|
|
238
|
+
export declare function createQueryPreloader(client: ApolloClient): PreloadQueryFunction;
|
|
247
239
|
export {};
|
|
248
240
|
//# sourceMappingURL=createQueryPreloader.d.cts.map
|
|
@@ -9,9 +9,9 @@ import type { MutationSharedOptions, SharedWatchQueryOptions } from "../../core/
|
|
|
9
9
|
export type { PreloadedQueryRef, QueryRef, QueryReference, } from "../internal/index.cjs";
|
|
10
10
|
export type { DefaultContext as Context } from "../../core/index.cjs";
|
|
11
11
|
export type CommonOptions<TOptions> = TOptions & {
|
|
12
|
-
client?: ApolloClient
|
|
12
|
+
client?: ApolloClient;
|
|
13
13
|
};
|
|
14
|
-
export interface BaseQueryOptions<TVariables extends OperationVariables = OperationVariables, TData =
|
|
14
|
+
export interface BaseQueryOptions<TVariables extends OperationVariables = OperationVariables, TData = unknown> extends SharedWatchQueryOptions<TVariables, TData> {
|
|
15
15
|
/**
|
|
16
16
|
* Pass `false` to skip executing the query during [server-side rendering](https://www.apollographql.com/docs/react/performance/server-side-rendering/).
|
|
17
17
|
*
|
|
@@ -29,7 +29,7 @@ export interface BaseQueryOptions<TVariables extends OperationVariables = Operat
|
|
|
29
29
|
*
|
|
30
30
|
* 1. Operation options
|
|
31
31
|
*/
|
|
32
|
-
client?: ApolloClient
|
|
32
|
+
client?: ApolloClient;
|
|
33
33
|
/**
|
|
34
34
|
* 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.
|
|
35
35
|
*
|
|
@@ -39,7 +39,7 @@ export interface BaseQueryOptions<TVariables extends OperationVariables = Operat
|
|
|
39
39
|
*/
|
|
40
40
|
context?: DefaultContext;
|
|
41
41
|
}
|
|
42
|
-
export interface QueryFunctionOptions<TData =
|
|
42
|
+
export interface QueryFunctionOptions<TData = unknown, TVariables extends OperationVariables = OperationVariables> extends BaseQueryOptions<TVariables, TData> {
|
|
43
43
|
/**
|
|
44
44
|
* If true, the query is not executed.
|
|
45
45
|
*
|
|
@@ -50,8 +50,6 @@ export interface QueryFunctionOptions<TData = any, TVariables extends OperationV
|
|
|
50
50
|
* 1. Operation options
|
|
51
51
|
*/
|
|
52
52
|
skip?: boolean;
|
|
53
|
-
/** @internal */
|
|
54
|
-
defaultOptions?: Partial<WatchQueryOptions<TVariables, TData>>;
|
|
55
53
|
}
|
|
56
54
|
export interface ObservableQueryFields<TData, TVariables extends OperationVariables> {
|
|
57
55
|
/**
|
|
@@ -131,7 +129,7 @@ export interface ObservableQueryFields<TData, TVariables extends OperationVariab
|
|
|
131
129
|
}) => Unmasked<TData>;
|
|
132
130
|
}) => Promise<ApolloQueryResult<MaybeMasked<TFetchData>>>;
|
|
133
131
|
}
|
|
134
|
-
export interface QueryResult<TData =
|
|
132
|
+
export interface QueryResult<TData = unknown, TVariables extends OperationVariables = OperationVariables> extends ObservableQueryFields<TData, TVariables> {
|
|
135
133
|
/**
|
|
136
134
|
* The instance of Apollo Client that executed the query. Can be useful for manually executing followup queries or writing data to the cache.
|
|
137
135
|
*
|
|
@@ -139,7 +137,7 @@ export interface QueryResult<TData = any, TVariables extends OperationVariables
|
|
|
139
137
|
*
|
|
140
138
|
* 2. Network info
|
|
141
139
|
*/
|
|
142
|
-
client: ApolloClient
|
|
140
|
+
client: ApolloClient;
|
|
143
141
|
/**
|
|
144
142
|
* A reference to the internal `ObservableQuery` used by the hook.
|
|
145
143
|
*/
|
|
@@ -192,18 +190,8 @@ export interface QueryResult<TData = any, TVariables extends OperationVariables
|
|
|
192
190
|
* 2. Network info
|
|
193
191
|
*/
|
|
194
192
|
networkStatus: NetworkStatus;
|
|
195
|
-
/**
|
|
196
|
-
* If `true`, the associated lazy query has been executed.
|
|
197
|
-
*
|
|
198
|
-
* This field is only present on the result object returned by [`useLazyQuery`](/react/data/queries/#executing-queries-manually).
|
|
199
|
-
*
|
|
200
|
-
* @docGroup
|
|
201
|
-
*
|
|
202
|
-
* 2. Network info
|
|
203
|
-
*/
|
|
204
|
-
called: boolean;
|
|
205
193
|
}
|
|
206
|
-
export interface QueryDataOptions<TData =
|
|
194
|
+
export interface QueryDataOptions<TData = unknown, TVariables extends OperationVariables = OperationVariables> extends QueryFunctionOptions<TData, TVariables> {
|
|
207
195
|
children?: (result: QueryResult<TData, TVariables>) => ReactTypes.ReactNode;
|
|
208
196
|
/**
|
|
209
197
|
* A GraphQL query string parsed into an AST with the gql template literal.
|
|
@@ -214,7 +202,7 @@ export interface QueryDataOptions<TData = any, TVariables extends OperationVaria
|
|
|
214
202
|
*/
|
|
215
203
|
query: DocumentNode | TypedDocumentNode<TData, TVariables>;
|
|
216
204
|
}
|
|
217
|
-
export interface QueryHookOptions<TData =
|
|
205
|
+
export interface QueryHookOptions<TData = unknown, TVariables extends OperationVariables = OperationVariables> extends QueryFunctionOptions<TData, TVariables> {
|
|
218
206
|
}
|
|
219
207
|
export type SuspenseQueryHookFetchPolicy = Extract<WatchQueryFetchPolicy, "cache-first" | "network-only" | "no-cache" | "cache-and-network">;
|
|
220
208
|
export interface SuspenseQueryHookOptions<TData = unknown, TVariables extends OperationVariables = OperationVariables> {
|
|
@@ -227,7 +215,7 @@ export interface SuspenseQueryHookOptions<TData = unknown, TVariables extends Op
|
|
|
227
215
|
*
|
|
228
216
|
* 1. Operation options
|
|
229
217
|
*/
|
|
230
|
-
client?: ApolloClient
|
|
218
|
+
client?: ApolloClient;
|
|
231
219
|
/**
|
|
232
220
|
* 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.
|
|
233
221
|
*
|
|
@@ -259,14 +247,6 @@ export interface SuspenseQueryHookOptions<TData = unknown, TVariables extends Op
|
|
|
259
247
|
*/
|
|
260
248
|
errorPolicy?: ErrorPolicy;
|
|
261
249
|
/**
|
|
262
|
-
* Whether to canonize cache results before returning them. Canonization takes some extra time, but it speeds up future deep equality comparisons. Defaults to false.
|
|
263
|
-
*
|
|
264
|
-
* @deprecated
|
|
265
|
-
*
|
|
266
|
-
* Using `canonizeResults` can result in memory leaks so we generally do not recommend using this option anymore. A future version of Apollo Client will contain a similar feature without the risk of memory leaks.
|
|
267
|
-
*/
|
|
268
|
-
canonizeResults?: boolean;
|
|
269
|
-
/**
|
|
270
250
|
* If `true`, the query can return partial results from the cache if the cache doesn't contain results for all queried fields.
|
|
271
251
|
*
|
|
272
252
|
* The default value is `false`.
|
|
@@ -332,7 +312,7 @@ export interface SuspenseQueryHookOptions<TData = unknown, TVariables extends Op
|
|
|
332
312
|
skip?: boolean;
|
|
333
313
|
}
|
|
334
314
|
export type BackgroundQueryHookFetchPolicy = Extract<WatchQueryFetchPolicy, "cache-first" | "network-only" | "no-cache" | "cache-and-network">;
|
|
335
|
-
export interface BackgroundQueryHookOptions<TData = unknown, TVariables extends OperationVariables = OperationVariables> extends Pick<QueryHookOptions<TData, TVariables>, "client" | "variables" | "errorPolicy" | "context" | "
|
|
315
|
+
export interface BackgroundQueryHookOptions<TData = unknown, TVariables extends OperationVariables = OperationVariables> extends Pick<QueryHookOptions<TData, TVariables>, "client" | "variables" | "errorPolicy" | "context" | "returnPartialData" | "refetchWritePolicy"> {
|
|
336
316
|
fetchPolicy?: BackgroundQueryHookFetchPolicy;
|
|
337
317
|
queryKey?: string | number | any[];
|
|
338
318
|
/**
|
|
@@ -360,14 +340,6 @@ export interface BackgroundQueryHookOptions<TData = unknown, TVariables extends
|
|
|
360
340
|
}
|
|
361
341
|
export type LoadableQueryHookFetchPolicy = Extract<WatchQueryFetchPolicy, "cache-first" | "network-only" | "no-cache" | "cache-and-network">;
|
|
362
342
|
export interface LoadableQueryHookOptions {
|
|
363
|
-
/**
|
|
364
|
-
* Whether to canonize cache results before returning them. Canonization takes some extra time, but it speeds up future deep equality comparisons. Defaults to false.
|
|
365
|
-
*
|
|
366
|
-
* @deprecated
|
|
367
|
-
*
|
|
368
|
-
* Using `canonizeResults` can result in memory leaks so we generally do not recommend using this option anymore. A future version of Apollo Client will contain a similar feature without the risk of memory leaks.
|
|
369
|
-
*/
|
|
370
|
-
canonizeResults?: boolean;
|
|
371
343
|
/**
|
|
372
344
|
* The instance of `ApolloClient` to use to execute the query.
|
|
373
345
|
*
|
|
@@ -377,7 +349,7 @@ export interface LoadableQueryHookOptions {
|
|
|
377
349
|
*
|
|
378
350
|
* 1. Operation options
|
|
379
351
|
*/
|
|
380
|
-
client?: ApolloClient
|
|
352
|
+
client?: ApolloClient;
|
|
381
353
|
/**
|
|
382
354
|
* 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.
|
|
383
355
|
*
|
|
@@ -440,7 +412,7 @@ export interface LoadableQueryHookOptions {
|
|
|
440
412
|
returnPartialData?: boolean;
|
|
441
413
|
}
|
|
442
414
|
export type RefetchQueriesFunction = (...args: any[]) => InternalRefetchQueriesInclude;
|
|
443
|
-
export interface BaseMutationOptions<TData =
|
|
415
|
+
export interface BaseMutationOptions<TData = unknown, TVariables = OperationVariables, TContext = DefaultContext, TCache extends ApolloCache = ApolloCache> extends MutationSharedOptions<TData, TVariables, TContext, TCache> {
|
|
444
416
|
/**
|
|
445
417
|
* The instance of `ApolloClient` to use to execute the mutation.
|
|
446
418
|
*
|
|
@@ -450,7 +422,7 @@ export interface BaseMutationOptions<TData = any, TVariables = OperationVariable
|
|
|
450
422
|
*
|
|
451
423
|
* 2. Networking options
|
|
452
424
|
*/
|
|
453
|
-
client?: ApolloClient
|
|
425
|
+
client?: ApolloClient;
|
|
454
426
|
/**
|
|
455
427
|
* If `true`, the in-progress mutation's associated component re-renders whenever the network status changes or a network error occurs.
|
|
456
428
|
*
|
|
@@ -470,7 +442,7 @@ export interface BaseMutationOptions<TData = any, TVariables = OperationVariable
|
|
|
470
442
|
*
|
|
471
443
|
* 1. Operation options
|
|
472
444
|
*/
|
|
473
|
-
onCompleted?: (data: MaybeMasked<TData>, clientOptions?: BaseMutationOptions) => void;
|
|
445
|
+
onCompleted?: (data: MaybeMasked<TData>, clientOptions?: BaseMutationOptions<TData, TVariables, TContext, TCache>) => void;
|
|
474
446
|
/**
|
|
475
447
|
* A callback function that's called when the mutation encounters one or more errors (unless `errorPolicy` is `ignore`).
|
|
476
448
|
*
|
|
@@ -480,9 +452,9 @@ export interface BaseMutationOptions<TData = any, TVariables = OperationVariable
|
|
|
480
452
|
*
|
|
481
453
|
* 1. Operation options
|
|
482
454
|
*/
|
|
483
|
-
onError?: (error: ErrorLike, clientOptions?: BaseMutationOptions) => void;
|
|
455
|
+
onError?: (error: ErrorLike, clientOptions?: BaseMutationOptions<TData, TVariables, TContext, TCache>) => void;
|
|
484
456
|
}
|
|
485
|
-
export interface MutationFunctionOptions<TData =
|
|
457
|
+
export interface MutationFunctionOptions<TData = unknown, TVariables = OperationVariables, TContext = DefaultContext, TCache extends ApolloCache = ApolloCache> extends BaseMutationOptions<TData, TVariables, TContext, TCache> {
|
|
486
458
|
/**
|
|
487
459
|
* A GraphQL document, often created with `gql` from the `graphql-tag` package, that contains a single mutation inside of it.
|
|
488
460
|
*
|
|
@@ -492,7 +464,7 @@ export interface MutationFunctionOptions<TData = any, TVariables = OperationVari
|
|
|
492
464
|
*/
|
|
493
465
|
mutation?: DocumentNode | TypedDocumentNode<TData, TVariables>;
|
|
494
466
|
}
|
|
495
|
-
export interface MutationResult<TData =
|
|
467
|
+
export interface MutationResult<TData = unknown> {
|
|
496
468
|
/**
|
|
497
469
|
* The data returned from your mutation. Can be `undefined` if `ignoreResults` is `true`.
|
|
498
470
|
*/
|
|
@@ -516,31 +488,31 @@ export interface MutationResult<TData = any> {
|
|
|
516
488
|
*
|
|
517
489
|
* Can be useful for manually executing followup operations or writing data to the cache.
|
|
518
490
|
*/
|
|
519
|
-
client: ApolloClient
|
|
491
|
+
client: ApolloClient;
|
|
520
492
|
/**
|
|
521
493
|
* A function that you can call to reset the mutation's result to its initial, uncalled state.
|
|
522
494
|
*/
|
|
523
495
|
reset: () => void;
|
|
524
496
|
}
|
|
525
|
-
export declare type MutationFunction<TData =
|
|
526
|
-
export interface MutationHookOptions<TData =
|
|
497
|
+
export declare type MutationFunction<TData = unknown, TVariables = OperationVariables, TContext = DefaultContext, TCache extends ApolloCache = ApolloCache> = (options?: MutationFunctionOptions<TData, TVariables, TContext, TCache>) => Promise<FetchResult<MaybeMasked<TData>>>;
|
|
498
|
+
export interface MutationHookOptions<TData = unknown, TVariables = OperationVariables, TContext = DefaultContext, TCache extends ApolloCache = ApolloCache> extends BaseMutationOptions<TData, TVariables, TContext, TCache> {
|
|
527
499
|
}
|
|
528
|
-
export interface MutationDataOptions<TData =
|
|
500
|
+
export interface MutationDataOptions<TData = unknown, TVariables = OperationVariables, TContext = DefaultContext, TCache extends ApolloCache = ApolloCache> extends BaseMutationOptions<TData, TVariables, TContext, TCache> {
|
|
529
501
|
mutation: DocumentNode | TypedDocumentNode<TData, TVariables>;
|
|
530
502
|
}
|
|
531
|
-
export type MutationTuple<TData, TVariables, TContext = DefaultContext, TCache extends ApolloCache
|
|
503
|
+
export type MutationTuple<TData, TVariables, TContext = DefaultContext, TCache extends ApolloCache = ApolloCache> = [
|
|
532
504
|
mutate: (options?: MutationFunctionOptions<TData, TVariables, TContext, TCache>) => Promise<FetchResult<MaybeMasked<TData>>>,
|
|
533
505
|
result: MutationResult<TData>
|
|
534
506
|
];
|
|
535
|
-
export interface OnDataOptions<TData =
|
|
536
|
-
client: ApolloClient
|
|
507
|
+
export interface OnDataOptions<TData = unknown> {
|
|
508
|
+
client: ApolloClient;
|
|
537
509
|
data: SubscriptionResult<TData>;
|
|
538
510
|
}
|
|
539
|
-
export interface OnSubscriptionDataOptions<TData =
|
|
540
|
-
client: ApolloClient
|
|
511
|
+
export interface OnSubscriptionDataOptions<TData = unknown> {
|
|
512
|
+
client: ApolloClient;
|
|
541
513
|
subscriptionData: SubscriptionResult<TData>;
|
|
542
514
|
}
|
|
543
|
-
export interface BaseSubscriptionOptions<TData =
|
|
515
|
+
export interface BaseSubscriptionOptions<TData = unknown, TVariables extends OperationVariables = OperationVariables> {
|
|
544
516
|
/**
|
|
545
517
|
* An object containing all of the variables your subscription needs to execute
|
|
546
518
|
*/
|
|
@@ -560,7 +532,7 @@ export interface BaseSubscriptionOptions<TData = any, TVariables extends Operati
|
|
|
560
532
|
/**
|
|
561
533
|
* An `ApolloClient` instance. By default `useSubscription` / `Subscription` uses the client passed down via context, but a different client can be passed in.
|
|
562
534
|
*/
|
|
563
|
-
client?: ApolloClient
|
|
535
|
+
client?: ApolloClient;
|
|
564
536
|
/**
|
|
565
537
|
* Determines if the current subscription should be skipped. Useful if, for example, variables depend on previous queries and are not ready yet.
|
|
566
538
|
*/
|
|
@@ -622,7 +594,7 @@ export interface BaseSubscriptionOptions<TData = any, TVariables extends Operati
|
|
|
622
594
|
*/
|
|
623
595
|
ignoreResults?: boolean;
|
|
624
596
|
}
|
|
625
|
-
export interface SubscriptionResult<TData =
|
|
597
|
+
export interface SubscriptionResult<TData = unknown, TVariables = OperationVariables> {
|
|
626
598
|
/**
|
|
627
599
|
* A boolean that indicates whether any initial data has been returned
|
|
628
600
|
*/
|
|
@@ -640,12 +612,12 @@ export interface SubscriptionResult<TData = any, TVariables = any> {
|
|
|
640
612
|
*/
|
|
641
613
|
variables?: TVariables;
|
|
642
614
|
}
|
|
643
|
-
export interface SubscriptionHookOptions<TData =
|
|
615
|
+
export interface SubscriptionHookOptions<TData = unknown, TVariables extends OperationVariables = OperationVariables> extends BaseSubscriptionOptions<TData, TVariables> {
|
|
644
616
|
}
|
|
645
617
|
/**
|
|
646
618
|
* @deprecated This type is not used anymore. It will be removed in the next major version of Apollo Client
|
|
647
619
|
*/
|
|
648
|
-
export interface SubscriptionDataOptions<TData =
|
|
620
|
+
export interface SubscriptionDataOptions<TData = unknown, TVariables extends OperationVariables = OperationVariables> extends BaseSubscriptionOptions<TData, TVariables> {
|
|
649
621
|
subscription: DocumentNode | TypedDocumentNode<TData, TVariables>;
|
|
650
622
|
children?: null | ((result: SubscriptionResult<TData>) => ReactTypes.ReactNode);
|
|
651
623
|
}
|
|
@@ -94,18 +94,6 @@ export interface QueryOptionsDocumentation {
|
|
|
94
94
|
* @docGroup 3. Caching options
|
|
95
95
|
*/
|
|
96
96
|
refetchWritePolicy_suspense: unknown;
|
|
97
|
-
/**
|
|
98
|
-
* Whether to canonize cache results before returning them. Canonization
|
|
99
|
-
* takes some extra time, but it speeds up future deep equality comparisons.
|
|
100
|
-
* Defaults to false.
|
|
101
|
-
*
|
|
102
|
-
* @deprecated
|
|
103
|
-
* Using `canonizeResults` can result in memory leaks so we generally do not
|
|
104
|
-
* recommend using this option anymore.
|
|
105
|
-
* A future version of Apollo Client will contain a similar feature without
|
|
106
|
-
* the risk of memory leaks.
|
|
107
|
-
*/
|
|
108
|
-
canonizeResults: unknown;
|
|
109
97
|
/**
|
|
110
98
|
* If true, the query is not executed.
|
|
111
99
|
*
|
|
@@ -210,14 +198,6 @@ export interface QueryResultDocumentation {
|
|
|
210
198
|
* @docGroup 2. Network info
|
|
211
199
|
*/
|
|
212
200
|
networkStatus: unknown;
|
|
213
|
-
/**
|
|
214
|
-
* If `true`, the associated lazy query has been executed.
|
|
215
|
-
*
|
|
216
|
-
* This field is only present on the result object returned by [`useLazyQuery`](/react/data/queries/#executing-queries-manually).
|
|
217
|
-
*
|
|
218
|
-
* @docGroup 2. Network info
|
|
219
|
-
*/
|
|
220
|
-
called: unknown;
|
|
221
201
|
/**
|
|
222
202
|
* An object containing the variables that were provided for the query.
|
|
223
203
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mockClient.cjs","sources":["../../../../../src/testing/core/mocking/mockClient.ts"],"sourcesContent":["import type { DocumentNode } from \"graphql\";\n\nimport
|
|
1
|
+
{"version":3,"file":"mockClient.cjs","sources":["../../../../../src/testing/core/mocking/mockClient.ts"],"sourcesContent":["import type { DocumentNode } from \"graphql\";\n\nimport { InMemoryCache } from \"@apollo/client/cache\";\nimport { ApolloClient } from \"@apollo/client/core\";\n\nimport { mockSingleLink } from \"./mockLink.js\";\n\nexport function createMockClient<TData>(\n data: TData,\n query: DocumentNode,\n variables = {}\n): ApolloClient {\n return new ApolloClient({\n link: mockSingleLink({\n request: { query, variables },\n result: { data },\n }).setOnError((error) => {\n throw error;\n }),\n cache: new InMemoryCache(),\n });\n}\n"],"names":[],"mappings":";;AAOA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AALA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,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;AACA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,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;AAEA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA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,CAAA,CAAA,CAAA,CAAiB,CAAC,CAAC,CAAnB,CAAA,CAAA,CAAA,CAAwB,EAAE,CAA1B,EAAA;YACM,CAAN,CAAA,CAAA,CAAA,EAAY,CAAZ,CAAA,CAAA,CAAA,CAAiB;QACb,CAAC,CAAC;QACF,CAAJ,CAAA,CAAA,CAAA,CAAS,EAAE,CAAX,CAAA,EAAe,CAAf,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA4B,CAA5B,CAA8B;IAC9B,CAAG,CAAC;AACJ;"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { DocumentNode } from "graphql";
|
|
2
|
-
import type { NormalizedCacheObject } from "@apollo/client/cache";
|
|
3
2
|
import { ApolloClient } from "@apollo/client/core";
|
|
4
|
-
export declare function createMockClient<TData>(data: TData, query: DocumentNode, variables?: {}): ApolloClient
|
|
3
|
+
export declare function createMockClient<TData>(data: TData, query: DocumentNode, variables?: {}): ApolloClient;
|
|
5
4
|
//# sourceMappingURL=mockClient.d.cts.map
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { GraphQLFormattedError, InitialIncrementalExecutionResult, SubsequentIncrementalExecutionResult } from "graphql-17-alpha2";
|
|
2
2
|
import type { ApolloPayloadResult } from "@apollo/client/core";
|
|
3
|
+
import { HttpLink } from "@apollo/client/link/http";
|
|
3
4
|
export declare function mockDeferStream<TData = Record<string, unknown>, TExtensions = Record<string, unknown>>(): {
|
|
4
|
-
httpLink:
|
|
5
|
+
httpLink: HttpLink;
|
|
5
6
|
enqueueInitialChunk(chunk: InitialIncrementalExecutionResult<TData, TExtensions>): void;
|
|
6
7
|
enqueueSubsequentChunk(chunk: SubsequentIncrementalExecutionResult<TData, TExtensions>): void;
|
|
7
8
|
enqueueErrorChunk(errors: GraphQLFormattedError[]): void;
|
|
8
9
|
};
|
|
9
10
|
export declare function mockMultipartSubscriptionStream<TData = Record<string, unknown>, TExtensions = Record<string, unknown>>(): {
|
|
10
|
-
httpLink:
|
|
11
|
+
httpLink: HttpLink;
|
|
11
12
|
enqueueHeartbeat: () => void;
|
|
12
13
|
enqueuePayloadResult(payload: ApolloPayloadResult<TData, TExtensions>["payload"], hasNext?: boolean): void;
|
|
13
14
|
enqueueProtocolErrors(errors: ApolloPayloadResult["errors"]): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderHelpers.cjs","sources":["../../../../src/testing/internal/renderHelpers.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport type { ApolloClient } from \"@apollo/client/core\";\nimport { ApolloProvider } from \"@apollo/client/react\";\nimport type { MockedProviderProps } from \"@apollo/client/testing/react\";\nimport { MockedProvider } from \"@apollo/client/testing/react\";\n\nexport function createClientWrapper(\n client: ApolloClient
|
|
1
|
+
{"version":3,"file":"renderHelpers.cjs","sources":["../../../../src/testing/internal/renderHelpers.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport type { ApolloClient } from \"@apollo/client/core\";\nimport { ApolloProvider } from \"@apollo/client/react\";\nimport type { MockedProviderProps } from \"@apollo/client/testing/react\";\nimport { MockedProvider } from \"@apollo/client/testing/react\";\n\nexport function createClientWrapper(\n client: ApolloClient,\n Wrapper: React.JSXElementConstructor<{\n children: React.ReactNode;\n }> = React.Fragment\n): React.JSXElementConstructor<{\n children: React.ReactNode;\n}> {\n return ({ children }) => {\n return (\n <ApolloProvider client={client}>\n <Wrapper>{children}</Wrapper>\n </ApolloProvider>\n );\n };\n}\n\nexport function createMockWrapper(\n renderOptions: MockedProviderProps,\n Wrapper: React.JSXElementConstructor<{\n children: React.ReactNode;\n }> = React.Fragment\n): React.JSXElementConstructor<{\n children: React.ReactNode;\n}> {\n return ({ children }) => {\n return (\n <MockedProvider {...renderOptions}>\n <Wrapper>{children}</Wrapper>\n </MockedProvider>\n );\n };\n}\n"],"names":[],"mappings":";;AAOA,CAAA,CAAA,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,CAAgB,EAAhB,CAAA,CAAA,CAAA,CAAA,EAAkB,CAAlB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA0B,CAAW,CACd,CAClB;IACH,CAAC;AACH;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { ApolloClient } from "@apollo/client/core";
|
|
3
3
|
import type { MockedProviderProps } from "@apollo/client/testing/react";
|
|
4
|
-
export declare function createClientWrapper(client: ApolloClient
|
|
4
|
+
export declare function createClientWrapper(client: ApolloClient, Wrapper?: React.JSXElementConstructor<{
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
}>): React.JSXElementConstructor<{
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
}>;
|
|
9
|
-
export declare function createMockWrapper(renderOptions: MockedProviderProps
|
|
9
|
+
export declare function createMockWrapper(renderOptions: MockedProviderProps, Wrapper?: React.JSXElementConstructor<{
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
}>): React.JSXElementConstructor<{
|
|
12
12
|
children: React.ReactNode;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import type { TypedDocumentNode } from "@apollo/client/core";
|
|
2
|
+
import { ApolloLink } from "@apollo/client/core";
|
|
3
|
+
import type { MaskedDocumentNode } from "@apollo/client/masking";
|
|
1
4
|
import type { MockedResponse } from "@apollo/client/testing/core";
|
|
2
5
|
export interface SimpleCaseData {
|
|
3
6
|
greeting: string;
|
|
4
7
|
}
|
|
5
8
|
export declare function setupSimpleCase(): {
|
|
6
9
|
query: TypedDocumentNode<SimpleCaseData, Record<string, never>>;
|
|
7
|
-
mocks: MockedResponse<SimpleCaseData
|
|
10
|
+
mocks: MockedResponse<SimpleCaseData, Record<string, any>>[];
|
|
8
11
|
};
|
|
9
12
|
export interface VariablesCaseData {
|
|
10
13
|
character: {
|
|
@@ -17,7 +20,7 @@ export interface VariablesCaseVariables {
|
|
|
17
20
|
id: string;
|
|
18
21
|
}
|
|
19
22
|
export declare function setupVariablesCase(): {
|
|
20
|
-
mocks: MockedResponse<VariablesCaseData
|
|
23
|
+
mocks: MockedResponse<VariablesCaseData, Record<string, any>>[];
|
|
21
24
|
query: TypedDocumentNode<VariablesCaseData, VariablesCaseVariables>;
|
|
22
25
|
};
|
|
23
26
|
type MaskedVariablesCaseFragment = {
|
|
@@ -44,11 +47,19 @@ export interface UnmaskedVariablesCaseData {
|
|
|
44
47
|
};
|
|
45
48
|
}
|
|
46
49
|
export declare function setupMaskedVariablesCase(): {
|
|
47
|
-
mocks: MockedResponse<MaskedVariablesCaseData
|
|
50
|
+
mocks: MockedResponse<MaskedVariablesCaseData, Record<string, any>>[];
|
|
48
51
|
query: MaskedDocumentNode<MaskedVariablesCaseData, VariablesCaseVariables>;
|
|
49
52
|
unmaskedQuery: TypedDocumentNode<MaskedVariablesCaseData, VariablesCaseVariables>;
|
|
50
53
|
};
|
|
51
|
-
export declare function addDelayToMocks<T extends MockedResponse<unknown>[]>(mocks: T, delay?: number, override?: boolean):
|
|
54
|
+
export declare function addDelayToMocks<T extends MockedResponse<unknown>[]>(mocks: T, delay?: number, override?: boolean): {
|
|
55
|
+
delay: number;
|
|
56
|
+
request: import("@apollo/client/core").GraphQLRequest<Record<string, any>>;
|
|
57
|
+
maxUsageCount?: number;
|
|
58
|
+
result?: import("@apollo/client/core").FetchResult<unknown> | import("@apollo/client/testing/core").ResultFunction<import("@apollo/client/core").FetchResult<unknown>, Record<string, any>> | undefined;
|
|
59
|
+
error?: Error;
|
|
60
|
+
variableMatcher?: ((arg: Record<string, any>) => boolean) | undefined;
|
|
61
|
+
newData?: import("@apollo/client/testing/core").ResultFunction<import("@apollo/client/core").FetchResult<unknown>, Record<string, any>> | undefined;
|
|
62
|
+
}[];
|
|
52
63
|
interface Letter {
|
|
53
64
|
__typename: "Letter";
|
|
54
65
|
letter: string;
|
|
@@ -63,7 +74,7 @@ export interface PaginatedCaseVariables {
|
|
|
63
74
|
}
|
|
64
75
|
export declare function setupPaginatedCase(): {
|
|
65
76
|
query: TypedDocumentNode<PaginatedCaseData, PaginatedCaseVariables>;
|
|
66
|
-
link:
|
|
77
|
+
link: ApolloLink;
|
|
67
78
|
data: {
|
|
68
79
|
__typename: string;
|
|
69
80
|
letter: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toEqualQueryResult.cjs","sources":["../../../../src/testing/matchers/toEqualQueryResult.ts"],"sourcesContent":["import { iterableEquality } from \"@jest/expect-utils\";\nimport type { MatcherFunction } from \"expect\";\n\nimport type { QueryResult } from \"@apollo/client/react\";\n\nconst CHECKED_KEYS = [\n \"loading\",\n \"error\",\n \"data\",\n \"variables\",\n \"networkStatus\",\n \"
|
|
1
|
+
{"version":3,"file":"toEqualQueryResult.cjs","sources":["../../../../src/testing/matchers/toEqualQueryResult.ts"],"sourcesContent":["import { iterableEquality } from \"@jest/expect-utils\";\nimport type { MatcherFunction } from \"expect\";\n\nimport type { QueryResult } from \"@apollo/client/react\";\n\nconst CHECKED_KEYS = [\n \"loading\",\n \"error\",\n \"data\",\n \"variables\",\n \"networkStatus\",\n \"previousData\",\n] as const;\n\nexport type CheckedKeys = (typeof CHECKED_KEYS)[number];\n\nconst hasOwnProperty = (obj: Record<string, any>, key: string) =>\n Object.prototype.hasOwnProperty.call(obj, key);\n\nexport const toEqualQueryResult: MatcherFunction<\n [queryResult: Pick<QueryResult<any, any>, CheckedKeys>]\n> = function (actual, expected) {\n const queryResult = actual as QueryResult<any, any>;\n const hint = this.utils.matcherHint(\n this.isNot ? \".not.toEqualQueryResult\" : \"toEqualQueryResult\",\n \"queryResult\",\n \"expected\",\n { isNot: this.isNot, promise: this.promise }\n );\n\n const checkedQueryResult = CHECKED_KEYS.reduce(\n (memo, key) => {\n if (hasOwnProperty(queryResult, key)) {\n memo[key] = queryResult[key];\n }\n\n return memo;\n },\n {} as Partial<QueryResult<any, any>>\n );\n\n const pass = this.equals(\n checkedQueryResult,\n expected,\n // https://github.com/jestjs/jest/blob/22029ba06b69716699254bb9397f2b3bc7b3cf3b/packages/expect/src/matchers.ts#L62-L67\n [...this.customTesters, iterableEquality],\n true\n );\n\n return {\n pass,\n message: () => {\n if (pass) {\n return hint + `\\n\\nExpected: not ${this.utils.printExpected(expected)}`;\n }\n\n return (\n hint +\n \"\\n\\n\" +\n this.utils.printDiffOrStringify(\n expected,\n checkedQueryResult,\n \"Expected\",\n \"Received\",\n true\n )\n );\n },\n };\n};\n"],"names":[],"mappings":";;;AAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,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;AAKA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAN,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAqB;IACnB,CAAF,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW;IACT,CAAF,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS;IACP,CAAF,CAAA,CAAA,CAAA,CAAA,CAAQ;IACN,CAAF,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa;IACX,CAAF,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB;IACf,CAAF,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgB;AAChB,CAAU;AAIV,CAAA,CAAA,CAAA,CAAA,EAAM,CAAN,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA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AAA,CAAA,CAAA,CAAA,CAAA,CAAuC,CAC7B,CADV,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACkB,EACR,CAFV,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAE4B,EAClB,CAHV,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAGoB,EACV,CAJV,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAIoB,EACV,CALV,CAAA,CAAA,CAKc,CACL,CACF;QACH,CAAC;IACL,CAAG;AACH,CAAC;AAlDY,CAAb,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,CAAb,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MatcherFunction } from "expect";
|
|
2
2
|
import type { QueryResult } from "@apollo/client/react";
|
|
3
|
-
declare const CHECKED_KEYS: readonly ["loading", "error", "data", "variables", "networkStatus", "
|
|
3
|
+
declare const CHECKED_KEYS: readonly ["loading", "error", "data", "variables", "networkStatus", "previousData"];
|
|
4
4
|
export type CheckedKeys = (typeof CHECKED_KEYS)[number];
|
|
5
5
|
export declare const toEqualQueryResult: MatcherFunction<[
|
|
6
6
|
queryResult: Pick<QueryResult<any, any>, CheckedKeys>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MockedProvider.cjs","sources":["../../../../src/testing/react/MockedProvider.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport type { ApolloCache } from \"@apollo/client/cache\";\nimport { InMemoryCache as Cache } from \"@apollo/client/cache\";\nimport type { DefaultOptions } from \"@apollo/client/core\";\nimport type { Resolvers } from \"@apollo/client/core\";\nimport { ApolloClient } from \"@apollo/client/core\";\nimport type { ApolloLink } from \"@apollo/client/link/core\";\nimport { ApolloProvider } from \"@apollo/client/react/context\";\nimport type { MockedResponse } from \"@apollo/client/testing/core\";\nimport { MockLink } from \"@apollo/client/testing/core\";\n\nexport interface MockedProviderProps
|
|
1
|
+
{"version":3,"file":"MockedProvider.cjs","sources":["../../../../src/testing/react/MockedProvider.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport type { ApolloCache } from \"@apollo/client/cache\";\nimport { InMemoryCache as Cache } from \"@apollo/client/cache\";\nimport type { DefaultOptions } from \"@apollo/client/core\";\nimport type { Resolvers } from \"@apollo/client/core\";\nimport { ApolloClient } from \"@apollo/client/core\";\nimport type { ApolloLink } from \"@apollo/client/link/core\";\nimport { ApolloProvider } from \"@apollo/client/react/context\";\nimport type { MockedResponse } from \"@apollo/client/testing/core\";\nimport { MockLink } from \"@apollo/client/testing/core\";\n\nexport interface MockedProviderProps {\n mocks?: ReadonlyArray<MockedResponse<any, any>>;\n defaultOptions?: DefaultOptions;\n cache?: ApolloCache;\n resolvers?: Resolvers;\n childProps?: object;\n children?: any;\n link?: ApolloLink;\n showWarnings?: boolean;\n /**\n * If set to true, the MockedProvider will try to connect to the Apollo DevTools.\n * Defaults to false.\n */\n connectToDevTools?: boolean;\n}\n\ninterface MockedProviderState {\n client: ApolloClient;\n}\n\nexport class MockedProvider extends React.Component<\n MockedProviderProps,\n MockedProviderState\n> {\n constructor(props: MockedProviderProps) {\n super(props);\n\n const {\n mocks,\n defaultOptions,\n cache,\n resolvers,\n link,\n showWarnings,\n connectToDevTools = false,\n } = this.props;\n const client = new ApolloClient({\n cache: cache || new Cache(),\n defaultOptions,\n connectToDevTools,\n link: link || new MockLink(mocks || [], { showWarnings }),\n resolvers,\n });\n\n this.state = {\n client,\n };\n }\n\n public render() {\n const { children, childProps } = this.props;\n const { client } = this.state;\n\n return React.isValidElement(children) ?\n <ApolloProvider client={client}>\n {React.cloneElement(React.Children.only(children), { ...childProps })}\n </ApolloProvider>\n : null;\n }\n\n public componentWillUnmount() {\n // Since this.state.client was created in the constructor, it's this\n // MockedProvider's responsibility to terminate it.\n this.state.client.stop();\n }\n}\n"],"names":[],"mappings":";;;;AAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,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,CAAA,CAAA;AAGA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,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;AAGA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,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;AAEA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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