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/

11 lines (10 loc) 470 B
import { getLiveDirectiveNode } from "./getLiveDirectiveNode.js"; import { getLiveDirectiveArgumentValues } from "./getLiveDirectiveArgumentValues.js"; import { isNone } from "./Maybe.js"; export const isLiveQueryOperationDefinitionNode = (input, variables) => { const liveDirectiveNode = getLiveDirectiveNode(input); if (isNone(liveDirectiveNode)) { return false; } return getLiveDirectiveArgumentValues(liveDirectiveNode, variables).isLive; };