UNPKG

graphql-yoga

Version:

<div align="center"><img src="./website/public/cover.png" width="720" /></div>

12 lines (11 loc) 366 B
import { isContentTypeMatch } from './utils.js'; export function isPOSTGraphQLStringRequest(request) { return (request.method === 'POST' && isContentTypeMatch(request, 'application/graphql')); } export async function parsePOSTGraphQLStringRequest(request) { const requestBody = await request.text(); return { query: requestBody, }; }