UNPKG

742 BTypeScriptView Raw
1/// <reference path="./graphql-types.d.ts" />
2/// <reference path="./graphql-language.d.ts" />
3
4/**
5 * GraphQL utilities.
6 */
7declare module "graphql/utilities" {
8 import { GraphQLOutputType, GraphQLSchema, GraphQLType, GraphQLInputType } from 'graphql/type';
9 import { Type, Node } from 'graphql/language';
10
11 export class TypeInfo {
12 constructor(schema: GraphQLSchema);
13 getType(): GraphQLOutputType;
14 getInputType(): GraphQLInputType;
15
16 enter(node: Node): void;
17 leave(node: Node): void;
18 }
19
20 export const introspectionQuery: string;
21
22 export function buildClientSchema(
23 introspection: string
24 ): GraphQLSchema;
25
26 export function typeFromAST(
27 schema: GraphQLSchema,
28 inputTypeAST: Type
29 ): GraphQLType;
30}