Open f8k8 opened 2 years ago
We have the same issue, and are currently using "@graphql-codegen/typescript": "2.4.11",
as a workaround since that version still works
Hi, same issue here.
(npm init -y && npm i relay-compiler @graphql-tools/relay-operation-optimizer) > /dev/null && readlink node_modules/.bin/relay-compiler
../@ardatan/relay-compiler/bin/relay-compiler
Any ideas @ardatan ?
Another workaround that seem to work:
create a new folder and package.json
// in relay-compiler-patch/package.json
{
"name": "@ardatan/relay-compiler",
"version": "0.0.0"
}
then in your top-level package.json, enable workspaces:
"workspaces": [
"relay-compiler-patch",
],
if you already use workspaces, just drop the package.json inside any of the workspace paths.
I have the same issue. Any update for this ?
Issue workflow progress
Progress of the issue based on the Contributor Workflow
Describe the bug
The forked version of
relay-compiler
overwrites the script installed to.bin
by the regular version ofrelay-compiler
. This can cause builds to use an incorrect version of the relay compiler.To Reproduce Steps to reproduce the behavior:
npm init
.relay-compiler
:npm install --save relay-compiler
.relay-compiler
script in.bin
points to the correct place.@graphql-codegen/typescript
:npm install --save @graphql-codegen/typescript@2.7.3
.relay-compiler
script in.bin
is updated to point to the v12 fork used in@graphql-tools/relay-operation-optimizer
Expected behavior
The forked version of
relay-compiler
(@ardatan/relay-compiler@12.0.0
) should not include thebin
entry in itspackage.json
:and so wouldn't overwrite the relay-compiler script in the .bin folder.
Environment:
@graphql-tools/relay-operation-optimizer@6.5.6
:Additional context
There doesn't seem to be a repo for the forked relay-compiler (
@ardatan/relay-compiler
) that I could see to add this issue to.