Skip to content

Commit bbcf3fd

Browse files
Jason KrausAlan-Cha
authored andcommitted
check operation responseContentType before trying to check if it includes a content type
Signed-off-by: Jason Kraus <[email protected]>
1 parent 926ce20 commit bbcf3fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/openapi-to-graphql/src/resolver_builder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ export function getResolver<TSource, TContext, TArgs>({
772772
} else {
773773
httpLog(`${response.status} - ${Oas3Tools.trim(body, 100)}`)
774774

775-
if (response.headers.get('content-type')) {
775+
if (response.headers.get('content-type') && operation.responseContentType) {
776776
/**
777777
* Throw warning if the non-application/json content does not
778778
* match the OAS.

0 commit comments

Comments
 (0)