@graphql-tools/utils
Version:
Common package containing utils and types for GraphQL tools
17 lines (16 loc) • 632 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getArgumentValues = void 0;
const graphql_1 = require("graphql");
/**
* Prepares an object map of argument values given a list of argument
* definitions and list of argument AST nodes.
*
* Note: The returned value is a plain Object with a prototype, since it is
* exposed to user code. Care should be taken to not pull values from the
* Object prototype.
*/
function getArgumentValues(def, node, variableValues = {}) {
return (0, graphql_1.getArgumentValues)(def, node, variableValues);
}
exports.getArgumentValues = getArgumentValues;