schemaPrinter.d.ts 915 B

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