toSchema

fun BufferedSource.toSchema(filePath: String? = null): Schema

Parses the source to a Schema, throwing on parsing or validation errors.

See parseAsGQLDocument and validateAsSchema for more granular error reporting