Closed dlq84 closed 1 month ago
Describe the bug
Hi, there is a strange type regression since after version 2.6.0 in mutation.d.ts, it generates types that uses the dynamic import statement, while on version 2.6.0 the type was statically imported. See line 6, the return type of mutation()
mutation()
export declare class Mutation<T = {}, V = EmptyObject> { protected apollo: Apollo; readonly document: DocumentNode | TypedDocumentNode<T, V>; client: string; constructor(apollo: Apollo); mutate(variables?: V, options?: MutationOptionsAlone<T, V>): import("rxjs").Observable<import("./types").MutationResult<T>>; static ɵfac: i0.ɵɵFactoryDeclaration<Mutation<any, any>, never>; static ɵprov: i0.ɵɵInjectableDeclaration<Mutation<any, any>>; }
To Reproduce
packages/apollo-angular/build/mutation.d.ts
Expected behavior
mutation() is expected to have the return type of Observable<MutationResult<T>>
Observable<MutationResult<T>>
Environment:
- @angular/cli@^13.2.2 - @angular/core@^13.2.2 - @apollo/client@3.5.9 - apollo-angular@commit:6728bbb7a527d230d45e08878834bf538cdf93db - graphql@16.3.0 - typescript@4.4.4
query.d.ts behaves correctly.
Has been solved in the meantime
Describe the bug
Hi, there is a strange type regression since after version 2.6.0 in mutation.d.ts, it generates types that uses the dynamic import statement, while on version 2.6.0 the type was statically imported. See line 6, the return type of
mutation()
To Reproduce
packages/apollo-angular/build/mutation.d.ts
Expected behavior
mutation()
is expected to have the return type ofObservable<MutationResult<T>>
Environment:
query.d.ts behaves correctly.