When upgrading from apollo-angular 1.10 to 2.6, the following typescript errors are being generated during the build:
Error: node_modules/apollo-angular/apollo.d.ts:14:40 - error TS2707: Generic type 'QueryOptions<TVariables>' requires between 0 and 1 type arguments.
14 query<T, V = EmptyObject>(options: QueryOptions<V, T>): Observable<ApolloQueryResult<T>>;
~~~~~~~~~~~~~~~~~~
Error: node_modules/apollo-angular/apollo.d.ts:16:44 - error TS2707: Generic type 'SubscriptionOptions<TVariables>' requires between 0 and 1 type arguments.
16 subscribe<T, V = EmptyObject>(options: SubscriptionOptions<V, T>, extra?: ExtraSubscriptionOptions): Observable<FetchResult<T>>;
~~~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/apollo-angular/types.d.ts:13:111 - error TS2344: Type '"query" | "variables"' does not satisfy the constraint '"useInitialLoading"'.
Type '"query"' is not assignable to type '"useInitialLoading"'.
13 export interface WatchQueryOptionsAlone<TVariables, TData> extends Omit<WatchQueryOptions<TVariables, TData>, 'query' | 'variables'> {
~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/apollo-angular/types.d.ts:15:68 - error0m TS2707: Generic type 'QueryOptions<TVariables>' requires between 0 and 1 type arguments.
15 export interface QueryOptionsAlone<TVariables, TData> extends Omit<CoreQueryOptions<TVariables, TData>, 'query' | 'variables'> {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/apollo-angular/types.d.ts:19:75 - error TS2707: Generic type 'SubscriptionOptions<TVariables>' requires between 0 and 1 type arguments.
19 export interface SubscriptionOptionsAlone<TVariables, TData> extends Omit<CoreSubscriptionOptions<TVariables, TData>, 'query' | 'variables'> {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/apollo-angular/types.d.ts:21:63 - error TS2707: Generic type 'WatchQueryOptions<TVariables>' requires between 0 and 1 type arguments.
21 export interface WatchQueryOptions<TVariables, TData> extends CoreWatchQueryOptions<TVariables, TData> {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is happening with ng upgrade, ng add, yarn update, and yarn add
To Reproduce
Steps to reproduce the behavior:
Starting with an angular 11 application using apollo-angular 1.10, attempt to upgrade to apollo-angular 2.6. Start the application using ng serve
Describe the bug
When upgrading from apollo-angular 1.10 to 2.6, the following typescript errors are being generated during the build:
This is happening with
ng upgrade
,ng add
,yarn update
, andyarn add
To Reproduce Steps to reproduce the behavior: Starting with an angular 11 application using apollo-angular 1.10, attempt to upgrade to apollo-angular 2.6. Start the application using
ng serve
Expected behavior
The application should start after the upgrade.
Environment:
Additional context