@n1ru4l/graphql-live-query
Version:
[](https://www.npmjs.com/package/@n1ru4l/graphql-live-query) [](https://www.npmjs.com/package/@n1ru4l/
11 lines (10 loc) • 470 B
JavaScript
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;
};