-
Notifications
You must be signed in to change notification settings - Fork 254
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
Conversation
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?
f8c35f6
to
97b7bda
Compare
There was a problem hiding this 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.
gateway-js/src/datasources/__tests__/RemoteGraphQLDataSource.test.ts
Outdated
Show resolved
Hide resolved
Also, would like to land this on |
Agree created #1379 for the backport |
* RemoteGraphQLDataSource uses `make-fetch-happen` by default
* 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
As the subject says. Couple of things that I'm not sure about.
When I make a call to
.defaults()
do I need to pass any extra parameters? Didn't look like thenode-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 innode-fetch
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