Replies: 6 comments 2 replies
-
@orta That is a great question and concern. We have been talking about this internally and for the meanwhile staying on v12 seems to be sufficient for the current version as afaik v13 does not bring any benefits for the current codegen use-cases. It might be possible to leverage relay-compiler 13 somehow within graphql-codegen, however, we also have concerns that for most use-cases running native binaries only brings overhead and headaches compared to just running Node.js code. However, we are not completely against exploring how we can use binaries in the future for parts of graphql-codegen in order to achieve better performance for larger code-bases. We also thought about creating a completely new operations plugin (codename "operations-2") that uses an intermediate representation (IR) instead of simply a visitor that would allow being more flexible for adding such transforms, it could potentially use the relay-compiler 12 code as the basis. |
Beta Was this translation helpful? Give feedback.
-
Moving this to the Discussions |
Beta Was this translation helpful? Give feedback.
-
Any news on this? It blocks our migration to graphql@16 (via graphql-codegen) 🙂 |
Beta Was this translation helpful? Give feedback.
-
FWIW, "resolutions": {
"@graphql-tools/relay-operation-optimizer": "npm:lodash@*"
} Could be worth checking whether its |
Beta Was this translation helpful? Give feedback.
-
Using
This occurs because, unlike NPM and Yarn, PNPM strictly enforces peer dependency resolution. Luckily I don't use Relay, so a PNPM workaround is to override the module.exports = {
hooks: {
readPackage: (packageJson, context) => {
switch (packageJson.name) {
case 'relay-compiler': {
packageJson.peerDependencies = {
...packageJson.dependencies,
graphql: '^15.0.0 || ^16.0.0',
};
return packageJson;
}
}
return packageJson;
},
},
}; If you do use Relay, chances are the above will severely break the functionality of Please consider upgrading the package to |
Beta Was this translation helpful? Give feedback.
-
After this release, peer dependency issue will no longer exist; |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
Hi folks, Relay started shipping version 13 which includes their rust compiler, making relay-compiler look like this:
Cool for the Relay folks, but less cool for this package as it relies on the relay compiler JS and will now bail when you have that dependency set up in the app.
To Reproduce
Steps to reproduce the behavior:
Options
graphql-codegen
?Beta Was this translation helpful? Give feedback.
All reactions