apollographql / apollo-tooling

✏️ Apollo CLI for client tooling (Mostly replaced by Rover)
https://apollographql.com
MIT License
3.04k stars 467 forks source link

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

Open jas7457 opened 1 year ago

jas7457 commented 1 year ago

@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.

vladninja commented 1 year ago

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

sp90 commented 1 year ago

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

And #2666 is closed

abisewski commented 1 year ago

@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.

jas7457 commented 1 year ago

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

ts-candide commented 9 months ago

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.

shtefanilie commented 6 months ago

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"
}