Skip to content

Commit 0311433

Browse files
feat: Add request param to didEncounter method (#3194)
This PR enhances didEncounterError method in RemoteGraphQLDataSource class. Co-authored-by: Chris Lenfest <[email protected]>
1 parent febbecd commit 0311433

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/warm-moles-jog.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@apollo/gateway": minor
3+
---
4+
5+
Add request parameter to didEncounterError method

gateway-js/src/datasources/RemoteGraphQLDataSource.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export class RemoteGraphQLDataSource<
220220
http: fetchResponse,
221221
};
222222
} catch (error) {
223-
this.didEncounterError(error, fetchRequest, fetchResponse, context);
223+
this.didEncounterError(error, fetchRequest, fetchResponse, context, request);
224224
throw error;
225225
}
226226
}
@@ -284,6 +284,7 @@ export class RemoteGraphQLDataSource<
284284
_fetchRequest: NodeFetchRequest,
285285
_fetchResponse?: FetcherResponse,
286286
_context?: TContext,
287+
_request?: GatewayGraphQLRequest,
287288
) {
288289
throw error;
289290
}

0 commit comments

Comments
 (0)