UNPKG

902 BTypeScriptView Raw
1import { GraphQLSchema } from '../type/schema';
2import { GraphQLNamedType } from '../type/definition';
3
4export interface Options {
5 /**
6 * Descriptions are defined as preceding string literals, however an older
7 * experimental version of the SDL supported preceding comments as
8 * descriptions. Set to true to enable this deprecated behavior.
9 * This option is provided to ease adoption and will be removed in v16.
10 *
11 * Default: false
12 */
13 commentDescriptions?: boolean;
14}
15
16/**
17 * Accepts options as a second argument:
18 *
19 * - commentDescriptions:
20 * Provide true to use preceding comments as the description.
21 *
22 */
23export function printSchema(schema: GraphQLSchema, options?: Options): string;
24
25export function printIntrospectionSchema(
26 schema: GraphQLSchema,
27 options?: Options,
28): string;
29
30export function printType(type: GraphQLNamedType, options?: Options): string;