From c51114cfbda8f4dd879b9cff3206aa7fb546c2e8 Mon Sep 17 00:00:00 2001 From: Kevin McGill Date: Tue, 21 Mar 2023 08:45:53 -0500 Subject: [PATCH] Allow application/graphql --- src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 90770dc..09f1965 100644 --- a/src/index.ts +++ b/src/index.ts @@ -89,7 +89,9 @@ function parseBody( body: string | null | undefined, contentType: string | undefined, ): object | null { - const isValidContentType = contentType?.startsWith('application/json'); + const isValidContentType = + contentType?.startsWith('application/json') || + contentType?.startsWith('application/graphql'); const isValidPostRequest = method === 'POST' && typeof body === 'string' && isValidContentType;