apollo-tooling icon indicating copy to clipboard operation
apollo-tooling copied to clipboard

[apollo-language-server] - unpin @apollo/federation

Open jas7457 opened this issue 2 years ago • 6 comments

@apollo/federation is explicitly pinned to version 0.27.0. Unfortunately, this version prohibits node versions > 17. This makes it so that our project is stuck using node 16, two major versions behind LTS. It seems that newer versions of @apollo/federation would allow for the newer versions of node.

I don't know enough about any breaking changes between @apollo/federation versions, so this may be unsafe since it is in the 0.x.x semver range, but I'd like to relax this hard-requirement a bit if possible.

jas7457 avatar Dec 13 '22 13:12 jas7457

See: https://github.com/apollographql/apollo-tooling/issues/2666

vladninja avatar Dec 27 '22 11:12 vladninja

@vladninja im running version 19 and having the whole thing run smoothly

And #2666 is closed

sp90 avatar Jan 24 '23 14:01 sp90

@jas7457 Have you found a workaround for this issue? Vercel will update soon, and all projects with a node version lower than 18 will fail to build.

abisewski avatar Jun 02 '23 17:06 abisewski

I have not found a workaround yet. Perhaps using resolutions can help, but that's a pretty ugly solution

jas7457 avatar Jun 02 '23 19:06 jas7457

As of v0.38, @apollo/federation now explicitly supports node 18. We can use the overrides field in package.json to specify that this version is used:

"overrides": {
  "@apollo/federation": "0.38.1"
}

Admittedly, I have only tried a subset of the client CLI actions, and so I'm unsure if v0.38 is fully compatible with this package. For our use case, though, this works and allows us to use apollo with node 18.

ts-candide avatar Sep 21 '23 08:09 ts-candide

For any one still facing this, the quickest way to fix it is to add the latest version to resolutions And if you are inside a monorepo, just add it to the root package.json file

"resolutions": {
    "@apollo/federation": "0.38.1"
}

shtefanilie avatar Dec 27 '23 14:12 shtefanilie