From 768ba047e3ecf9f820efc736007bb3166be953d0 Mon Sep 17 00:00:00 2001 From: Matthew Leffler Date: Wed, 24 Jan 2018 18:28:55 -0700 Subject: [PATCH] Add schema printer options These were added with https://github.com/graphql/graphql-js/pull/927, RFC: Descriptions as strings. --- types/graphql/utilities/schemaPrinter.d.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/types/graphql/utilities/schemaPrinter.d.ts b/types/graphql/utilities/schemaPrinter.d.ts index 2bd40f1b964681..4864dff8f7a683 100644 --- a/types/graphql/utilities/schemaPrinter.d.ts +++ b/types/graphql/utilities/schemaPrinter.d.ts @@ -1,8 +1,12 @@ import { GraphQLSchema } from '../type/schema'; import { GraphQLType } from '../type/definition'; -export function printSchema(schema: GraphQLSchema): string; +export interface PrinterOptions { + [key: string]: any; +} -export function printIntrospectionSchema(schema: GraphQLSchema): string; +export function printSchema(schema: GraphQLSchema, options?: PrinterOptions): string; -export function printType(type: GraphQLType): string; +export function printIntrospectionSchema(schema: GraphQLSchema, options?: PrinterOptions): string; + +export function printType(type: GraphQLType, options?: PrinterOptions): string;