@zendesk/laika
Version:
Test, mock, intercept and modify Apollo Client's operations — in both browser and unit tests!
11 lines (10 loc) • 635 B
TypeScript
import type { DocumentNode } from 'graphql';
import type { Operation } from '@apollo/client/core';
export declare const hasSubscriptionOperation: (
/** @type {Operation} */ { query }: Operation) => boolean;
export declare const hasMutationOperation: (
/** @type {Operation} */ { query }: Operation) => boolean;
export declare const hasQueryOperation: (
/** @type {Operation} */ { query }: Operation) => boolean;
export declare const getOperationNameFromDocument: (document: DocumentNode) => string | undefined;
export declare const matchesOperationDocument: (operationDocument: DocumentNode, matcherDocument: DocumentNode) => boolean;