diff --git a/.api-reports/api-report-v4-migration.api.md b/.api-reports/api-report-v4-migration.api.md new file mode 100644 index 00000000000..5325d7689ef --- /dev/null +++ b/.api-reports/api-report-v4-migration.api.md @@ -0,0 +1,427 @@ +## API Report File for "@apollo/client" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public @deprecated (undocumented) +export const addNonReactiveToNamedFragments: never; + +// @public @deprecated (undocumented) +export const ApolloConsumer: never; + +// @public @deprecated (undocumented) +export type ApolloConsumerProps = never; + +// @public @deprecated (undocumented) +export class ApolloError { +} + +// @public @deprecated (undocumented) +export type ApolloErrorOptions = never; + +// @public @deprecated (undocumented) +export const asyncMap: never; + +// @public @deprecated (undocumented) +export type BaseMutationOptions = never; + +// @public @deprecated (undocumented) +export type BaseQueryOptions = never; + +// @public @deprecated (undocumented) +export type BatchableRequest = never; + +// @public @deprecated (undocumented) +export const buildQueryFromSelectionSet: never; + +// @public @deprecated (undocumented) +export const canUseAsyncIteratorSymbol: never; + +// @public @deprecated (undocumented) +export const canUseLayoutEffect: never; + +// @public @deprecated (undocumented) +export const canUseSymbol: never; + +// @public @deprecated (undocumented) +export const canUseWeakMap: never; + +// @public @deprecated (undocumented) +export const canUseWeakSet: never; + +// @public @deprecated (undocumented) +export type ChildDataProps = never; + +// @public @deprecated (undocumented) +export type ChildMutateProps = never; + +// @public @deprecated (undocumented) +export type ChildProps = never; + +// @public @deprecated (undocumented) +export type ClientParseError = never; + +// @public @deprecated (undocumented) +export type CommonOptions = never; + +// @public @deprecated (undocumented) +export class Concast { +} + +// @public @deprecated (undocumented) +export type ConcastSourcesArray = never; + +// @public @deprecated (undocumented) +export type ConcastSourcesIterable = never; + +// @public @deprecated (undocumented) +export const createMockClient: never; + +// @public @deprecated (undocumented) +export const createSchemaFetch: never; + +// @public @deprecated (undocumented) +export const createTestSchema: never; + +// @public @deprecated (undocumented) +export type DataProps = never; + +// @public @deprecated (undocumented) +export const DataProxy: never; + +// @public @deprecated (undocumented) +export type DataValue = never; + +// @public @deprecated (undocumented) +export const defaultCacheSizes: never; + +// @public @deprecated (undocumented) +export type DirectiveInfo = never; + +// @public @deprecated (undocumented) +export type Directives = never; + +// @public @deprecated (undocumented) +const DocumentType_2: never; +export { DocumentType_2 as DocumentType } + +// @public @deprecated (undocumented) +export type FetchMoreQueryOptions = never; + +// @public @deprecated (undocumented) +export const fixObservableSubclass: never; + +// @public @deprecated (undocumented) +export type FragmentMatcher = never; + +// @public @deprecated (undocumented) +export const fromError: never; + +// @public @deprecated (undocumented) +export const fromPromise: never; + +// @public @deprecated (undocumented) +export type GetDirectiveConfig = never; + +// @public @deprecated (undocumented) +export const getDirectiveNames: never; + +// @public @deprecated (undocumented) +export const getFragmentMaskMode: never; + +// @public @deprecated (undocumented) +export type GetFragmentSpreadConfig = never; + +// @public @deprecated (undocumented) +export const getInclusionDirectives: never; + +// @public @deprecated (undocumented) +export type GetNodeConfig = never; + +// @public @deprecated (undocumented) +export const getTypenameFromResult: never; + +// @public @deprecated (undocumented) +export const graphql: never; + +// @public @deprecated (undocumented) +export type GraphQLErrors = never; + +// @public @deprecated (undocumented) +export const hasAllDirectives: never; + +// @public @deprecated (undocumented) +export const hasAnyDirectives: never; + +// @public @deprecated (undocumented) +export const hasClientExports: never; + +// @public @deprecated (undocumented) +export type IDocumentDefinition = never; + +// @public @deprecated (undocumented) +export type InclusionDirectives = never; + +// @public @deprecated (undocumented) +export const isApolloError: never; + +// @public @deprecated (undocumented) +export const isApolloPayloadResult: never; + +// @public @deprecated (undocumented) +export const isExecutionPatchIncrementalResult: never; + +// @public @deprecated (undocumented) +export const isExecutionPatchInitialResult: never; + +// @public @deprecated (undocumented) +export const isExecutionPatchResult: never; + +// @public @deprecated (undocumented) +export const isFullyUnmaskedOperation: never; + +// @public @deprecated (undocumented) +export const isInlineFragment: never; + +// @public @deprecated (undocumented) +export const isStatefulPromise: never; + +// @public @deprecated (undocumented) +export type IsStrictlyAny = never; + +// @public @deprecated (undocumented) +export const itAsync: never; + +// @public @deprecated (undocumented) +export const iterateObserversSafely: never; + +// @public @deprecated (undocumented) +export const mergeIncrementalData: never; + +// @public @deprecated (undocumented) +export type MethodKeys = never; + +// @public @deprecated (undocumented) +export const mockObservableLink: never; + +// @public @deprecated (undocumented) +export const mockSingleLink: never; + +// @public @deprecated (undocumented) +export type MutateProps = never; + +// @public @deprecated (undocumented) +export const Mutation: never; + +// @public @deprecated (undocumented) +export type MutationComponentOptions = never; + +// @public @deprecated (undocumented) +export type MutationDataOptions = never; + +// @public @deprecated (undocumented) +export type MutationUpdaterFn = never; + +// @public @deprecated (undocumented) +export type NetworkError = never; + +// @public @deprecated (undocumented) +export type ObservableQueryFields = never; + +// @public @deprecated (undocumented) +export const ObservableSubscription: never; + +// @public @deprecated (undocumented) +export const Observer: never; + +// @public @deprecated (undocumented) +export type OnlyRequiredProperties = never; + +// @public @deprecated (undocumented) +export const OperationBatcher: never; + +// @public @deprecated (undocumented) +export const operationName: never; + +// @public @deprecated (undocumented) +export type OperationOption = never; + +// @public @deprecated (undocumented) +export type OptionProps = never; + +// @public @deprecated (undocumented) +export const parser: never; + +// @public @deprecated (undocumented) +export type PromiseWithState = never; + +// @public @deprecated (undocumented) +export type PureQueryOptions = never; + +// @public @deprecated (undocumented) +export const Query: never; + +// @public @deprecated (undocumented) +export type QueryComponentOptions = never; + +// @public @deprecated (undocumented) +export type QueryControls = never; + +// @public @deprecated (undocumented) +export type QueryDataOptions = never; + +// @public @deprecated (undocumented) +export type QueryLazyOptions = never; + +// @public @deprecated (undocumented) +export type ReconcilerFunction = never; + +// @public @deprecated (undocumented) +export type RefetchQueriesFunction = never; + +// @public +export namespace Removals { + // @deprecated (undocumented) + export type defer = never; + // @deprecated (undocumented) + export type errors = never; + // @deprecated (undocumented) + export type HOC = never; + // @deprecated (undocumented) + export type implementationDetail = never; + // @deprecated (undocumented) + export type internal = never; + // @deprecated (undocumented) + export type internalTesting = never; + // @deprecated (undocumented) + export type removedType = never; + // @deprecated (undocumented) + export type removedValue = never; + // @deprecated (undocumented) + export type renderProp = never; + // @deprecated (undocumented) + export type rxjs = never; + // @deprecated (undocumented) + export type testingLibrary = never; + // @deprecated (undocumented) + export type utility = never; +} + +// @public @deprecated (undocumented) +export type RemoveArgumentsConfig = never; + +// @public @deprecated (undocumented) +export const removeArgumentsFromDocument: never; + +// @public @deprecated (undocumented) +export const removeClientSetsFromDocument: never; + +// @public @deprecated (undocumented) +export const removeConnectionDirectiveFromDocument: never; + +// @public @deprecated (undocumented) +export type RemoveDirectiveConfig = never; + +// @public @deprecated (undocumented) +export type RemoveFragmentDefinitionConfig = never; + +// @public @deprecated (undocumented) +export type RemoveFragmentSpreadConfig = never; + +// @public @deprecated (undocumented) +export const removeFragmentSpreadFromDocument: never; + +// @public @deprecated (undocumented) +export type RemoveNodeConfig = never; + +// @public @deprecated (undocumented) +export type RemoveVariableDefinitionConfig = never; + +// @public @deprecated (undocumented) +export const RenderPromises: never; + +// @public @deprecated (undocumented) +export const resetApolloContext: never; + +// @public @deprecated (undocumented) +export type Resolver = never; + +// @public @deprecated (undocumented) +export type Resolvers = never; + +// @public @deprecated (undocumented) +export const serializeFetchParameter: never; + +// @public @deprecated (undocumented) +export const subscribeAndCount: never; + +// @public @deprecated (undocumented) +export const Subscription: never; + +// @public @deprecated (undocumented) +export type SubscriptionComponentOptions = never; + +// @public @deprecated (undocumented) +export type SubscriptionCurrentObservable = never; + +// @public @deprecated (undocumented) +export const throwServerError: never; + +// @public @deprecated (undocumented) +export const tick: never; + +// @public @deprecated (undocumented) +export const toPromise: never; + +// @public @deprecated (undocumented) +export const transformOperation: never; + +// @public @deprecated (undocumented) +export type TupleToIntersection = never; + +// @public @deprecated (undocumented) +export type UnionToIntersection = never; + +// @public @deprecated (undocumented) +export const validateOperation: never; + +// @public @deprecated (undocumented) +export const valueToObjectRepresentation: never; + +// @public @deprecated (undocumented) +export type VariableValue = never; + +// @public @deprecated (undocumented) +export const verifyDocumentType: never; + +// @public @deprecated (undocumented) +export const wait: never; + +// @public @deprecated (undocumented) +export const withApollo: never; + +// @public @deprecated (undocumented) +export type WithApolloClient = never; + +// @public @deprecated (undocumented) +export const withErrorSpy: never; + +// @public @deprecated (undocumented) +export const withLogSpy: never; + +// @public @deprecated (undocumented) +export const withMutation: never; + +// @public @deprecated (undocumented) +export const withQuery: never; + +// @public @deprecated (undocumented) +export const withSubscription: never; + +// @public @deprecated (undocumented) +export const withWarningSpy: never; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/.api-reports/api-report-zz_removals.api.md b/.api-reports/api-report-zz_removals.api.md new file mode 100644 index 00000000000..5325d7689ef --- /dev/null +++ b/.api-reports/api-report-zz_removals.api.md @@ -0,0 +1,427 @@ +## API Report File for "@apollo/client" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public @deprecated (undocumented) +export const addNonReactiveToNamedFragments: never; + +// @public @deprecated (undocumented) +export const ApolloConsumer: never; + +// @public @deprecated (undocumented) +export type ApolloConsumerProps = never; + +// @public @deprecated (undocumented) +export class ApolloError { +} + +// @public @deprecated (undocumented) +export type ApolloErrorOptions = never; + +// @public @deprecated (undocumented) +export const asyncMap: never; + +// @public @deprecated (undocumented) +export type BaseMutationOptions = never; + +// @public @deprecated (undocumented) +export type BaseQueryOptions = never; + +// @public @deprecated (undocumented) +export type BatchableRequest = never; + +// @public @deprecated (undocumented) +export const buildQueryFromSelectionSet: never; + +// @public @deprecated (undocumented) +export const canUseAsyncIteratorSymbol: never; + +// @public @deprecated (undocumented) +export const canUseLayoutEffect: never; + +// @public @deprecated (undocumented) +export const canUseSymbol: never; + +// @public @deprecated (undocumented) +export const canUseWeakMap: never; + +// @public @deprecated (undocumented) +export const canUseWeakSet: never; + +// @public @deprecated (undocumented) +export type ChildDataProps = never; + +// @public @deprecated (undocumented) +export type ChildMutateProps = never; + +// @public @deprecated (undocumented) +export type ChildProps = never; + +// @public @deprecated (undocumented) +export type ClientParseError = never; + +// @public @deprecated (undocumented) +export type CommonOptions = never; + +// @public @deprecated (undocumented) +export class Concast { +} + +// @public @deprecated (undocumented) +export type ConcastSourcesArray = never; + +// @public @deprecated (undocumented) +export type ConcastSourcesIterable = never; + +// @public @deprecated (undocumented) +export const createMockClient: never; + +// @public @deprecated (undocumented) +export const createSchemaFetch: never; + +// @public @deprecated (undocumented) +export const createTestSchema: never; + +// @public @deprecated (undocumented) +export type DataProps = never; + +// @public @deprecated (undocumented) +export const DataProxy: never; + +// @public @deprecated (undocumented) +export type DataValue = never; + +// @public @deprecated (undocumented) +export const defaultCacheSizes: never; + +// @public @deprecated (undocumented) +export type DirectiveInfo = never; + +// @public @deprecated (undocumented) +export type Directives = never; + +// @public @deprecated (undocumented) +const DocumentType_2: never; +export { DocumentType_2 as DocumentType } + +// @public @deprecated (undocumented) +export type FetchMoreQueryOptions = never; + +// @public @deprecated (undocumented) +export const fixObservableSubclass: never; + +// @public @deprecated (undocumented) +export type FragmentMatcher = never; + +// @public @deprecated (undocumented) +export const fromError: never; + +// @public @deprecated (undocumented) +export const fromPromise: never; + +// @public @deprecated (undocumented) +export type GetDirectiveConfig = never; + +// @public @deprecated (undocumented) +export const getDirectiveNames: never; + +// @public @deprecated (undocumented) +export const getFragmentMaskMode: never; + +// @public @deprecated (undocumented) +export type GetFragmentSpreadConfig = never; + +// @public @deprecated (undocumented) +export const getInclusionDirectives: never; + +// @public @deprecated (undocumented) +export type GetNodeConfig = never; + +// @public @deprecated (undocumented) +export const getTypenameFromResult: never; + +// @public @deprecated (undocumented) +export const graphql: never; + +// @public @deprecated (undocumented) +export type GraphQLErrors = never; + +// @public @deprecated (undocumented) +export const hasAllDirectives: never; + +// @public @deprecated (undocumented) +export const hasAnyDirectives: never; + +// @public @deprecated (undocumented) +export const hasClientExports: never; + +// @public @deprecated (undocumented) +export type IDocumentDefinition = never; + +// @public @deprecated (undocumented) +export type InclusionDirectives = never; + +// @public @deprecated (undocumented) +export const isApolloError: never; + +// @public @deprecated (undocumented) +export const isApolloPayloadResult: never; + +// @public @deprecated (undocumented) +export const isExecutionPatchIncrementalResult: never; + +// @public @deprecated (undocumented) +export const isExecutionPatchInitialResult: never; + +// @public @deprecated (undocumented) +export const isExecutionPatchResult: never; + +// @public @deprecated (undocumented) +export const isFullyUnmaskedOperation: never; + +// @public @deprecated (undocumented) +export const isInlineFragment: never; + +// @public @deprecated (undocumented) +export const isStatefulPromise: never; + +// @public @deprecated (undocumented) +export type IsStrictlyAny = never; + +// @public @deprecated (undocumented) +export const itAsync: never; + +// @public @deprecated (undocumented) +export const iterateObserversSafely: never; + +// @public @deprecated (undocumented) +export const mergeIncrementalData: never; + +// @public @deprecated (undocumented) +export type MethodKeys = never; + +// @public @deprecated (undocumented) +export const mockObservableLink: never; + +// @public @deprecated (undocumented) +export const mockSingleLink: never; + +// @public @deprecated (undocumented) +export type MutateProps = never; + +// @public @deprecated (undocumented) +export const Mutation: never; + +// @public @deprecated (undocumented) +export type MutationComponentOptions = never; + +// @public @deprecated (undocumented) +export type MutationDataOptions = never; + +// @public @deprecated (undocumented) +export type MutationUpdaterFn = never; + +// @public @deprecated (undocumented) +export type NetworkError = never; + +// @public @deprecated (undocumented) +export type ObservableQueryFields = never; + +// @public @deprecated (undocumented) +export const ObservableSubscription: never; + +// @public @deprecated (undocumented) +export const Observer: never; + +// @public @deprecated (undocumented) +export type OnlyRequiredProperties = never; + +// @public @deprecated (undocumented) +export const OperationBatcher: never; + +// @public @deprecated (undocumented) +export const operationName: never; + +// @public @deprecated (undocumented) +export type OperationOption = never; + +// @public @deprecated (undocumented) +export type OptionProps = never; + +// @public @deprecated (undocumented) +export const parser: never; + +// @public @deprecated (undocumented) +export type PromiseWithState = never; + +// @public @deprecated (undocumented) +export type PureQueryOptions = never; + +// @public @deprecated (undocumented) +export const Query: never; + +// @public @deprecated (undocumented) +export type QueryComponentOptions = never; + +// @public @deprecated (undocumented) +export type QueryControls = never; + +// @public @deprecated (undocumented) +export type QueryDataOptions = never; + +// @public @deprecated (undocumented) +export type QueryLazyOptions = never; + +// @public @deprecated (undocumented) +export type ReconcilerFunction = never; + +// @public @deprecated (undocumented) +export type RefetchQueriesFunction = never; + +// @public +export namespace Removals { + // @deprecated (undocumented) + export type defer = never; + // @deprecated (undocumented) + export type errors = never; + // @deprecated (undocumented) + export type HOC = never; + // @deprecated (undocumented) + export type implementationDetail = never; + // @deprecated (undocumented) + export type internal = never; + // @deprecated (undocumented) + export type internalTesting = never; + // @deprecated (undocumented) + export type removedType = never; + // @deprecated (undocumented) + export type removedValue = never; + // @deprecated (undocumented) + export type renderProp = never; + // @deprecated (undocumented) + export type rxjs = never; + // @deprecated (undocumented) + export type testingLibrary = never; + // @deprecated (undocumented) + export type utility = never; +} + +// @public @deprecated (undocumented) +export type RemoveArgumentsConfig = never; + +// @public @deprecated (undocumented) +export const removeArgumentsFromDocument: never; + +// @public @deprecated (undocumented) +export const removeClientSetsFromDocument: never; + +// @public @deprecated (undocumented) +export const removeConnectionDirectiveFromDocument: never; + +// @public @deprecated (undocumented) +export type RemoveDirectiveConfig = never; + +// @public @deprecated (undocumented) +export type RemoveFragmentDefinitionConfig = never; + +// @public @deprecated (undocumented) +export type RemoveFragmentSpreadConfig = never; + +// @public @deprecated (undocumented) +export const removeFragmentSpreadFromDocument: never; + +// @public @deprecated (undocumented) +export type RemoveNodeConfig = never; + +// @public @deprecated (undocumented) +export type RemoveVariableDefinitionConfig = never; + +// @public @deprecated (undocumented) +export const RenderPromises: never; + +// @public @deprecated (undocumented) +export const resetApolloContext: never; + +// @public @deprecated (undocumented) +export type Resolver = never; + +// @public @deprecated (undocumented) +export type Resolvers = never; + +// @public @deprecated (undocumented) +export const serializeFetchParameter: never; + +// @public @deprecated (undocumented) +export const subscribeAndCount: never; + +// @public @deprecated (undocumented) +export const Subscription: never; + +// @public @deprecated (undocumented) +export type SubscriptionComponentOptions = never; + +// @public @deprecated (undocumented) +export type SubscriptionCurrentObservable = never; + +// @public @deprecated (undocumented) +export const throwServerError: never; + +// @public @deprecated (undocumented) +export const tick: never; + +// @public @deprecated (undocumented) +export const toPromise: never; + +// @public @deprecated (undocumented) +export const transformOperation: never; + +// @public @deprecated (undocumented) +export type TupleToIntersection = never; + +// @public @deprecated (undocumented) +export type UnionToIntersection = never; + +// @public @deprecated (undocumented) +export const validateOperation: never; + +// @public @deprecated (undocumented) +export const valueToObjectRepresentation: never; + +// @public @deprecated (undocumented) +export type VariableValue = never; + +// @public @deprecated (undocumented) +export const verifyDocumentType: never; + +// @public @deprecated (undocumented) +export const wait: never; + +// @public @deprecated (undocumented) +export const withApollo: never; + +// @public @deprecated (undocumented) +export type WithApolloClient = never; + +// @public @deprecated (undocumented) +export const withErrorSpy: never; + +// @public @deprecated (undocumented) +export const withLogSpy: never; + +// @public @deprecated (undocumented) +export const withMutation: never; + +// @public @deprecated (undocumented) +export const withQuery: never; + +// @public @deprecated (undocumented) +export const withSubscription: never; + +// @public @deprecated (undocumented) +export const withWarningSpy: never; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/package.json b/package.json index c09f8c7bfa4..85679f5a7f9 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,8 @@ "production": "./src/utilities/environment/index.production.ts", "development": "./src/utilities/environment/index.development.ts", "default": "./src/utilities/environment/index.ts" - } + }, + "./v4-migration": "./src/v4-migration.ts" }, "scripts": { "prebuild": "npm run clean", diff --git a/scripts/codemods/ac3-to-ac4/README.md b/scripts/codemods/ac3-to-ac4/README.md index ade11e6f92b..756ddcdcdb8 100644 --- a/scripts/codemods/ac3-to-ac4/README.md +++ b/scripts/codemods/ac3-to-ac4/README.md @@ -17,6 +17,7 @@ npx @apollo/client-codemod-migrate-3-to-4 --parser ts file1.ts file2.ts --codem - `imports`: Moves imports that have been moved or renamed in Apollo Client 4. Also moves types into namespace imports where applicable. - `links`: Moves `split`, `from`, `concat` and `empty` onto the `ApolloLink` namespace, changes funtion link invocations like `createHttpLink(...)` to their class equivalents like (`new HttpLink(...)`). Does not change `setContext((operation, prevContext) => {})` to `new ContextLink((prevContext, operation) => {})` - this requires manual intervention, as the order of callback arguments is flipped and this is not reliable codemoddable. +- `removals`: Points all imports of values or types that have been removed in Apollo Client 4 to the `@apollo/client/v4-migration` entry point. That entry point contains context for each removal, oftentimes with migration instructions. ### Usage against TypeScript/TSX diff --git a/scripts/codemods/ac3-to-ac4/src/__tests__/__snapshots__/removals.test.ts.snap b/scripts/codemods/ac3-to-ac4/src/__tests__/__snapshots__/removals.test.ts.snap new file mode 100644 index 00000000000..e0410b2c915 --- /dev/null +++ b/scripts/codemods/ac3-to-ac4/src/__tests__/__snapshots__/removals.test.ts.snap @@ -0,0 +1,750 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`all exports 1`] = ` +"Index: test.ts +=================================================================== +--- test.ts original ++++ test.ts transformed +@@ @@ + WatchFragmentOptions as cache_WatchFragmentOptions, + WatchFragmentResult as cache_WatchFragmentResult, + ApolloCache as cache_ApolloCache, + Cache as cache_Cache, +- DataProxy as cache_DataProxy, + MissingTree as cache_MissingTree, + Modifier as cache_Modifier, + Modifiers as cache_Modifiers, + ModifierDetails as cache_ModifierDetails, +@@ @@ + WatchQueryFetchPolicy as _WatchQueryFetchPolicy, + MutationFetchPolicy as _MutationFetchPolicy, + RefetchWritePolicy as _RefetchWritePolicy, + ErrorPolicy as _ErrorPolicy, +- FetchMoreQueryOptions as _FetchMoreQueryOptions, + SubscribeToMoreOptions as _SubscribeToMoreOptions, + SubscribeToMoreFunction as _SubscribeToMoreFunction, + UpdateQueryMapFn as _UpdateQueryMapFn, + UpdateQueryOptions as _UpdateQueryOptions, + SubscribeToMoreUpdateQueryFn as _SubscribeToMoreUpdateQueryFn, + NetworkStatus as _NetworkStatus, + isNetworkRequestSettled as _isNetworkRequestSettled, +- Resolver as _Resolver, +- FragmentMatcher as _FragmentMatcher, +- isApolloError as _isApolloError, +- ApolloError as _ApolloError, + Transaction as _Transaction, +- DataProxy as _DataProxy, + InMemoryCacheConfig as _InMemoryCacheConfig, + ReactiveVar as _ReactiveVar, + TypePolicies as _TypePolicies, + TypePolicy as _TypePolicy, +@@ @@ + MissingFieldError as _MissingFieldError, + defaultDataIdFromObject as _defaultDataIdFromObject, + makeVar as _makeVar, + ServerError as _ServerError, +- fromError as _fromError, +- toPromise as _toPromise, +- fromPromise as _fromPromise, +- throwServerError as _throwServerError, + DataMasking as _DataMasking, + FragmentType as _FragmentType, + Masked as _Masked, + MaskedDocumentNode as _MaskedDocumentNode, + MaybeMasked as _MaybeMasked, + Unmasked as _Unmasked, + DocumentTransformCacheKey as _DocumentTransformCacheKey, +- Observer as _Observer, +- ObservableSubscription as _ObservableSubscription, + Reference as _Reference, + StoreObject as _StoreObject, + DocumentTransform as _DocumentTransform, + Observable as _Observable, +@@ @@ + disableFragmentWarnings as _disableFragmentWarnings, + enableExperimentalFragmentVariables as _enableExperimentalFragmentVariables, + disableExperimentalFragmentVariables as _disableExperimentalFragmentVariables, + TypedDocumentNode as _TypedDocumentNode, +- MethodKeys as _MethodKeys, + DefaultContext as _DefaultContext, + OnQueryUpdated as _OnQueryUpdated, + RefetchQueryDescriptor as _RefetchQueryDescriptor, + InternalRefetchQueryDescriptor as _InternalRefetchQueryDescriptor, +@@ @@ + RefetchQueriesResult as _RefetchQueriesResult, + InternalRefetchQueriesOptions as _InternalRefetchQueriesOptions, + InternalRefetchQueriesResult as _InternalRefetchQueriesResult, + InternalRefetchQueriesMap as _InternalRefetchQueriesMap, +- PureQueryOptions as _PureQueryOptions, + OperationVariables as _OperationVariables, + ApolloQueryResult as _ApolloQueryResult, + MutationQueryReducer as _MutationQueryReducer, + MutationQueryReducersMap as _MutationQueryReducersMap, +- MutationUpdaterFn as _MutationUpdaterFn, + MutationUpdaterFunction as _MutationUpdaterFunction, +- Resolvers as _Resolvers, + StoreValue as _StoreValue, + IdGetterObj as _IdGetterObj, + IdGetter as _IdGetter, + NormalizedCache as _NormalizedCache, +@@ @@ + NextLink as _NextLink, + RequestHandler as _RequestHandler, + ServerParseError as _ServerParseError, + parseAndCheckHttpResponse as _parseAndCheckHttpResponse, +- ClientParseError as _ClientParseError, +- serializeFetchParameter as _serializeFetchParameter, + HttpOptions as _HttpOptions, + UriFunction as _UriFunction, + fallbackHttpConfig as _fallbackHttpConfig, + defaultPrinter as _defaultPrinter, +@@ @@ + HttpLink as _HttpLink, + rewriteURIForGET as _rewriteURIForGET, + ApolloContextValue as _ApolloContextValue, + ApolloProvider as _ApolloProvider, +- ApolloConsumer as _ApolloConsumer, + getApolloContext as _getApolloContext, +- resetApolloContext as _resetApolloContext, +- IDocumentDefinition as _IDocumentDefinition, +- DocumentType as _DocumentType, +- operationName as _operationName, +- parser as _parser, + PreloadQueryOptions as _PreloadQueryOptions, + PreloadQueryFetchPolicy as _PreloadQueryFetchPolicy, + PreloadQueryFunction as _PreloadQueryFunction, + createQueryPreloader as _createQueryPreloader, +@@ @@ + QueryReference as _QueryReference, + QueryRef as _QueryRef, + PreloadedQueryRef as _PreloadedQueryRef, + Context as _Context, +- CommonOptions as _CommonOptions, +- BaseQueryOptions as _BaseQueryOptions, + QueryFunctionOptions as _QueryFunctionOptions, +- ObservableQueryFields as _ObservableQueryFields, + QueryResult as _QueryResult, +- QueryDataOptions as _QueryDataOptions, + QueryHookOptions as _QueryHookOptions, + LazyQueryHookOptions as _LazyQueryHookOptions, + LazyQueryHookExecOptions as _LazyQueryHookExecOptions, + SuspenseQueryHookFetchPolicy as _SuspenseQueryHookFetchPolicy, +@@ @@ + BackgroundQueryHookFetchPolicy as _BackgroundQueryHookFetchPolicy, + BackgroundQueryHookOptions as _BackgroundQueryHookOptions, + LoadableQueryHookFetchPolicy as _LoadableQueryHookFetchPolicy, + LoadableQueryHookOptions as _LoadableQueryHookOptions, +- QueryLazyOptions as _QueryLazyOptions, + LazyQueryResult as _LazyQueryResult, + QueryTuple as _QueryTuple, + LazyQueryExecFunction as _LazyQueryExecFunction, + LazyQueryResultTuple as _LazyQueryResultTuple, +- RefetchQueriesFunction as _RefetchQueriesFunction, +- BaseMutationOptions as _BaseMutationOptions, + MutationFunctionOptions as _MutationFunctionOptions, + MutationResult as _MutationResult, + MutationFunction as _MutationFunction, + MutationHookOptions as _MutationHookOptions, +- MutationDataOptions as _MutationDataOptions, + MutationTuple as _MutationTuple, + OnDataOptions as _OnDataOptions, + OnSubscriptionDataOptions as _OnSubscriptionDataOptions, + BaseSubscriptionOptions as _BaseSubscriptionOptions, + SubscriptionResult as _SubscriptionResult, + SubscriptionHookOptions as _SubscriptionHookOptions, + SubscriptionDataOptions as _SubscriptionDataOptions, +- SubscriptionCurrentObservable as _SubscriptionCurrentObservable, + VariablesOption as _VariablesOption, + NoInfer as _NoInfer, + } from "@apollo/client"; + + import { ++ ApolloError as _ApolloError, ++ DataProxy as _DataProxy, ++ fromError as _fromError, ++ fromPromise as _fromPromise, ++ isApolloError as _isApolloError, ++ ObservableSubscription as _ObservableSubscription, ++ Observer as _Observer, ++ serializeFetchParameter as _serializeFetchParameter, ++ throwServerError as _throwServerError, ++ toPromise as _toPromise, ++ OperationBatcher as link_batch_OperationBatcher, ++ transformOperation as link_utils_transformOperation, ++ validateOperation as link_utils_validateOperation, ++ ApolloConsumer as react_ApolloConsumer, ++ DocumentType as react_DocumentType, ++ operationName as react_operationName, ++ parser as react_parser, ++ resetApolloContext as react_resetApolloContext, ++ Mutation as react_components_Mutation, ++ Query as react_components_Query, ++ Subscription as react_components_Subscription, ++ graphql as react_hoc_graphql, ++ withApollo as react_hoc_withApollo, ++ withMutation as react_hoc_withMutation, ++ withQuery as react_hoc_withQuery, ++ withSubscription as react_hoc_withSubscription, ++ verifyDocumentType as react_parser_verifyDocumentType, ++ RenderPromises as react_ssr_RenderPromises, ++ createMockClient as testing_createMockClient, ++ itAsync as testing_itAsync, ++ mockObservableLink as testing_mockObservableLink, ++ mockSingleLink as testing_mockSingleLink, ++ subscribeAndCount as testing_subscribeAndCount, ++ tick as testing_tick, ++ wait as testing_wait, ++ withErrorSpy as testing_withErrorSpy, ++ withLogSpy as testing_withLogSpy, ++ withWarningSpy as testing_withWarningSpy, ++ createSchemaFetch as testing_experimental_createSchemaFetch, ++ createTestSchema as testing_experimental_createTestSchema, ++ addNonReactiveToNamedFragments as utilities_addNonReactiveToNamedFragments, ++ asyncMap as utilities_asyncMap, ++ buildQueryFromSelectionSet as utilities_buildQueryFromSelectionSet, ++ canUseAsyncIteratorSymbol as utilities_canUseAsyncIteratorSymbol, ++ canUseLayoutEffect as utilities_canUseLayoutEffect, ++ canUseSymbol as utilities_canUseSymbol, ++ canUseWeakMap as utilities_canUseWeakMap, ++ canUseWeakSet as utilities_canUseWeakSet, ++ Concast as utilities_Concast, ++ defaultCacheSizes as utilities_defaultCacheSizes, ++ fixObservableSubclass as utilities_fixObservableSubclass, ++ getDirectiveNames as utilities_getDirectiveNames, ++ getFragmentMaskMode as utilities_getFragmentMaskMode, ++ getInclusionDirectives as utilities_getInclusionDirectives, ++ getTypenameFromResult as utilities_getTypenameFromResult, ++ hasAllDirectives as utilities_hasAllDirectives, ++ hasAnyDirectives as utilities_hasAnyDirectives, ++ hasClientExports as utilities_hasClientExports, ++ isApolloPayloadResult as utilities_isApolloPayloadResult, ++ isExecutionPatchIncrementalResult as utilities_isExecutionPatchIncrementalResult, ++ isExecutionPatchInitialResult as utilities_isExecutionPatchInitialResult, ++ isExecutionPatchResult as utilities_isExecutionPatchResult, ++ isFullyUnmaskedOperation as utilities_isFullyUnmaskedOperation, ++ isInlineFragment as utilities_isInlineFragment, ++ isStatefulPromise as utilities_isStatefulPromise, ++ iterateObserversSafely as utilities_iterateObserversSafely, ++ mergeIncrementalData as utilities_mergeIncrementalData, ++ removeArgumentsFromDocument as utilities_removeArgumentsFromDocument, ++ removeClientSetsFromDocument as utilities_removeClientSetsFromDocument, ++ removeConnectionDirectiveFromDocument as utilities_removeConnectionDirectiveFromDocument, ++ removeFragmentSpreadFromDocument as utilities_removeFragmentSpreadFromDocument, ++ valueToObjectRepresentation as utilities_valueToObjectRepresentation, ++} from "@apollo/client/v4-migration"; ++ ++import type { ++ ClientParseError as _ClientParseError, ++ ClientParseError as core_ClientParseError, ++ FetchMoreQueryOptions as _FetchMoreQueryOptions, ++ FetchMoreQueryOptions as core_FetchMoreQueryOptions, ++ FragmentMatcher as _FragmentMatcher, ++ FragmentMatcher as core_FragmentMatcher, ++ MethodKeys as _MethodKeys, ++ MethodKeys as core_MethodKeys, ++ MutationUpdaterFn as _MutationUpdaterFn, ++ MutationUpdaterFn as core_MutationUpdaterFn, ++ PureQueryOptions as _PureQueryOptions, ++ PureQueryOptions as core_PureQueryOptions, ++ Resolver as _Resolver, ++ Resolver as core_Resolver, ++ Resolvers as _Resolvers, ++ Resolvers as core_Resolvers, ++ ApolloErrorOptions as errors_ApolloErrorOptions, ++ GraphQLErrors as errors_GraphQLErrors, ++ NetworkError as errors_NetworkError, ++ BatchableRequest as link_batch_BatchableRequest, ++ ClientParseError as link_http_ClientParseError, ++ BaseMutationOptions as react_BaseMutationOptions, ++ BaseMutationOptions as _BaseMutationOptions, ++ BaseQueryOptions as react_BaseQueryOptions, ++ BaseQueryOptions as _BaseQueryOptions, ++ CommonOptions as react_CommonOptions, ++ CommonOptions as _CommonOptions, ++ IDocumentDefinition as react_IDocumentDefinition, ++ IDocumentDefinition as _IDocumentDefinition, ++ MutationDataOptions as react_MutationDataOptions, ++ MutationDataOptions as _MutationDataOptions, ++ ObservableQueryFields as react_ObservableQueryFields, ++ ObservableQueryFields as _ObservableQueryFields, ++ QueryDataOptions as react_QueryDataOptions, ++ QueryDataOptions as _QueryDataOptions, ++ QueryLazyOptions as react_QueryLazyOptions, ++ QueryLazyOptions as _QueryLazyOptions, ++ RefetchQueriesFunction as react_RefetchQueriesFunction, ++ RefetchQueriesFunction as _RefetchQueriesFunction, ++ SubscriptionCurrentObservable as react_SubscriptionCurrentObservable, ++ SubscriptionCurrentObservable as _SubscriptionCurrentObservable, ++ MutationComponentOptions as react_components_MutationComponentOptions, ++ QueryComponentOptions as react_components_QueryComponentOptions, ++ SubscriptionComponentOptions as react_components_SubscriptionComponentOptions, ++ ApolloConsumerProps as react_context_ApolloConsumerProps, ++ ChildDataProps as react_hoc_ChildDataProps, ++ ChildMutateProps as react_hoc_ChildMutateProps, ++ ChildProps as react_hoc_ChildProps, ++ DataProps as react_hoc_DataProps, ++ DataValue as react_hoc_DataValue, ++ MutateProps as react_hoc_MutateProps, ++ OperationOption as react_hoc_OperationOption, ++ OptionProps as react_hoc_OptionProps, ++ QueryControls as react_hoc_QueryControls, ++ WithApolloClient as react_hoc_WithApolloClient, ++ IDocumentDefinition as react_parser_IDocumentDefinition, ++ ConcastSourcesArray as utilities_ConcastSourcesArray, ++ ConcastSourcesIterable as utilities_ConcastSourcesIterable, ++ DirectiveInfo as utilities_DirectiveInfo, ++ Directives as utilities_Directives, ++ GetDirectiveConfig as utilities_GetDirectiveConfig, ++ GetFragmentSpreadConfig as utilities_GetFragmentSpreadConfig, ++ GetNodeConfig as utilities_GetNodeConfig, ++ InclusionDirectives as utilities_InclusionDirectives, ++ IsStrictlyAny as utilities_IsStrictlyAny, ++ OnlyRequiredProperties as utilities_OnlyRequiredProperties, ++ PromiseWithState as utilities_PromiseWithState, ++ ReconcilerFunction as utilities_ReconcilerFunction, ++ RemoveArgumentsConfig as utilities_RemoveArgumentsConfig, ++ RemoveDirectiveConfig as utilities_RemoveDirectiveConfig, ++ RemoveFragmentDefinitionConfig as utilities_RemoveFragmentDefinitionConfig, ++ RemoveFragmentSpreadConfig as utilities_RemoveFragmentSpreadConfig, ++ RemoveNodeConfig as utilities_RemoveNodeConfig, ++ RemoveVariableDefinitionConfig as utilities_RemoveVariableDefinitionConfig, ++ TupleToIntersection as utilities_TupleToIntersection, ++ UnionToIntersection as utilities_UnionToIntersection, ++ VariableValue as utilities_VariableValue, ++} from "@apollo/client/v4-migration"; ++ ++import { + ApolloClientOptions as core_ApolloClientOptions, + DefaultOptions as core_DefaultOptions, + ApolloClient as core_ApolloClient, + mergeOptions as core_mergeOptions, +@@ @@ + WatchQueryFetchPolicy as core_WatchQueryFetchPolicy, + MutationFetchPolicy as core_MutationFetchPolicy, + RefetchWritePolicy as core_RefetchWritePolicy, + ErrorPolicy as core_ErrorPolicy, +- FetchMoreQueryOptions as core_FetchMoreQueryOptions, + SubscribeToMoreOptions as core_SubscribeToMoreOptions, + SubscribeToMoreFunction as core_SubscribeToMoreFunction, + UpdateQueryMapFn as core_UpdateQueryMapFn, + UpdateQueryOptions as core_UpdateQueryOptions, + SubscribeToMoreUpdateQueryFn as core_SubscribeToMoreUpdateQueryFn, + NetworkStatus as core_NetworkStatus, + isNetworkRequestSettled as core_isNetworkRequestSettled, +- Resolver as core_Resolver, +- FragmentMatcher as core_FragmentMatcher, +- isApolloError as core_isApolloError, +- ApolloError as core_ApolloError, + Transaction as core_Transaction, +- DataProxy as core_DataProxy, + InMemoryCacheConfig as core_InMemoryCacheConfig, + ReactiveVar as core_ReactiveVar, + TypePolicies as core_TypePolicies, + TypePolicy as core_TypePolicy, +@@ @@ + MissingFieldError as core_MissingFieldError, + defaultDataIdFromObject as core_defaultDataIdFromObject, + makeVar as core_makeVar, + ServerError as core_ServerError, +- fromError as core_fromError, +- toPromise as core_toPromise, +- fromPromise as core_fromPromise, +- throwServerError as core_throwServerError, + DataMasking as core_DataMasking, + FragmentType as core_FragmentType, + Masked as core_Masked, + MaskedDocumentNode as core_MaskedDocumentNode, + MaybeMasked as core_MaybeMasked, + Unmasked as core_Unmasked, + DocumentTransformCacheKey as core_DocumentTransformCacheKey, +- Observer as core_Observer, +- ObservableSubscription as core_ObservableSubscription, + Reference as core_Reference, + StoreObject as core_StoreObject, + DocumentTransform as core_DocumentTransform, + Observable as core_Observable, +@@ @@ + disableFragmentWarnings as core_disableFragmentWarnings, + enableExperimentalFragmentVariables as core_enableExperimentalFragmentVariables, + disableExperimentalFragmentVariables as core_disableExperimentalFragmentVariables, + TypedDocumentNode as core_TypedDocumentNode, +- MethodKeys as core_MethodKeys, + DefaultContext as core_DefaultContext, + OnQueryUpdated as core_OnQueryUpdated, + RefetchQueryDescriptor as core_RefetchQueryDescriptor, + InternalRefetchQueryDescriptor as core_InternalRefetchQueryDescriptor, +@@ @@ + RefetchQueriesResult as core_RefetchQueriesResult, + InternalRefetchQueriesOptions as core_InternalRefetchQueriesOptions, + InternalRefetchQueriesResult as core_InternalRefetchQueriesResult, + InternalRefetchQueriesMap as core_InternalRefetchQueriesMap, +- PureQueryOptions as core_PureQueryOptions, + OperationVariables as core_OperationVariables, + ApolloQueryResult as core_ApolloQueryResult, + MutationQueryReducer as core_MutationQueryReducer, + MutationQueryReducersMap as core_MutationQueryReducersMap, +- MutationUpdaterFn as core_MutationUpdaterFn, + MutationUpdaterFunction as core_MutationUpdaterFunction, +- Resolvers as core_Resolvers, + StoreValue as core_StoreValue, + IdGetterObj as core_IdGetterObj, + IdGetter as core_IdGetter, + NormalizedCache as core_NormalizedCache, +@@ @@ + NextLink as core_NextLink, + RequestHandler as core_RequestHandler, + ServerParseError as core_ServerParseError, + parseAndCheckHttpResponse as core_parseAndCheckHttpResponse, +- ClientParseError as core_ClientParseError, +- serializeFetchParameter as core_serializeFetchParameter, + HttpOptions as core_HttpOptions, + UriFunction as core_UriFunction, + fallbackHttpConfig as core_fallbackHttpConfig, + defaultPrinter as core_defaultPrinter, +@@ @@ + } from "@apollo/client/dev"; + + import { + graphQLResultHasProtocolErrors as errors_graphQLResultHasProtocolErrors, +- isApolloError as errors_isApolloError, + PROTOCOL_ERRORS_SYMBOL as errors_PROTOCOL_ERRORS_SYMBOL, +- ApolloErrorOptions as errors_ApolloErrorOptions, +- GraphQLErrors as errors_GraphQLErrors, +- NetworkError as errors_NetworkError, +- ApolloError as errors_ApolloError, + } from "@apollo/client/errors"; + +-import { +- BatchableRequest as link_batch_BatchableRequest, +- BatchHandler as link_batch_BatchHandler, +- OperationBatcher as link_batch_OperationBatcher, +- BatchLink as link_batch_BatchLink, +-} from "@apollo/client/link/batch"; ++import { BatchHandler as link_batch_BatchHandler, BatchLink as link_batch_BatchLink } from "@apollo/client/link/batch"; + + import { + BatchHttpLink as link_batch_http_BatchHttpLink, + } from "@apollo/client/link/batch-http"; +@@ @@ + + import { + ServerParseError as link_http_ServerParseError, + parseAndCheckHttpResponse as link_http_parseAndCheckHttpResponse, +- ClientParseError as link_http_ClientParseError, +- serializeFetchParameter as link_http_serializeFetchParameter, + HttpOptions as link_http_HttpOptions, + UriFunction as link_http_UriFunction, + fallbackHttpConfig as link_http_fallbackHttpConfig, + defaultPrinter as link_http_defaultPrinter, +@@ @@ + GraphQLWsLink as link_subscriptions_GraphQLWsLink, + } from "@apollo/client/link/subscriptions"; + + import { +- fromError as link_utils_fromError, +- toPromise as link_utils_toPromise, +- fromPromise as link_utils_fromPromise, + ServerError as link_utils_ServerError, +- throwServerError as link_utils_throwServerError, +- validateOperation as link_utils_validateOperation, + createOperation as link_utils_createOperation, +- transformOperation as link_utils_transformOperation, + filterOperationVariables as link_utils_filterOperationVariables, + } from "@apollo/client/link/utils"; + + import { +@@ @@ + + import { + ApolloContextValue as react_ApolloContextValue, + ApolloProvider as react_ApolloProvider, +- ApolloConsumer as react_ApolloConsumer, + getApolloContext as react_getApolloContext, +- resetApolloContext as react_resetApolloContext, +- IDocumentDefinition as react_IDocumentDefinition, +- DocumentType as react_DocumentType, +- operationName as react_operationName, +- parser as react_parser, + PreloadQueryOptions as react_PreloadQueryOptions, + PreloadQueryFetchPolicy as react_PreloadQueryFetchPolicy, + PreloadQueryFunction as react_PreloadQueryFunction, + createQueryPreloader as react_createQueryPreloader, +@@ @@ + QueryReference as react_QueryReference, + QueryRef as react_QueryRef, + PreloadedQueryRef as react_PreloadedQueryRef, + Context as react_Context, +- CommonOptions as react_CommonOptions, +- BaseQueryOptions as react_BaseQueryOptions, + QueryFunctionOptions as react_QueryFunctionOptions, +- ObservableQueryFields as react_ObservableQueryFields, + QueryResult as react_QueryResult, +- QueryDataOptions as react_QueryDataOptions, + QueryHookOptions as react_QueryHookOptions, + LazyQueryHookOptions as react_LazyQueryHookOptions, + LazyQueryHookExecOptions as react_LazyQueryHookExecOptions, + SuspenseQueryHookFetchPolicy as react_SuspenseQueryHookFetchPolicy, +@@ @@ + BackgroundQueryHookFetchPolicy as react_BackgroundQueryHookFetchPolicy, + BackgroundQueryHookOptions as react_BackgroundQueryHookOptions, + LoadableQueryHookFetchPolicy as react_LoadableQueryHookFetchPolicy, + LoadableQueryHookOptions as react_LoadableQueryHookOptions, +- QueryLazyOptions as react_QueryLazyOptions, + LazyQueryResult as react_LazyQueryResult, + QueryTuple as react_QueryTuple, + LazyQueryExecFunction as react_LazyQueryExecFunction, + LazyQueryResultTuple as react_LazyQueryResultTuple, +- RefetchQueriesFunction as react_RefetchQueriesFunction, +- BaseMutationOptions as react_BaseMutationOptions, + MutationFunctionOptions as react_MutationFunctionOptions, + MutationResult as react_MutationResult, + MutationFunction as react_MutationFunction, + MutationHookOptions as react_MutationHookOptions, +- MutationDataOptions as react_MutationDataOptions, + MutationTuple as react_MutationTuple, + OnDataOptions as react_OnDataOptions, + OnSubscriptionDataOptions as react_OnSubscriptionDataOptions, + BaseSubscriptionOptions as react_BaseSubscriptionOptions, + SubscriptionResult as react_SubscriptionResult, + SubscriptionHookOptions as react_SubscriptionHookOptions, + SubscriptionDataOptions as react_SubscriptionDataOptions, +- SubscriptionCurrentObservable as react_SubscriptionCurrentObservable, + VariablesOption as react_VariablesOption, + NoInfer as react_NoInfer, + } from "@apollo/client/react"; + + import { +- Query as react_components_Query, +- Mutation as react_components_Mutation, +- Subscription as react_components_Subscription, +- QueryComponentOptions as react_components_QueryComponentOptions, +- MutationComponentOptions as react_components_MutationComponentOptions, +- SubscriptionComponentOptions as react_components_SubscriptionComponentOptions, +-} from "@apollo/client/react/components"; +- +-import { +- ApolloConsumerProps as react_context_ApolloConsumerProps, +- ApolloConsumer as react_context_ApolloConsumer, + ApolloContextValue as react_context_ApolloContextValue, + getApolloContext as react_context_getApolloContext, +- resetApolloContext as react_context_resetApolloContext, + ApolloProviderProps as react_context_ApolloProviderProps, + ApolloProvider as react_context_ApolloProvider, + } from "@apollo/client/react/context"; + + import { +- graphql as react_hoc_graphql, +- withQuery as react_hoc_withQuery, +- withMutation as react_hoc_withMutation, +- withSubscription as react_hoc_withSubscription, +- withApollo as react_hoc_withApollo, +- QueryControls as react_hoc_QueryControls, +- DataValue as react_hoc_DataValue, +- DataProps as react_hoc_DataProps, +- MutateProps as react_hoc_MutateProps, +- ChildProps as react_hoc_ChildProps, +- ChildDataProps as react_hoc_ChildDataProps, +- ChildMutateProps as react_hoc_ChildMutateProps, +- OptionProps as react_hoc_OptionProps, +- OperationOption as react_hoc_OperationOption, +- WithApolloClient as react_hoc_WithApolloClient, +-} from "@apollo/client/react/hoc"; +- +-import { + useQuery as react_hooks_useQuery, + UseSuspenseQueryResult as react_hooks_UseSuspenseQueryResult, + useSuspenseQuery as react_hooks_useSuspenseQuery, + UseBackgroundQueryResult as react_hooks_UseBackgroundQueryResult, +@@ @@ + HookWrappers as react_internal_HookWrappers, + } from "@apollo/client/react/internal"; + + import { +- operationName as react_parser_operationName, +- parser as react_parser_parser, +- verifyDocumentType as react_parser_verifyDocumentType, +- DocumentType as react_parser_DocumentType, +- IDocumentDefinition as react_parser_IDocumentDefinition, +-} from "@apollo/client/react/parser"; +- +-import { + getMarkupFromTree as react_ssr_getMarkupFromTree, + getDataFromTree as react_ssr_getDataFromTree, + renderToStringWithData as react_ssr_renderToStringWithData, +- RenderPromises as react_ssr_RenderPromises, + } from "@apollo/client/react/ssr"; + + import { + MockedProviderProps as testing_MockedProviderProps, +@@ @@ + MockedResponse as testing_MockedResponse, + MockLinkOptions as testing_MockLinkOptions, + ResultFunction as testing_ResultFunction, + MockLink as testing_MockLink, +- mockSingleLink as testing_mockSingleLink, + MockSubscriptionLink as testing_MockSubscriptionLink, +- mockObservableLink as testing_mockObservableLink, +- createMockClient as testing_createMockClient, +- subscribeAndCount as testing_subscribeAndCount, +- itAsync as testing_itAsync, +- wait as testing_wait, +- tick as testing_tick, +- withErrorSpy as testing_withErrorSpy, +- withWarningSpy as testing_withWarningSpy, +- withLogSpy as testing_withLogSpy, + } from "@apollo/client/testing"; + + import { + MockedResponse as testing_core_MockedResponse, + MockLinkOptions as testing_core_MockLinkOptions, + ResultFunction as testing_core_ResultFunction, + MockLink as testing_core_MockLink, +- mockSingleLink as testing_core_mockSingleLink, + MockSubscriptionLink as testing_core_MockSubscriptionLink, +- mockObservableLink as testing_core_mockObservableLink, +- createMockClient as testing_core_createMockClient, +- subscribeAndCount as testing_core_subscribeAndCount, +- itAsync as testing_core_itAsync, + wait as testing_core_wait, +- tick as testing_core_tick, +- withErrorSpy as testing_core_withErrorSpy, +- withWarningSpy as testing_core_withWarningSpy, +- withLogSpy as testing_core_withLogSpy, + } from "@apollo/client/testing/core"; + + import { +- createTestSchema as testing_experimental_createTestSchema, +- createSchemaFetch as testing_experimental_createSchemaFetch, +-} from "@apollo/client/testing/experimental"; +- +-import { + DEV as utilities_DEV, + maybe as utilities_maybe, +- DirectiveInfo as utilities_DirectiveInfo, +- InclusionDirectives as utilities_InclusionDirectives, + shouldInclude as utilities_shouldInclude, + hasDirectives as utilities_hasDirectives, +- hasAnyDirectives as utilities_hasAnyDirectives, +- hasAllDirectives as utilities_hasAllDirectives, +- hasClientExports as utilities_hasClientExports, +- getDirectiveNames as utilities_getDirectiveNames, +- getInclusionDirectives as utilities_getInclusionDirectives, +- getFragmentMaskMode as utilities_getFragmentMaskMode, + DocumentTransformCacheKey as utilities_DocumentTransformCacheKey, + DocumentTransform as utilities_DocumentTransform, + FragmentMap as utilities_FragmentMap, + FragmentMapFunction as utilities_FragmentMapFunction, + createFragmentMap as utilities_createFragmentMap, + getFragmentQueryDocument as utilities_getFragmentQueryDocument, + getFragmentFromSelection as utilities_getFragmentFromSelection, +- isFullyUnmaskedOperation as utilities_isFullyUnmaskedOperation, + checkDocument as utilities_checkDocument, + getOperationDefinition as utilities_getOperationDefinition, + getOperationName as utilities_getOperationName, + getFragmentDefinitions as utilities_getFragmentDefinitions, +@@ @@ + StoreObject as utilities_StoreObject, + AsStoreObject as utilities_AsStoreObject, + Reference as utilities_Reference, + StoreValue as utilities_StoreValue, +- Directives as utilities_Directives, +- VariableValue as utilities_VariableValue, + makeReference as utilities_makeReference, + isDocumentNode as utilities_isDocumentNode, + isReference as utilities_isReference, + isField as utilities_isField, +- isInlineFragment as utilities_isInlineFragment, +- valueToObjectRepresentation as utilities_valueToObjectRepresentation, + storeKeyNameFromField as utilities_storeKeyNameFromField, + argumentsObjectFromField as utilities_argumentsObjectFromField, + resultKeyNameFromField as utilities_resultKeyNameFromField, + getStoreKeyName as utilities_getStoreKeyName, +- getTypenameFromResult as utilities_getTypenameFromResult, +- RemoveNodeConfig as utilities_RemoveNodeConfig, +- GetNodeConfig as utilities_GetNodeConfig, +- RemoveDirectiveConfig as utilities_RemoveDirectiveConfig, +- GetDirectiveConfig as utilities_GetDirectiveConfig, +- RemoveArgumentsConfig as utilities_RemoveArgumentsConfig, +- GetFragmentSpreadConfig as utilities_GetFragmentSpreadConfig, +- RemoveFragmentSpreadConfig as utilities_RemoveFragmentSpreadConfig, +- RemoveFragmentDefinitionConfig as utilities_RemoveFragmentDefinitionConfig, +- RemoveVariableDefinitionConfig as utilities_RemoveVariableDefinitionConfig, + addTypenameToDocument as utilities_addTypenameToDocument, +- addNonReactiveToNamedFragments as utilities_addNonReactiveToNamedFragments, +- buildQueryFromSelectionSet as utilities_buildQueryFromSelectionSet, + removeDirectivesFromDocument as utilities_removeDirectivesFromDocument, +- removeConnectionDirectiveFromDocument as utilities_removeConnectionDirectiveFromDocument, +- removeArgumentsFromDocument as utilities_removeArgumentsFromDocument, +- removeFragmentSpreadFromDocument as utilities_removeFragmentSpreadFromDocument, +- removeClientSetsFromDocument as utilities_removeClientSetsFromDocument, + isMutationOperation as utilities_isMutationOperation, + isQueryOperation as utilities_isQueryOperation, + isSubscriptionOperation as utilities_isSubscriptionOperation, + concatPagination as utilities_concatPagination, + offsetLimitPagination as utilities_offsetLimitPagination, + relayStylePagination as utilities_relayStylePagination, +- Observer as utilities_Observer, +- ObservableSubscription as utilities_ObservableSubscription, + Observable as utilities_Observable, +- PromiseWithState as utilities_PromiseWithState, +- isStatefulPromise as utilities_isStatefulPromise, + createFulfilledPromise as utilities_createFulfilledPromise, + createRejectedPromise as utilities_createRejectedPromise, + wrapPromiseWithState as utilities_wrapPromiseWithState, + preventUnhandledRejection as utilities_preventUnhandledRejection, +@@ @@ + omitDeep as utilities_omitDeep, + stripTypename as utilities_stripTypename, + DeepOmit as utilities_DeepOmit, + DeepPartial as utilities_DeepPartial, +- OnlyRequiredProperties as utilities_OnlyRequiredProperties, + Prettify as utilities_Prettify, + Primitive as utilities_Primitive, +- UnionToIntersection as utilities_UnionToIntersection, + NoInfer as utilities_NoInfer, + RemoveIndexSignature as utilities_RemoveIndexSignature, + AutoCleanedStrongCache as utilities_AutoCleanedStrongCache, + AutoCleanedWeakCache as utilities_AutoCleanedWeakCache, + cacheSizes as utilities_cacheSizes, +- defaultCacheSizes as utilities_defaultCacheSizes, + CacheSizes as utilities_CacheSizes, + mergeDeep as utilities_mergeDeep, + mergeDeepArray as utilities_mergeDeepArray, +- TupleToIntersection as utilities_TupleToIntersection, +- ReconcilerFunction as utilities_ReconcilerFunction, + DeepMerger as utilities_DeepMerger, + cloneDeep as utilities_cloneDeep, +- iterateObserversSafely as utilities_iterateObserversSafely, +- asyncMap as utilities_asyncMap, +- ConcastSourcesIterable as utilities_ConcastSourcesIterable, +- ConcastSourcesArray as utilities_ConcastSourcesArray, +- Concast as utilities_Concast, +- fixObservableSubclass as utilities_fixObservableSubclass, + isNonEmptyArray as utilities_isNonEmptyArray, + isArray as utilities_isArray, + isNonNullObject as utilities_isNonNullObject, + isPlainObject as utilities_isPlainObject, + graphQLResultHasError as utilities_graphQLResultHasError, + getGraphQLErrorsFromResult as utilities_getGraphQLErrorsFromResult, +- canUseWeakMap as utilities_canUseWeakMap, +- canUseWeakSet as utilities_canUseWeakSet, +- canUseSymbol as utilities_canUseSymbol, +- canUseAsyncIteratorSymbol as utilities_canUseAsyncIteratorSymbol, + canUseDOM as utilities_canUseDOM, +- canUseLayoutEffect as utilities_canUseLayoutEffect, + compact as utilities_compact, + makeUniqueId as utilities_makeUniqueId, + stringifyForDisplay as utilities_stringifyForDisplay, + mergeOptions as utilities_mergeOptions, +- isExecutionPatchIncrementalResult as utilities_isExecutionPatchIncrementalResult, +- isExecutionPatchInitialResult as utilities_isExecutionPatchInitialResult, +- isExecutionPatchResult as utilities_isExecutionPatchResult, +- isApolloPayloadResult as utilities_isApolloPayloadResult, +- mergeIncrementalData as utilities_mergeIncrementalData, +- IsStrictlyAny as utilities_IsStrictlyAny, + } from "@apollo/client/utilities"; + + import { + maybe as utilities_globals_maybe, +" +`; diff --git a/scripts/codemods/ac3-to-ac4/src/__tests__/removals.test.ts b/scripts/codemods/ac3-to-ac4/src/__tests__/removals.test.ts new file mode 100644 index 00000000000..0b69326c057 --- /dev/null +++ b/scripts/codemods/ac3-to-ac4/src/__tests__/removals.test.ts @@ -0,0 +1,30 @@ +import { describe, expect, test } from "vitest"; + +import removals from "../removals.js"; + +import { createDiff } from "./diffTransform.js"; +import allExports from "./exports.json" with { type: "json" }; +const diff = createDiff(removals); + +test("all exports", () => { + const source = Object.entries(allExports) + .map(([entryPoint, exports]) => + ` +import { + ${exports + .map( + (info) => + `${info.name} as ${entryPoint + .replace(/@apollo\/client\/?/, "") + .replace(/[/-]/g, "_")}_${info.name}` + ) + .join(",\n ")}, +} from "${entryPoint}"; + `.trim() + ) + .join("\n\n"); + + //console.log(source); + + expect(diff(source)).toMatchSnapshot(); +}); diff --git a/scripts/codemods/ac3-to-ac4/src/index.ts b/scripts/codemods/ac3-to-ac4/src/index.ts index 2050b14172e..d366d63b1c5 100644 --- a/scripts/codemods/ac3-to-ac4/src/index.ts +++ b/scripts/codemods/ac3-to-ac4/src/index.ts @@ -2,9 +2,13 @@ import type { API, FileInfo, Options, Transform } from "jscodeshift"; import imports from "./imports.js"; import links from "./links.js"; +import removals from "./removals.js"; import { monkeyPatchAstTypes } from "./util/monkeyPatchAstTypes.js"; -export const codemods = { imports, links } satisfies Record; +export const codemods = { imports, links, removals } satisfies Record< + string, + Transform +>; export default async function transform( file: FileInfo, diff --git a/scripts/codemods/ac3-to-ac4/src/removals.ts b/scripts/codemods/ac3-to-ac4/src/removals.ts new file mode 100644 index 00000000000..16ef0146098 --- /dev/null +++ b/scripts/codemods/ac3-to-ac4/src/removals.ts @@ -0,0 +1,195 @@ +import type { Transform } from "jscodeshift"; + +import type { IdentifierRename } from "./renames.js"; +import { handleIdentiferRename } from "./util/handleIdentiferRename.js"; + +// prettier-ignore +const removals = [ + { importType: "type", module: "@apollo/client", identifier: "ClientParseError" }, + { importType: "type", module: "@apollo/client", identifier: "FetchMoreQueryOptions" }, + { importType: "type", module: "@apollo/client", identifier: "FragmentMatcher" }, + { importType: "type", module: "@apollo/client", identifier: "MethodKeys" }, + { importType: "type", module: "@apollo/client", identifier: "MutationUpdaterFn" }, + { importType: "type", module: "@apollo/client", identifier: "PureQueryOptions" }, + { importType: "type", module: "@apollo/client", identifier: "Resolver" }, + { importType: "type", module: "@apollo/client", identifier: "Resolvers" }, + { importType: "type", module: "@apollo/client/errors", identifier: "ApolloErrorOptions" }, + { importType: "type", module: "@apollo/client/errors", identifier: "GraphQLErrors" }, + { importType: "type", module: "@apollo/client/errors", identifier: "NetworkError" }, + { importType: "type", module: "@apollo/client/link/batch", identifier: "BatchableRequest" }, + { importType: "type", module: "@apollo/client/link/http", identifier: "ClientParseError" }, + { importType: "type", module: "@apollo/client/react", identifier: "BaseMutationOptions" }, + { importType: "type", module: "@apollo/client/react", identifier: "BaseQueryOptions" }, + { importType: "type", module: "@apollo/client/react", identifier: "CommonOptions" }, + { importType: "type", module: "@apollo/client/react", identifier: "IDocumentDefinition" }, + { importType: "type", module: "@apollo/client/react", identifier: "MutationDataOptions" }, + { importType: "type", module: "@apollo/client/react", identifier: "ObservableQueryFields" }, + { importType: "type", module: "@apollo/client/react", identifier: "QueryDataOptions" }, + { importType: "type", module: "@apollo/client/react", identifier: "QueryLazyOptions" }, + { importType: "type", module: "@apollo/client/react", identifier: "RefetchQueriesFunction" }, + { importType: "type", module: "@apollo/client/react", identifier: "SubscriptionCurrentObservable" }, + { importType: "type", module: "@apollo/client/react/components", identifier: "MutationComponentOptions" }, + { importType: "type", module: "@apollo/client/react/components", identifier: "QueryComponentOptions" }, + { importType: "type", module: "@apollo/client/react/components", identifier: "SubscriptionComponentOptions" }, + { importType: "type", module: "@apollo/client/react/context", identifier: "ApolloConsumerProps" }, + { importType: "type", module: "@apollo/client/react/hoc", identifier: "ChildDataProps" }, + { importType: "type", module: "@apollo/client/react/hoc", identifier: "ChildMutateProps" }, + { importType: "type", module: "@apollo/client/react/hoc", identifier: "ChildProps" }, + { importType: "type", module: "@apollo/client/react/hoc", identifier: "DataProps" }, + { importType: "type", module: "@apollo/client/react/hoc", identifier: "DataValue" }, + { importType: "type", module: "@apollo/client/react/hoc", identifier: "MutateProps" }, + { importType: "type", module: "@apollo/client/react/hoc", identifier: "OperationOption" }, + { importType: "type", module: "@apollo/client/react/hoc", identifier: "OptionProps" }, + { importType: "type", module: "@apollo/client/react/hoc", identifier: "QueryControls" }, + { importType: "type", module: "@apollo/client/react/hoc", identifier: "WithApolloClient" }, + { importType: "type", module: "@apollo/client/react/parser", identifier: "IDocumentDefinition" }, + { importType: "type", module: "@apollo/client/utilities", identifier: "ConcastSourcesArray" }, + { importType: "type", module: "@apollo/client/utilities", identifier: "ConcastSourcesIterable" }, + { importType: "type", module: "@apollo/client/utilities", identifier: "DirectiveInfo" }, + { importType: "type", module: "@apollo/client/utilities", identifier: "Directives" }, + { importType: "type", module: "@apollo/client/utilities", identifier: "GetDirectiveConfig" }, + { importType: "type", module: "@apollo/client/utilities", identifier: "GetFragmentSpreadConfig" }, + { importType: "type", module: "@apollo/client/utilities", identifier: "GetNodeConfig" }, + { importType: "type", module: "@apollo/client/utilities", identifier: "InclusionDirectives" }, + { importType: "type", module: "@apollo/client/utilities", identifier: "IsStrictlyAny" }, + { importType: "type", module: "@apollo/client/utilities", identifier: "OnlyRequiredProperties" }, + { importType: "type", module: "@apollo/client/utilities", identifier: "PromiseWithState" }, + { importType: "type", module: "@apollo/client/utilities", identifier: "ReconcilerFunction" }, + { importType: "type", module: "@apollo/client/utilities", identifier: "RemoveArgumentsConfig" }, + { importType: "type", module: "@apollo/client/utilities", identifier: "RemoveDirectiveConfig" }, + { importType: "type", module: "@apollo/client/utilities", identifier: "RemoveFragmentDefinitionConfig" }, + { importType: "type", module: "@apollo/client/utilities", identifier: "RemoveFragmentSpreadConfig" }, + { importType: "type", module: "@apollo/client/utilities", identifier: "RemoveNodeConfig" }, + { importType: "type", module: "@apollo/client/utilities", identifier: "RemoveVariableDefinitionConfig" }, + { importType: "type", module: "@apollo/client/utilities", identifier: "TupleToIntersection" }, + { importType: "type", module: "@apollo/client/utilities", identifier: "UnionToIntersection" }, + { importType: "type", module: "@apollo/client/utilities", identifier: "VariableValue" }, + { importType: "value", module: "@apollo/client", identifier: "ApolloError" }, + { importType: "value", module: "@apollo/client", identifier: "DataProxy" }, + { importType: "value", module: "@apollo/client", identifier: "fromError" }, + { importType: "value", module: "@apollo/client", identifier: "fromPromise" }, + { importType: "value", module: "@apollo/client", identifier: "isApolloError" }, + { importType: "value", module: "@apollo/client", identifier: "ObservableSubscription" }, + { importType: "value", module: "@apollo/client", identifier: "Observer" }, + { importType: "value", module: "@apollo/client", identifier: "serializeFetchParameter" }, + { importType: "value", module: "@apollo/client", identifier: "throwServerError" }, + { importType: "value", module: "@apollo/client", identifier: "toPromise" }, + { importType: "value", module: "@apollo/client/cache", identifier: "DataProxy" }, + { importType: "value", module: "@apollo/client/errors", identifier: "ApolloError" }, + { importType: "value", module: "@apollo/client/errors", identifier: "isApolloError" }, + { importType: "value", module: "@apollo/client/link/batch", identifier: "OperationBatcher" }, + { importType: "value", module: "@apollo/client/link/http", identifier: "serializeFetchParameter" }, + { importType: "value", module: "@apollo/client/link/utils", identifier: "fromError" }, + { importType: "value", module: "@apollo/client/link/utils", identifier: "fromPromise" }, + { importType: "value", module: "@apollo/client/link/utils", identifier: "throwServerError" }, + { importType: "value", module: "@apollo/client/link/utils", identifier: "toPromise" }, + { importType: "value", module: "@apollo/client/link/utils", identifier: "transformOperation" }, + { importType: "value", module: "@apollo/client/link/utils", identifier: "validateOperation" }, + { importType: "value", module: "@apollo/client/react", identifier: "ApolloConsumer" }, + { importType: "value", module: "@apollo/client/react", identifier: "DocumentType" }, + { importType: "value", module: "@apollo/client/react", identifier: "operationName" }, + { importType: "value", module: "@apollo/client/react", identifier: "parser" }, + { importType: "value", module: "@apollo/client/react", identifier: "resetApolloContext" }, + { importType: "value", module: "@apollo/client/react/components", identifier: "Mutation" }, + { importType: "value", module: "@apollo/client/react/components", identifier: "Query" }, + { importType: "value", module: "@apollo/client/react/components", identifier: "Subscription" }, + { importType: "value", module: "@apollo/client/react/context", identifier: "ApolloConsumer" }, + { importType: "value", module: "@apollo/client/react/context", identifier: "resetApolloContext" }, + { importType: "value", module: "@apollo/client/react/hoc", identifier: "graphql" }, + { importType: "value", module: "@apollo/client/react/hoc", identifier: "withApollo" }, + { importType: "value", module: "@apollo/client/react/hoc", identifier: "withMutation" }, + { importType: "value", module: "@apollo/client/react/hoc", identifier: "withQuery" }, + { importType: "value", module: "@apollo/client/react/hoc", identifier: "withSubscription" }, + { importType: "value", module: "@apollo/client/react/parser", identifier: "DocumentType" }, + { importType: "value", module: "@apollo/client/react/parser", identifier: "operationName" }, + { importType: "value", module: "@apollo/client/react/parser", identifier: "parser" }, + { importType: "value", module: "@apollo/client/react/parser", identifier: "verifyDocumentType" }, + { importType: "value", module: "@apollo/client/react/ssr", identifier: "RenderPromises" }, + { importType: "value", module: "@apollo/client/testing", identifier: "createMockClient" }, + { importType: "value", module: "@apollo/client/testing", identifier: "itAsync" }, + { importType: "value", module: "@apollo/client/testing", identifier: "mockObservableLink" }, + { importType: "value", module: "@apollo/client/testing", identifier: "mockSingleLink" }, + { importType: "value", module: "@apollo/client/testing", identifier: "subscribeAndCount" }, + { importType: "value", module: "@apollo/client/testing", identifier: "tick" }, + { importType: "value", module: "@apollo/client/testing", identifier: "wait" }, + { importType: "value", module: "@apollo/client/testing", identifier: "withErrorSpy" }, + { importType: "value", module: "@apollo/client/testing", identifier: "withLogSpy" }, + { importType: "value", module: "@apollo/client/testing", identifier: "withWarningSpy" }, + { importType: "value", module: "@apollo/client/testing/core", identifier: "createMockClient" }, + { importType: "value", module: "@apollo/client/testing/core", identifier: "itAsync" }, + { importType: "value", module: "@apollo/client/testing/core", identifier: "mockObservableLink" }, + { importType: "value", module: "@apollo/client/testing/core", identifier: "mockSingleLink" }, + { importType: "value", module: "@apollo/client/testing/core", identifier: "subscribeAndCount" }, + { importType: "value", module: "@apollo/client/testing/core", identifier: "tick" }, + { importType: "value", module: "@apollo/client/testing/core", identifier: "withErrorSpy" }, + { importType: "value", module: "@apollo/client/testing/core", identifier: "withLogSpy" }, + { importType: "value", module: "@apollo/client/testing/core", identifier: "withWarningSpy" }, + { importType: "value", module: "@apollo/client/testing/experimental", identifier: "createSchemaFetch" }, + { importType: "value", module: "@apollo/client/testing/experimental", identifier: "createTestSchema" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "addNonReactiveToNamedFragments" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "asyncMap" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "buildQueryFromSelectionSet" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "canUseAsyncIteratorSymbol" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "canUseLayoutEffect" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "canUseSymbol" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "canUseWeakMap" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "canUseWeakSet" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "Concast" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "defaultCacheSizes" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "fixObservableSubclass" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "getDirectiveNames" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "getFragmentMaskMode" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "getInclusionDirectives" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "getTypenameFromResult" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "hasAllDirectives" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "hasAnyDirectives" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "hasClientExports" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "isApolloPayloadResult" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "isExecutionPatchIncrementalResult" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "isExecutionPatchInitialResult" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "isExecutionPatchResult" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "isFullyUnmaskedOperation" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "isInlineFragment" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "isStatefulPromise" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "iterateObserversSafely" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "mergeIncrementalData" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "ObservableSubscription" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "Observer" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "removeArgumentsFromDocument" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "removeClientSetsFromDocument" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "removeConnectionDirectiveFromDocument" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "removeFragmentSpreadFromDocument" }, + { importType: "value", module: "@apollo/client/utilities", identifier: "valueToObjectRepresentation" }, +] satisfies Array<{ + module: string; + identifier: string; + importType: "type" | "value"; +}>; + +const removalsTransform: Transform = function transform(file, api) { + const j = api.jscodeshift; + const source = j(file.source); + const context = { j, source }; + + let modified = false; + for (const removal of removals) { + const rename: IdentifierRename = { + from: { + module: removal.module, + identifier: removal.identifier, + alternativeModules: ["@apollo/client", "@apollo/client/core"], + }, + to: { module: "@apollo/client/v4-migration", alternativeModules: [] }, + importType: removal.importType, + }; + handleIdentiferRename({ + rename, + context, + onModify: () => { + modified = true; + }, + }); + } + return modified ? source.toSource() : undefined; +}; +export default removalsTransform; diff --git a/src/__tests__/__snapshots__/exports.ts.snap b/src/__tests__/__snapshots__/exports.ts.snap index 0209b48e809..7ea8a99b08a 100644 --- a/src/__tests__/__snapshots__/exports.ts.snap +++ b/src/__tests__/__snapshots__/exports.ts.snap @@ -487,3 +487,5 @@ Array [ "setVerbosity", ] `; + +exports[`exports of public entry points @apollo/client/v4-migration 1`] = `Array []`; diff --git a/src/__tests__/exports.ts b/src/__tests__/exports.ts index 8a4a9caf160..a31b07ab5c9 100644 --- a/src/__tests__/exports.ts +++ b/src/__tests__/exports.ts @@ -43,6 +43,7 @@ import * as utilitiesEnvironment from "@apollo/client/utilities/environment"; import * as utilitiesInternal from "@apollo/client/utilities/internal"; import * as utilitiesInternalGlobals from "@apollo/client/utilities/internal/globals"; import * as utilitiesInvariant from "@apollo/client/utilities/invariant"; +import * as v4_migration from "@apollo/client/v4-migration"; // eslint-disable-next-line local-rules/no-relative-imports import { entryPoints } from "../../config/entryPoints.js"; @@ -105,6 +106,7 @@ describe("exports of public entry points", () => { check("@apollo/client/utilities/internal/globals", utilitiesInternalGlobals); check("@apollo/client/utilities/invariant", utilitiesInvariant); check("@apollo/client/utilities/environment", utilitiesEnvironment); + check("@apollo/client/v4-migration", v4_migration); checkWithConditions("@apollo/client/react", ["react-server"]); diff --git a/src/v4-migration.ts b/src/v4-migration.ts new file mode 100644 index 00000000000..a3a55728334 --- /dev/null +++ b/src/v4-migration.ts @@ -0,0 +1,757 @@ +/** + * This file documents exports that have been removed from Apollo Client in 4.0. + * + * Executing the `removals` codemod will point removed exports to this file, where + * docblocks will explain the removal and suggest alternatives. + */ + +export declare namespace Removals { + /** + * @deprecated The export `{{name}}` has been removed from Apollo Client 4.0. + */ + export type removedValue = never; + /** + * @deprecated The export `{{name}}` has been removed from Apollo Client 4.0. + */ + export type removedType = never; + /** + * @deprecated All higher-order components (HOCs) have been removed from Apollo Client 4.0 and are no longer available. + * Use the hooks exported from the `@apollo/client/react` package instead. + */ + export type HOC = never; + /** + * @deprecated All render prop components have been removed from Apollo Client 4.0 and are no longer available. + * Use the hooks exported from the `@apollo/client/react` package instead. + */ + export type renderProp = never; + /** + * @deprecated The export `{{name}}` has been removed from Apollo Client 4.0. + * + * Error handling has been overhauled as a whole. + */ + export type errors = never; + /** + * @deprecated The export `{{name}}` has been removed from Apollo Client 4.0. + * + * The Observable implementation of Apollo Client has been moved from `zen-observable` to `rxjs`. + */ + export type rxjs = never; + /** + * @deprecated The export `{{name}}` has been removed from Apollo Client 4.0. + * + * This export was an implementation detail of \{\{of\}\} and is no longer available. + */ + export type implementationDetail = never; + /** + * @deprecated The utility `{{name}}` has been removed from Apollo Client 4.0. + * + * It was an implementation detail that is no longer necessary and has been removed without replacement. + */ + export type utility = never; + /** + * @deprecated The export `{{name}}` has been removed from Apollo Client 4.0. + * + * The testing utilities have moved into their own package, [\@apollo/graphql-testing-library](https://github.com/apollographql/graphql-testing-library). + */ + export type testingLibrary = never; + /** + * @deprecated The export `{{name}}` has been removed from Apollo Client 4.0. + * + * This export is considered internal and is no longer exposed. + */ + export type internal = never; + /** + * @deprecated The export `{{name}}` has been removed from Apollo Client 4.0. + * + * This was an internal testing utility that was not meant for public use. + * It has been removed without replacement. + */ + export type internalTesting = never; + /** + * @deprecated The export `{{name}}` has been removed from Apollo Client 4.0. + * + * This export was part of a specific `\@defer` protocol implementation. + * These implementations are now pluggable, so this export might not be relevant for all protocol specifications. + */ + export type defer = never; +} + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.HOC:type } + */ +export declare const ApolloConsumer: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.errors:type {"name":"ApolloError"} } + */ +export declare class ApolloError {} + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.rxjs:type {"name":"Concast"} } + * + * Instead of `Concast`, look into the `rxjs` [`BehaviorSubject`](https://rxjs.dev/api/index/class/BehaviorSubject) api. + */ +export declare class Concast {} + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"DataProxy"} } + * + * You can find the types that were previously available in the `DataProxy` namespace either in the `ApolloClient` namespace or the `Cache` namespace. + */ +export declare const DataProxy: never; + +/** + * @deprecated The `DocumentType` enum has been removed from Apollo Client 4.0, along with the `parser` API exported from `@apollo/client/react/parser`. + * + * This API was mostly an implementation detail and has been removed without replacement. + */ +export declare const DocumentType: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.renderProp:type } + */ +export declare const Mutation: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.rxjs:type {"name":"ObservableSubscription"} } + */ +export declare const ObservableSubscription: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.rxjs:type {"name":"Observer"} } + */ +export declare const Observer: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.implementationDetail:type {"name":"OperationBatcher", "of": "`BatchLink`"} } + */ +export declare const OperationBatcher: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.renderProp:type } + */ +export declare const Query: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.implementationDetail:type {"name":"RenderPromises", "of": "`getMarkupFromTree`"} } + */ +export declare const RenderPromises: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.rxjs:type {"name":"Subscription"} } + */ +export declare const Subscription: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.implementationDetail:type {"name":"addNonReactiveToNamedFragments", "of": "the internal `QueryManager` class"} } + */ +export declare const addNonReactiveToNamedFragments: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.rxjs:type {"name":"asyncMap"} } + * + * Consider using the `rxjs` [`mergeMap`](https://rxjs.dev/api/operators/mergeMap) operator instead. + */ +export declare const asyncMap: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.utility:type {"name":"buildQueryFromSelectionSet"} } + */ +export declare const buildQueryFromSelectionSet: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.utility:type {"name":"canUseAsyncIteratorSymbol"} } + */ +export declare const canUseAsyncIteratorSymbol: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.utility:type {"name":"canUseLayoutEffect"} } + */ +export declare const canUseLayoutEffect: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.utility:type {"name":"canUseSymbol"} } + */ +export declare const canUseSymbol: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.utility:type {"name":"canUseWeakMap"} } + */ +export declare const canUseWeakMap: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.utility:type {"name":"canUseWeakSet"} } + */ +export declare const canUseWeakSet: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedValue:type {"name":"createMockClient"} } + * + * Please create an `ApolloClient` instance with a `MockLink` manually instead. + */ +export declare const createMockClient: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.testingLibrary:type {"name":"createSchemaFetch"} } + */ +export declare const createSchemaFetch: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.testingLibrary:type {"name":"createTestSchema"} } + */ +export declare const createTestSchema: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.internal:type {"name":"defaultCacheSizes"} } + */ +export declare const defaultCacheSizes: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.implementationDetail:type {"name":"fixObservableSubclass","of":"ObservableQuery"} } + */ +export declare const fixObservableSubclass: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.rxjs:type {"name":"fromError"} } + */ +export declare const fromError: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.rxjs:type {"name":"fromPromise"} } + */ +export declare const fromPromise: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.utility:type {"name":"getDirectiveNames"} } + */ +export declare const getDirectiveNames: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.implementationDetail:type {"name":"getFragmentMaskMode","of":"data masking"} } + */ +export declare const getFragmentMaskMode: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.implementationDetail:type {"name":"getInclusionDirectives","of":"local state"} } + */ +export declare const getInclusionDirectives: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.implementationDetail:type {"name":"getTypenameFromResult","of":"`InMemoryCache`"} } + */ +export declare const getTypenameFromResult: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.HOC:type } + */ +export declare const graphql: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.utility:type {"name":"hasAllDirectives"} } + */ +export declare const hasAllDirectives: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.utility:type {"name":"hasAnyDirectives"} } + */ +export declare const hasAnyDirectives: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.utility:type {"name":"hasClientExports"} } + */ +export declare const hasClientExports: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.errors:type {"name":"isApolloError"} } + */ +export declare const isApolloError: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.implementationDetail:type {"name":"isApolloPayloadResult","of":"HttpLink"} } + */ +export declare const isApolloPayloadResult: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.defer:type {"name":"isExecutionPatchIncrementalResult"} } + */ +export declare const isExecutionPatchIncrementalResult: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.defer:type {"name":"isExecutionPatchInitialResult"} } + */ +export declare const isExecutionPatchInitialResult: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.defer:type {"name":"isExecutionPatchResult"} } + */ +export declare const isExecutionPatchResult: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.implementationDetail:type {"name":"isFullyUnmaskedOperation","of":"data masking"} } + */ +export declare const isFullyUnmaskedOperation: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.utility:type {"name":"isInlineFragment"} } + */ +export declare const isInlineFragment: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.utility:type {"name":"isStatefulPromise"} } + */ +export declare const isStatefulPromise: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.internalTesting:type {"name":"itAsync"} } + */ +export declare const itAsync: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.internalTesting:type {"name":"iterateObserversSafely"} } + */ +export declare const iterateObserversSafely: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.defer:type {"name":"mergeIncrementalData"} } + */ +export declare const mergeIncrementalData: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedValue:type {"name":"mockObservableLink"} } + */ +export declare const mockObservableLink: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedValue:type {"name":"mockSingleLink"} } + * + * This utility was a wrapper around `MockLink`. + * Please call `new MockLink(mockedResponses)` directly. + */ +export declare const mockSingleLink: never; + +/** + * @deprecated The `operationName` function has been removed from Apollo Client 4.0, along with the `parser` API exported from `@apollo/client/react/parser`. + * + * This API was mostly an implementation detail and has been removed without replacement. + */ +export declare const operationName: never; + +/** + * @deprecated The `parser` function has been removed from Apollo Client 4.0, along with the whole `@apollo/client/react/parser` entry point. + * + * This API was mostly an implementation detail and has been removed without replacement. + */ +export declare const parser: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.utility:type {"name":"removeArgumentsFromDocument"} } + */ +export declare const removeArgumentsFromDocument: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.utility:type {"name":"removeClientSetsFromDocument"} } + */ +export declare const removeClientSetsFromDocument: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.utility:type {"name":"removeConnectionDirectiveFromDocument"} } + */ +export declare const removeConnectionDirectiveFromDocument: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.utility:type {"name":"removeFragmentSpreadFromDocument"} } + */ +export declare const removeFragmentSpreadFromDocument: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedValue:type {"name":"resetApolloContext"} } + * + * This function was deprecated and is no longer available. + */ +export declare const resetApolloContext: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.implementationDetail:type {"name":"serializeFetchParameter","of":"HttpLink"} } + * + * Please use `JSON.stringify` instead. + */ +export declare const serializeFetchParameter: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.internalTesting:type {"name":"subscribeAndCount"} } + */ +export declare const subscribeAndCount: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.implementationDetail:type {"name":"throwServerError","of":"HttpLink"} } + * + * Please instantiate a `ServerError` directly instead. + */ +export declare const throwServerError: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.internalTesting:type {"name":"tick"} } + */ +export declare const tick: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.rxjs:type {"name":"toPromise"} } + * + * Please use the `rxjs` [`firstValueFrom`](https://rxjs.dev/api/index/function/firstValueFrom) or [`lastValueFrom`](https://rxjs.dev/api/index/function/lastValueFrom) functions instead. + */ +export declare const toPromise: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.implementationDetail:type {"name":"transformOperation","of":"ApolloLink.execute"} } + */ +export declare const transformOperation: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.implementationDetail:type {"name":"validateOperation","of":"ApolloLink.execute"} } + */ +export declare const validateOperation: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.internal:type {"name":"valueToObjectRepresentation"} } + */ +export declare const valueToObjectRepresentation: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.internal:type {"name":"verifyDocumentType"} } + */ +export declare const verifyDocumentType: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.internalTesting:type {"name":"wait"} } + */ +export declare const wait: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.HOC:type } + */ +export declare const withApollo: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.internalTesting:type {"name":"withErrorSpy"} } + */ +export declare const withErrorSpy: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.internalTesting:type {"name":"withLogSpy"} } + */ +export declare const withLogSpy: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.HOC:type } + */ +export declare const withMutation: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.HOC:type } + */ +export declare const withQuery: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.HOC:type } + */ +export declare const withSubscription: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.internalTesting:type {"name":"withWarningSpy"} } + */ +export declare const withWarningSpy: never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.renderProp:type } + */ +export type ApolloConsumerProps = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.errors:type {"name":"ApolloErrorOptions"} } + */ +export type ApolloErrorOptions = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"BaseMutationOptions"} } + * + * Look into `ApolloClient.MutateOptions` or `useMutation.Options` instead. + */ +export type BaseMutationOptions = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"BaseQueryOptions"} } + * + * Look into `ApolloClient.QueryOptions` or `useQuery.Options` instead. + */ +export type BaseQueryOptions = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"BatchableRequest"} } + */ +export type BatchableRequest = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.HOC:type } + */ +export type ChildDataProps = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.HOC:type } + */ +export type ChildMutateProps = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.HOC:type } + */ +export type ChildProps = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.errors:type {"name":"ClientParseError"} } + */ +export type ClientParseError = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"CommonOptions"} } + */ +export type CommonOptions = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"ConcastSourcesArray"} } + */ +export type ConcastSourcesArray = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"ConcastSourcesIterable"} } + */ +export type ConcastSourcesIterable = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"DataProps"} } + */ +export type DataProps = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.HOC:type } + */ +export type DataValue = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"DirectiveInfo"} } + */ +export type DirectiveInfo = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"Directives"} } + */ +export type Directives = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"FetchMoreQueryOptions"} } + * + * Look into `ObservableQuery.FetchMoreOptions` instead. + */ +export type FetchMoreQueryOptions = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"FragmentMatcher"} } + */ +export type FragmentMatcher = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"GetDirectiveConfig"} } + */ +export type GetDirectiveConfig = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"GetFragmentSpreadConfig"} } + */ +export type GetFragmentSpreadConfig = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"GetNodeConfig"} } + */ +export type GetNodeConfig = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.errors:type {"name":"GraphQLErrors"} } + */ +export type GraphQLErrors = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"IDocumentDefinition"} } + */ +export type IDocumentDefinition = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"InclusionDirectives"} } + */ +export type InclusionDirectives = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.internalTesting:type {"name":"IsStrictlyAny"} } + */ +export type IsStrictlyAny = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"MethodKeys"} } + */ +export type MethodKeys = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.HOC:type } + */ +export type MutateProps = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.renderProp:type } + */ +export type MutationComponentOptions = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"MutationDataOptions"} } + * + * Look into `ApolloClient.MutateOptions` or `useMutation.Options` instead. + */ +export type MutationDataOptions = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"MutationUpdaterFn"} } + */ +export type MutationUpdaterFn = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.errors:type {"name":"NetworkError"} } + */ +export type NetworkError = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.internal:type {"name":"ObservableQueryFields"} } + */ +export type ObservableQueryFields = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.internal:type {"name":"OnlyRequiredProperties"} } + */ +export type OnlyRequiredProperties = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.HOC:type } + */ +export type OperationOption = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.HOC:type } + */ +export type OptionProps = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.internal:type {"name":"PromiseWithState"} } + */ +export type PromiseWithState = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"PureQueryOptions"} } + */ +export type PureQueryOptions = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.renderProp:type } + */ +export type QueryComponentOptions = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.HOC:type } + */ +export type QueryControls = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.implementationDetail:type {"name":"QueryDataOptions","of":"`getMarkupFromTree`"} } + */ +export type QueryDataOptions = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"QueryLazyOptions"} } + */ +export type QueryLazyOptions = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.internal:type {"name":"ReconcilerFunction"} } + */ +export type ReconcilerFunction = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"RefetchQueriesFunction"} } + * + * Look into using `useMutation.Options['refetchQueries']` instead. + */ +export type RefetchQueriesFunction = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"RemoveArgumentsConfig"} } + */ +export type RemoveArgumentsConfig = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"RemoveDirectiveConfig"} } + */ +export type RemoveDirectiveConfig = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"RemoveFragmentDefinitionConfig"} } + */ +export type RemoveFragmentDefinitionConfig = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"RemoveFragmentSpreadConfig"} } + */ +export type RemoveFragmentSpreadConfig = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"RemoveNodeConfig"} } + */ +export type RemoveNodeConfig = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"RemoveVariableDefinitionConfig"} } + */ +export type RemoveVariableDefinitionConfig = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.implementationDetail:type {"name":"Resolver","of":"local state"} } + */ +export type Resolver = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.implementationDetail:type {"name":"Resolvers","of":"local state"} } + */ +export type Resolvers = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.renderProp:type } + */ +export type SubscriptionComponentOptions = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"SubscriptionCurrentObservable"} } + */ +export type SubscriptionCurrentObservable = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.utility:type {"name":"TupleToIntersection"} } + */ +export type TupleToIntersection = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.utility:type {"name":"UnionToIntersection"} } + */ +export type UnionToIntersection = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.removedType:type {"name":"VariableValue"} } + */ +export type VariableValue = never; + +/** + * {@inheritDoc @apollo/client/v4-migration!Removals.HOC:type } + */ +export type WithApolloClient = never;