Skip to content

Quick & dirty Apollo v4 compat - #330

Open
jackstudd wants to merge 5 commits into
apollographql:masterfrom
jackstudd:apollo-v4-compat
Open

jackstudd wants to merge 5 commits into
apollographql:masterfrom
jackstudd:apollo-v4-compat

Conversation

@jackstudd

Copy link
Copy Markdown

Hi! I quickly spent an hour trying to get this lib to work with Apollo v4 since I need it in some projects.

Of the thousands way this could have been done, I chose one of the quickest and far from cleanest.

I'm just putting this here in case anyone needs it! And if that can help to do a clean update of this lib.

The goal here was just to have the lib work with Apollo v4, have the unit tests green, and be able to build.

@fbartho fbartho left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @jackstudd — thanks for the updates!!

I did my first read through, and almost everything seemed reasonable. I don’t have a lot of time to allocate to this project, but if we can address that concern, I can jump through the hoops to get this shipped.

I really appreciate you!

Comment thread src/__tests__/restLink.ts
Comment on lines +4271 to +4272
throw new Error('query should throw a network error');
} catch (error) {}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This combination of lines means that an error is always thrown, and then caught and ignored.

done.fail was setup to tunnel the test failure out — because we were going to expect an error to be thrown.

I think that means this test case is now broken. Any thoughts @jackstudd ?

This was referenced Nov 13, 2025
@fbartho

fbartho commented Nov 13, 2025

Copy link
Copy Markdown
Collaborator

@jackstudd I published your changes and some updates to other deps and tests here: https://github.com/apollographql/apollo-link-rest/releases/tag/v0.10.0-rc.1 (and on NPM).

Let me know if you get a chance to verify it, as I am not actively using apollo-link-rest in my current projects.

If I don't hear from anyone in a month or so, I'll hopefully remember to ship this fully as a normal version!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants