UNPKG

@cran/gql.core

Version:

Cran/GraphQL Core Utilities

9 lines (8 loc) 617 B
import type { ObjectValueNode, ValueNode } from "graphql/language/ast"; export declare function parseError<T = unknown>(type: string, ast: unknown, reason?: string): T; export declare type Primitive = undefined | null | string | boolean | number; export declare type Derivative = Primitive | { [key: string]: Derivative; } | Array<Derivative>; export declare function parseObject(type: string, ast: ObjectValueNode, variables?: Record<string, unknown> | null): Record<string, Derivative>; export declare function parseLiteral(type: string, ast: ValueNode, variables?: Record<string, unknown> | null): Derivative;