UNPKG

@n1ru4l/graphql-live-query

Version:

[![npm version](https://img.shields.io/npm/v/@n1ru4l/graphql-live-query.svg)](https://www.npmjs.com/package/@n1ru4l/graphql-live-query) [![npm downloads](https://img.shields.io/npm/dm/@n1ru4l/graphql-live-query.svg)](https://www.npmjs.com/package/@n1ru4l/

15 lines (14 loc) 780 B
"use strict"; 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;