UNPKG

@pact-foundation/pact

Version:
16 lines (15 loc) 634 B
import { type ASTNode } from 'graphql'; import type { OperationType } from './types'; export interface GraphQLVariables { [name: string]: unknown; } /** * Accepts a raw or pre-parsed query, validating in the former case, and * returns a normalized raw query. * @param query {string|ASTNode} the query to validate * @param type the operation type */ export declare function validateQuery(query: string | ASTNode, type: OperationType): string; export declare const escapeSpace: (s: string) => string; export declare const escapeRegexChars: (s: string) => string; export declare const escapeGraphQlQuery: (s: string) => string;