d4rekanguok/gatsby-typescript

[gatsby-plugin-graphql-codegen] gatsby 3.0.0 compatibility

Closed this issue ยท 12 comments

Describe the bug
gatsby-plugin-graphql-codegen plugin doesn't work after gatsby update to 3.0.0

To Reproduce
Installed packages
"gatsby": "^3.0.0",
"gatsby-plugin-graphql-codegen": "^2.7.1",
"gatsby-plugin-typescript": "^3.0.0",
"graphql": "^15.5.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"typescript": "^4.2.2"

Environment (please complete the relevant info):

  • OS (Mac, Linux, Window, etc.) --> Windows10 64bit
  • Gatsby version --> 3.0.0
  • Typescript version --> 4.2.2

Voting up for this one! Also can't spin up setup with gatsby-typescript using Gatsby 3+

Hey there,

Same issue on my end.

Also got hot reloading blocked.

Thanks.

Bump, blocked also. Any updates on this? Appreciate you guys

I've not actually had problems yet using this plugin with Gatsby 3.3.1 apart from a warning message saying Plugin gatsby-plugin-graphql-codegen is not compatible with your gatsby version 3.3.1 - It requires gatsby@^2.12.1 which is down to the declared peer dependency.

What were the other issues?

It's pretty slow and seems to rebuild the typings multiple times on startup and every change.

alvis commented

@stschwark if you use npm v7+ then you can't even be able to install it due to peer dependency conflict. Unless you use the --force flag, you've no luck other than using other similar plugins like gatsby-plugin-typegen.

One of us could easily make a PR to udpate the peer dependency if that's the only issue here. Would the maintainers be willing to merge it though?

Hi everyone, my apologies for leaving this repo in the dust โ€” happy to merge any working PRs. If you'd like to take ownership / become maintainers of this repo, please get in touch.

alvis commented

@d4rekanguok Thanks for your kind invite. I'm interested to be a maintainer of gatsby-plugin-graphql-codegen. Unlikely I can make any substantial contribution due to my limited time as well, but at least I can help to make the package compatible with other packages.
Will make a PR to update the dependency soon.

alvis commented

@d4rekanguok PRs have been made for v2 #129 and v3 #130.
You can trigger the test and review.

Thanks so much @alvis โ€” you're a legend for stepping up & taking this issue. I have published new versions for v2 (2.7.3) and v3 (3.0.0) as suggested.

alvis commented

You're welcome @d4rekanguok. I'm just solving my pain as a ts enthusiast.
I'm tried both v2 & v3 on my personal projects and they're all so far so good. ๐Ÿ˜€