graphql-code-generator-community icon indicating copy to clipboard operation
graphql-code-generator-community copied to clipboard

Change apollo-angular imports to named non-namespace imports

Open gsingh-ut opened this issue 3 years ago • 1 comments

Creating a copy of the issue created by @DaSchTour https://github.com/dotansimha/graphql-code-generator-community/issues/223 on the older repo.

Is your feature request related to a problem? Please describe. Because of this https://github.com/thymikee/jest-preset-angular/issues/963 bug, it is not possible to write tests with generated services.

Describe the solution you'd like Imports for angular-apollo should be changed from import * as Apollo from 'apollo-angular'; to import {Apollo, ...} from 'apollo-angular'

Describe alternatives you've considered

Hacky solutions described in the jest-preset-angular issue like including the generated ts files in tsconfig.spec.json which might have other unknown effects like including too many files which are not required

gsingh-ut avatar Dec 05 '22 16:12 gsingh-ut