Exclude imports from graphql-codegen-typescript-react-apollo-template
See original GitHub issueIs 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:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I fixed that, will push it in few minutes.
@moonray available in 0.13.0.