question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Change apollo-angular imports to named non-namespace imports

See original GitHub issue

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, that might have other unknown effects.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:2
  • Comments:8

github_iconTop GitHub Comments

2reactions
gsingh-UTcommented, Dec 5, 2022

Nop I did not have time to do it. If so, I will posted it here

Thanks for the update. In that case, I will create one and link it here 😄

1reaction
acuevas91commented, Dec 5, 2022

Nop I did not have time to do it. If so, I will posted it here

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to use services exported under a namespace w/ Jest ...
import { Injectable } from '@angular/core'; @Injectable({ providedIn: 'root' }) export ... Change apollo-angular imports to named non-namespace imports ...
Read more >
Migrating to Apollo Client 3.0 - Apollo GraphQL Docs
This article walks you through migrating your application to Apollo Client 3.0 ... To simplify the process of converting your import declarations from...
Read more >
jest-namespace-imports-transformer - npm
This package contains a jest transformer that transforms *.ts and *.js files by replacing es6 namespace imports with named imports .
Read more >
Using eslint with typescript - Unable to resolve path to module
You can set the ESLint module import resolution by adding this snippet to your .eslintrc.json configuration file:
Read more >
isolatedModules - TSConfig Option - TypeScript
Exports of Non-Value Identifiers. In TypeScript, you can import a type and then subsequently export it: ts. import { someType , someFunction }...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found