Skip to content

Commit eb6676b

Browse files
committed
fix(gateway): Address typings issue for getDefaultFetcher (#585)
1 parent 22e6e77 commit eb6676b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

gateway-js/CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
> The changes noted within this `vNEXT` section have not been released yet. New PRs and commits which introduce changes should include an entry in this `vNEXT` section as part of their development. When a release is being prepared, a new header will be (manually) created below and the appropriate changes within that release will be moved into the new section.
66
7-
- Enable gateway to fetch CSDL / cloud config in managed mode. This feature is currently opt-in only and should have no effect for existing use cases. After some testing, this behavior will become the default (and should be nearly transparent / non-breaking for users when we do so). It's unintended for users to start using this feature for now unless instructed by Apollo to do so. [PR #458](https://github.com/apollographql/federation/pull/458)
7+
- Enable gateway to fetch CSDL / cloud config in managed mode. This feature is currently opt-in only and should have no effect for existing use cases. After some testing, this behavior will become the default (and should be nearly transparent / non-breaking for users when we do so). It's unintended for users to start using this feature for now unless instructed by Apollo to do so. [PR #458](https://github.com/apollographql/federation/pull/458)
8+
- __FIX__: followup to #458. Fix typings of `getDefaultFetcher` - `make-fetch-happen` types were not being included in the gateway's compiled `index.d.ts` file. [PR #585](https://github.com/apollographql/federation/pull/585)
89

910
## v0.24.4
1011

gateway-js/src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import { getServiceDefinitionsFromRemoteEndpoint } from './loadServicesFromRemot
4040
import { GraphQLDataSource } from './datasources/types';
4141
import { RemoteGraphQLDataSource } from './datasources/RemoteGraphQLDataSource';
4242
import { getVariableValues } from 'graphql/execution/values';
43-
import fetcher, { Fetcher } from 'make-fetch-happen';
43+
import fetcher from 'make-fetch-happen';
4444
import { HttpRequestCache } from './cache';
4545
import { fetch } from 'apollo-server-env';
4646
import { getQueryPlanner, QueryPlannerPointer, QueryPlan, prettyFormatQueryPlan } from '@apollo/query-planner';
@@ -96,7 +96,7 @@ type WarnedStates = {
9696
remoteWithLocalConfig?: boolean;
9797
};
9898

99-
export function getDefaultFetcher(): Fetcher {
99+
export function getDefaultFetcher() {
100100
const { name, version } = require('../package.json');
101101
return fetcher.defaults({
102102
cacheManager: new HttpRequestCache(),

0 commit comments

Comments
 (0)