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.

Exclude imports from graphql-codegen-typescript-react-apollo-template

See original GitHub issue

Is your feature request related to a problem? Please describe. tslint complains about unused imports:

'ReactApollo' is declared but its value is never read.
'React' is declared but its value is never read.
'gql' is declared but its value is never read.

Describe the solution you’d like Have a way through config to exclude these imports.

Describe alternatives you’ve considered using sed or something similar to hack the template’s output

Additional context code in question:

import * as ReactApollo from 'react-apollo';
import * as React from 'react';

import gql from 'graphql-tag';

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
kamilkisielacommented, Oct 27, 2018

I fixed that, will push it in few minutes.

0reactions
dotansimhacommented, Oct 31, 2018

@moonray available in 0.13.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apollo Codegen In React - Generate Typescript ... - YouTube
Graphql codegen / Apollo codegen is a great feature!When working with GraphQL and Typescript in React, we want to be able to have...
Read more >
typescript-react-apollo - GraphQL Code Generator
This plugin generates React Apollo components and HOC with TypeScript typings. It extends the basic TypeScript plugins: @graphql-codegen/ ...
Read more >
Fragments - Apollo GraphQL Docs
We first import CORE_COMMENT_FIELDS because it's declared in another file. We add our fragment definition to the GET_POST_DETAILS gql template literal via a ......
Read more >
How to configure GraphQL-Codegen and React Apollo Client ...
This is because without creating a Fragment, Codegen will not generate & export an easy-to-use TypeScript Type, and instead just use an ugly ......
Read more >
Generating TypeScript Types from GraphQL Schema in Apollo
We have imported some types that were generated when running the codegen command shown above. import React from "react";. import ...
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