UNPKG

3.5 kBTypeScriptView Raw
1import type { DirectiveNode } from 'graphql/language/ast';
2import type { GraphQLSchema } from 'graphql/type/schema';
3import { GraphQLDirective } from 'graphql/type/directives';
4import { GraphQLArgument, GraphQLNamedType, GraphQLScalarType, GraphQLEnumType, GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, GraphQLInputObjectType, GraphQLInputField } from 'graphql/type/definition';
5import { SchemaComposer } from '../SchemaComposer';
6import { SchemaFilterTypes } from './getFromSchema';
7import { CompareTypeComposersOption } from './schemaPrinterSortTypes';
8declare type Options = {
9 commentDescriptions?: boolean | null;
10 omitDescriptions?: boolean | null;
11 omitScalars?: boolean | null;
12 omitSpecifiedByUrl?: boolean | null;
13 sortAll?: boolean;
14 sortFields?: boolean;
15 sortArgs?: boolean;
16 sortInterfaces?: boolean;
17 sortUnions?: boolean;
18 sortEnums?: boolean;
19 sortTypes?: CompareTypeComposersOption;
20};
21export declare type SchemaPrinterOptions = Options;
22export declare type SchemaComposerPrinterOptions = Options & SchemaFilterTypes;
23export declare function printSchemaComposer(sc: SchemaComposer<any>, options?: SchemaComposerPrinterOptions): string;
24export declare function printSchema(schema: GraphQLSchema, options?: Options): string;
25export declare function printIntrospectionSchema(schema: GraphQLSchema, options?: Options): string;
26export declare function isDefinedType(type: GraphQLNamedType): boolean;
27export declare function printFilteredSchema(schema: GraphQLSchema, directiveFilter: (type: GraphQLDirective) => boolean, typeFilter: (type: GraphQLNamedType) => boolean, options?: Options): string;
28export declare function printSchemaDefinition(schema: GraphQLSchema): string;
29export declare function isSchemaOfCommonNames(schema: GraphQLSchema): boolean;
30export declare function printType(type: GraphQLNamedType, options?: Options): string;
31export declare function printScalar(type: GraphQLScalarType, options?: Options): string;
32export declare function printImplementedInterfaces(type: GraphQLObjectType | GraphQLInterfaceType, options?: Options): string;
33export declare function printObject(type: GraphQLObjectType, options?: Options): string;
34export declare function printInterface(type: GraphQLInterfaceType, options?: Options): string;
35export declare function printUnion(type: GraphQLUnionType, options?: Options): string;
36export declare function printEnum(type: GraphQLEnumType, options?: Options): string;
37export declare function printInputObject(type: GraphQLInputObjectType, options?: Options): string;
38export declare function printFields(type: GraphQLObjectType | GraphQLInterfaceType, options?: Options): string;
39export declare function printBlock(items: Array<string>): string;
40export declare function printArgs(_args: ReadonlyArray<GraphQLArgument>, options?: Options, indentation?: string): string;
41export declare function printInputValue(arg: GraphQLArgument | GraphQLInputField): string;
42export declare function printDirective(directive: GraphQLDirective, options?: Options): string;
43export declare function printNodeDirectives(node: {
44 directives?: ReadonlyArray<DirectiveNode>;
45} | undefined | null): string;
46export declare function printDescription(def: any, options?: Options, indentation?: string, firstInBlock?: boolean): string;
47export declare function printDescriptionWithComments(description: string, indentation: string, firstInBlock: boolean): string;
48export {};
49//# sourceMappingURL=schemaPrinter.d.ts.map
\No newline at end of file