-
Notifications
You must be signed in to change notification settings - Fork 26.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
with-typescript-graphql example does not build #32605
Comments
Is the solution here just to change the import to the generated types directory along with version upgrade? |
@hbswift Change the import to the generated types is a workaround, I believe there should be ways of importing from .graphqls files directly |
@X-Y Hey there! Could you clarify what you mean by "So typescript version needs to be bumped." on the "expected behavior" section, please? I didn't get it. I'd be glad to work on this issue after having this clear to me 🙌 |
Hello @GuilhermedeAndrade, on that one basically just change typescript version to the latest stable version. |
Got it, thanks 👍 |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What version of Next.js are you using?
12.0.7
What version of Node.js are you using?
16.3.1, 14.17.6, 12.22.6
What browser are you using?
N/A
What operating system are you using?
macOS Big Sur 11.4
How are you deploying your application?
next build
Describe the Bug
The example with-typescript-graphql does not build. Following error shows up:
When replacing
import { QueryResolvers, MutationResolvers } from './type-defs.graphqls'
withimport { QueryResolvers, MutationResolvers } from '../__generated__/__types__'
, another error shows upBy upgrading Typescript to
"typescript": "^4.5.4",
, the build process became successful.yarn dev
works out of the box with no problemExpected Behavior
The build process should work out of the box.
So typescript version needs to be bumped.
It is unclear how
import { QueryResolvers, MutationResolvers } from './type-defs.graphqls'
should be fixed. Same error shows up in my IDE(webstorm).To Reproduce
The text was updated successfully, but these errors were encountered: