UNPKG

graphql-yoga

Version:

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

11 lines (10 loc) 394 B
import { handleURLSearchParams } from './utils.js'; import { URLSearchParams } from '@whatwg-node/fetch'; export function isGETRequest(request) { return request.method === 'GET'; } export function parseGETRequest(request) { const [, queryString = ''] = request.url.split('?'); const searchParams = new URLSearchParams(queryString); return handleURLSearchParams(searchParams); }