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) 779 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isLiveQueryOperationDefinitionNode = void 0; const getLiveDirectiveNode_js_1 = require("./getLiveDirectiveNode.js"); const getLiveDirectiveArgumentValues_js_1 = require("./getLiveDirectiveArgumentValues.js"); const Maybe_js_1 = require("./Maybe.js"); const isLiveQueryOperationDefinitionNode = (input, variables) => { const liveDirectiveNode = (0, getLiveDirectiveNode_js_1.getLiveDirectiveNode)(input); if ((0, Maybe_js_1.isNone)(liveDirectiveNode)) { return false; } return (0, getLiveDirectiveArgumentValues_js_1.getLiveDirectiveArgumentValues)(liveDirectiveNode, variables).isLive; }; exports.isLiveQueryOperationDefinitionNode = isLiveQueryOperationDefinitionNode;