@n1ru4l/graphql-live-query
Version:
[](https://www.npmjs.com/package/@n1ru4l/graphql-live-query) [](https://www.npmjs.com/package/@n1ru4l/
15 lines (14 loc) • 780 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getLiveDirectiveArgumentValues = void 0;
const graphql_1 = require("graphql");
const GraphQLLiveDirective_js_1 = require("./GraphQLLiveDirective.js");
const getLiveDirectiveArgumentValues = (node, variableValues) => {
var _a;
const values = (0, graphql_1.getDirectiveValues)(GraphQLLiveDirective_js_1.GraphQLLiveDirective, { directives: [node] }, variableValues);
return {
isLive: (values === null || values === void 0 ? void 0 : values["if"]) === true,
throttleValue: ((_a = values === null || values === void 0 ? void 0 : values["throttle"]) !== null && _a !== void 0 ? _a : null),
};
};
exports.getLiveDirectiveArgumentValues = getLiveDirectiveArgumentValues;