graphql-yoga
Version:
<div align="center"><img src="./website/public/cover.png" width="720" /></div>
16 lines (15 loc) • 601 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseGETRequest = exports.isGETRequest = void 0;
const utils_js_1 = require("./utils.js");
const fetch_1 = require("@whatwg-node/fetch");
function isGETRequest(request) {
return request.method === 'GET';
}
exports.isGETRequest = isGETRequest;
function parseGETRequest(request) {
const [, queryString = ''] = request.url.split('?');
const searchParams = new fetch_1.URLSearchParams(queryString);
return (0, utils_js_1.handleURLSearchParams)(searchParams);
}
exports.parseGETRequest = parseGETRequest;
;