UNPKG

graphql-2-json-schema

Version:
18 lines (17 loc) 685 B
import { IntrospectionQuery } from 'graphql'; import { JSONSchema6 } from 'json-schema'; import { JSONSchema6Acc } from './reducer'; import type { IDTypeMapping as IDTypeMappingType } from './types'; export interface GraphQLJSONSchema6 extends JSONSchema6 { properties: { Query: JSONSchema6Acc; Mutation: JSONSchema6Acc; }; definitions: JSONSchema6Acc; } export interface FromIntrospectionQueryOptions { ignoreInternals?: boolean; nullableArrayItems?: boolean; idTypeMapping?: IDTypeMappingType; } export declare const fromIntrospectionQuery: (introspection: IntrospectionQuery, opts?: FromIntrospectionQueryOptions | undefined) => JSONSchema6;