Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RemoteGraphQLDataSource uses make-fetch-happen by default #1284

Merged
merged 4 commits into from
Dec 15, 2021

Conversation

clenfest
Copy link
Contributor

@clenfest clenfest commented Dec 9, 2021

As the subject says. Couple of things that I'm not sure about.

  1. When I make a call to .defaults() do I need to pass any extra parameters? Didn't look like the node-fetch version did, but I want to make sure we don't want to add any extra headers or anything. For reasons stated in Apollo Gateway: Add make-fetch-happen fetcher as the default fetcher for the downstream services #192, I'm being careful and turning off retries completely, but I believe this was also the case in node-fetch

  2. Obviously this needs to get into the CHANGELOG, but I'm assuming we do that when we cut a new version?

Fixes #192
Fixes #1232

As the subject says. Couple of things that I'm not sure about.

1. When I make a call to `.defaults()` do I need to pass any extra parameters? Didn't look like the `node-fetch` version did, but I want to make sure we don't want to add any extra headers or anything. For reasons stated in #192, I'm being careful and turning off retries completely, but I believe this was also the case in `node-fetch`

2. Obviously this needs to get into the CHANGELOG, but I'm assuming we do that when we cut a new version?
Copy link
Member

@trevor-scheer trevor-scheer left a comment

Choose a reason for hiding this comment

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

This LGTM. It should get a CHANGELOG entry with this PR (ping if you'd like any guidance there).

As a side note, I'd like to see us move away from mocking the fetcher objects and just using nock instead. Mocking the module (as is the status quo in this case) adds a layer of convention / magic which isn't well-documented and isn't really the convention for mocking network requests within this repo (typically we use nock). I'll open a separate issue for this.

@trevor-scheer
Copy link
Member

Also, would like to land this on version-0.x as well!

@clenfest clenfest merged commit 9c7b00e into main Dec 15, 2021
@clenfest clenfest deleted the clenfest/issue180 branch December 15, 2021 18:10
@abernix abernix added the ↪️ backport-to-0.x landed on 2.x, but needs to be backported to the 0.x series label Jan 5, 2022
@prasek
Copy link
Contributor

prasek commented Jan 13, 2022

Agree created #1379 for the backport

clenfest added a commit that referenced this pull request Jan 13, 2022
* RemoteGraphQLDataSource uses `make-fetch-happen` by default
clenfest added a commit that referenced this pull request Jan 13, 2022
* RemoteGraphQLDataSource uses `make-fetch-happen` by default (#1284)

* RemoteGraphQLDataSource uses `make-fetch-happen` by default

* fix location of merge comment

* update CHANGELOG with backport PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
↪️ backport-to-0.x landed on 2.x, but needs to be backported to the 0.x series component/gateway runtime
Projects
None yet
4 participants