printSchema function

String printSchema(
  1. GraphQLSchema schema, {
  2. SchemaPrinter printer = const SchemaPrinter(),
})

Returns the Schema Definition Language (SDL) string representation of the given schema.

Implementation

String printSchema(
  GraphQLSchema schema, {
  SchemaPrinter printer = const SchemaPrinter(),
}) {
  return printer.printFilteredSchema(
    schema,
    (n) => !isSpecifiedDirective(n),
    isDefinedType,
  );
}