dotansimha / graphql-code-generator

A tool for generating code based on a GraphQL schema and GraphQL operations (query/mutation/subscription), with flexible support for custom plugins.
https://the-guild.dev/graphql/codegen/
MIT License
10.79k stars 1.32k forks source link

@graphql-codegen/client-preset-swc-plugin not working with nextjs ^14 #9753

Open Daniel3711997 opened 10 months ago

Daniel3711997 commented 10 months ago

Which packages are impacted by your issue?

No response

Describe the bug

@graphql-codegen/client-preset-swc-plugin not working with nextjs ^14

Your Example Website or App

private

Steps to Reproduce the Bug or Issue

install @graphql-codegen/client-preset-swc-plugin on nextjs 14

Expected behavior

to work

Screenshots or Videos

No response

Platform

Codegen Config File

No response

Additional context

No response

YassinEldeeb commented 10 months ago

Hey, thanks for reporting! We are currently tracking the issue with SWC maintainers to figure out a solution.

Please add a 👍 to the issue and feel free to join the conversation. https://github.com/swc-project/swc/issues/8315

I'll keep you updated!

lionskape commented 4 months ago

@YassinEldeeb hello. Is there any updates on track? Looks like it will not be solved on swc side in the nearest future. As far as I understand proper way for a plugin developer now is - create a new release for each breaking change in plugins contracts ( https://swc.rs/docs/plugin/selecting-swc-core ).

NextJS is very popular tool. No support for swc plugin makes client preset very bad solution for NextJS users :(

pepew-le-boss commented 2 months ago

Is there an alternative to @graphql-codegen/client-preset-swc-plugin (not a library) but something we can do while waiting for a fix ? Because my bundle size is huge mainly because of codegen