toExecutableDocument

fun BufferedSource.toExecutableDocument(schema: Schema, filePath: String? = null): GQLDocument

Parses the source to a List<GQLDefinition>, throwing on parsing or validation errors.

See parseAsGQLDocument and validateAsExecutable for more granular error reporting