Describe the bug
Generated template imports GraphQLScalarTypeConfig causing:
TS6133: 'GraphQLScalarTypeConfig' is declared but its value is never read.
To Reproduce
Schema
type Query {
me: User
}
type User {
id: ID!
firstName: String!
fullName: String!
lastName: String!
}
Documents
query Me {
me {
id
fullName
}
}
plugins
plugins:
- add
- typescript-common
- typescript-client
- typescript-server
- typescript-resolvers
- typescript-react-apollo
tsconfig.json
{
"compilerOptions": {
"noUnusedLocals": true
...
@ardatan I think it's related to the recent changes in the resolvers package. What do you think?
It is related to change for adding scalar resolvers. So, we need to import this type if only there is any scalar in the schema. I鈥檒l take care of it.
I guess it would be nice to have a shared logic for that. You request an import and after everything compiles we prepend it with import statements. Otherwise we would have to copy&paste the same logic over and over again.
@ardatan @dotansimha
Most helpful comment
I guess it would be nice to have a shared logic for that. You request an import and after everything compiles we prepend it with import statements. Otherwise we would have to copy&paste the same logic over and over again.
@ardatan @dotansimha