apollo-link-rest icon indicating copy to clipboard operation
apollo-link-rest copied to clipboard

`graphql-anywhere` is unmaintained; how does this impact `apollo-link-rest`?

Open rgrove opened this issue 3 years ago • 8 comments

The functionality of apollo-link-rest seems heavily dependent on graphql-anywhere. That package was removed from @apollo/client in 3.0.0 and appears to no longer be maintained, except for a couple of bug fix releases that were made from the Apollo Client 2.x branch two years ago.

I'm not aware of any current problems related to graphql-anywhere, but it does seem like this could impact future development of apollo-link-rest. For example, graphql-anywhere 4.2.7 has a peer dependency on graphql ^0.11.0 — ^15.0.0, so it's not clear if it's safe to use it with graphql ^16.0.0.

Is this on anyone's radar?

rgrove avatar Feb 15 '22 19:02 rgrove

@rgrove it wasn't on my radar. That's been a dep the whole time I've been involved (since before this library was published to NPM).

I'd support PRs that move us off of graphql-anywhere.

Do you know if the functionality of graphql-anywhere was folded in to @apollo/client or a different library? https://github.com/apollographql/apollo-client/pull/5159/#issuecomment-1040731080

fbartho avatar Feb 15 '22 19:02 fbartho

Do you know if the functionality of graphql-anywhere was folded in to @apollo/client or a different library?

I'm afraid I don't know.

I only noticed this myself today when I tried to upgrade graphql to 16.x and saw the peer dependency warning from graphql-anywhere. This led to a bunch of searching, but all I was able to turn up was the removal PR linked above and the maintenance releases that were made from the 2.x branch a couple years ago.

rgrove avatar Feb 15 '22 20:02 rgrove

Probably it would make the most sense to put:

graphql-anywhere as a top-level repo to apollographql organization with maybe maintainers of apollo-link-rest?

It seems as useful as graphql-tag to me.

LionsAd avatar Mar 04 '22 13:03 LionsAd

Is there any progress on this? I have other packages that are now forcing me into installing [email protected]. I don't know what the implications of that are on apollo-link-rest. It seems to continue to work, but I have to force the installation,.

npm WARN node_modules/graphql
npm WARN   peer graphql@"^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" from [email protected]
npm WARN   node_modules/graphql-anywhere
npm WARN     graphql-anywhere@"^4.2.7" from the root project
npm WARN     1 more (apollo-link-rest)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]

lnmp4000 avatar Jul 07 '22 09:07 lnmp4000

Unfortunately we don’t have an obvious path forwards.

I’d be happy to review PRs that move us onto fully supported dependency, but I can’t commit Apollo to forking or maintaining other libraries/repos!

fbartho avatar Jul 07 '22 10:07 fbartho

Is there any progress on this? I have other packages that are now forcing me into installing [email protected]. I don't know what the implications of that are on apollo-link-rest. It seems to continue to work, but I have to force the installation,.

+1 Same problem here.

TravisDart avatar Jul 26 '22 01:07 TravisDart

@fbartho from my understanding of the situation, the maintainers of apollographql/apollo-client decided to remove the graphql-anywhere code from their repo while leaving the package published to NPM. So if you wanted to make a new repo apollographql/graphql-anywhere that wouldn't be a fork per se, but just restoring some code that was written by Apollo and was previously deleted.

dennisjlee avatar Aug 09 '22 21:08 dennisjlee

@rgrove Thanks for asking this question, I'm going to look into this and discuss with the team what we should do here.

jpvajda avatar Sep 29 '22 23:09 jpvajda

Linking to my comment from https://github.com/apollographql/apollo-link-rest/pull/300#issuecomment-1286301244

The tl;dr is:

I opened https://github.com/apollographql/apollo-link-rest/pull/301 which moves the relevant function/types inside of apollo-link-rest - I'll leave it up to the maintainers to decide what the best path forward is there 🙏

alessbell avatar Oct 21 '22 00:10 alessbell

Looks like the fix was incomplete, since [email protected] still depends on [email protected] with an incompatible peer dep range to graphql@16.

npm WARN Could not resolve dependency:
npm WARN peer graphql@"^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" from [email protected]
npm WARN node_modules/graphql-anywhere/node_modules/apollo-utilities
npm WARN   apollo-utilities@"^1.3.4" from [email protected]
npm WARN   node_modules/graphql-anywhere

chrmoritz avatar Oct 22 '22 15:10 chrmoritz

Oof, thanks for flagging @chrmoritz. Will look at getting that fixed but this week is particularly busy.

In the mean time I will note that https://github.com/apollographql/apollo-link-rest/pull/301 does not have this issue and also decreases bundle size :)

alessbell avatar Oct 24 '22 14:10 alessbell

Yeah, I totally agree that #301 is the best way forward. It uses the imports from @apollo/client/utilities instead of the deprecated apollo-utilities package too.

chrmoritz avatar Oct 24 '22 15:10 chrmoritz

Resolved in #301! 🎉 -- will close this ticket when I release 0.9.0.

fbartho avatar Oct 26 '22 16:10 fbartho

Thank you @alessbell!

@fbartho do you have any ETA for the v0.9.0 release? It seems that all the PRs are merged in the milestone.

rodrigo-arias avatar Oct 26 '22 16:10 rodrigo-arias

@rodrigo-arias v0.9.0-rc.2 has been published to NPM, please try it out, and if we get no complaints, I'm happy to ship it to stable this weekend!

https://www.npmjs.com/package/apollo-link-rest/v/0.9.0-rc.2

fbartho avatar Oct 26 '22 18:10 fbartho

It looks like v0.9.0-rc.2 has ~1500 downloads and no new/related issues have been opened, so seems we're clear to move to stable unless there's anything else that's come up 👍

alessbell avatar Nov 07 '22 15:11 alessbell

Shipped a new release v0.9.0! -- Enjoy! https://www.npmjs.com/package/apollo-link-rest/v/0.9.0

fbartho avatar Nov 15 '22 02:11 fbartho