UNPKG

@aikidosec/firewall

Version:

Zen by Aikido is an embedded Application Firewall that autonomously protects Node.js apps against common and critical attacks, provides rate limiting, detects malicious traffic (including bots), and more.

17 lines (16 loc) 480 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.extractInputsFromDocument = extractInputsFromDocument; /** * This function extracts user inputs (that could be harmful) from a GraphQL document. * @returns An array of user inputs. */ function extractInputsFromDocument(document, visitFn) { const inputs = []; visitFn(document, { StringValue(node) { inputs.push(node.value); }, }); return inputs; }