diff --git a/response.ts b/response.ts index 2164aac..fa5bb0f 100644 --- a/response.ts +++ b/response.ts @@ -157,6 +157,9 @@ export async function createResponse( return new Response(JSON.stringify(result), { status: Status.BadRequest, + headers: { + "content-type": withCharset(accept), + }, }); } diff --git a/response_test.ts b/response_test.ts index 467d927..7d9465f 100644 --- a/response_test.ts +++ b/response_test.ts @@ -327,7 +327,7 @@ describe("createResponse", () => { { status: Status.BadRequest, headers: { - "content-type": "text/plain;charset=UTF-8", + "content-type": "application/graphql-response+json;charset=UTF-8", }, }, ),