Open alexeyr-ci opened 9 months ago
A workaround which works but I'd prefer to avoid:
import type { ReactApolloVisitor } from '@graphql-codegen/typescript-react-apollo';
type ReactApolloRawPluginConfig = ReactApolloVisitor['rawConfig'];
(it can be similarly obtained from plugin
).
Perhaps related: https://github.com/adaltas/node-csv/issues/354.
Which packages are impacted by your issue?
@graphql-codegen/typescript-react-apollo
Describe the bug
compiles under
"moduleResolution": "node"
, but fails undernode16
(ornodenext
).Should it be imported in a different way? Removing
typings
fails as well. I could just not import the type, but would prefer to have the type safety (e.g. it alerted me earlier thattypescript-react-apollo
doesn't yet support separate input and output types for scalars).Your Example Website or App
https://github.com/alexeyr-ci/graphql-code-generator-issue-sandbox/tree/typescript-react-apollo-config-import
Steps to Reproduce the Bug or Issue
Run
tsc --noEmit
.Expected behavior
As a user, I expected the codegen config to compile successfully, but it fails with
Screenshots or Videos
No response
Platform
graphql
version: 16.6.0@graphql-codegen/*
version(s): "@graphql-codegen/cli": 4.0.1, "@graphql-codegen/typescript": 4.0.1, "@graphql-codegen/typescript-operations": 4.0.1, "@graphql-codegen/typescript-react-apollo": 4.1.0,Codegen Config File
Additional context
No response