parseAsGQLDocument

fun String.parseAsGQLDocument(options: ParserOptions = ParserOptions.Default): GQLResult<GQLDocument>


fun BufferedSource.parseAsGQLDocument(filePath: String? = null, options: ParserOptions = ParserOptions.Default): GQLResult<GQLDocument>

Parses the source to a GQLDocument, validating the syntax but not the contents of the document.

You can then use validateAsSchema to validate the contents and get a Schema. Or use validateAsExecutable to validate the contents get a list of operations/fragments.

Closes BufferedSource.

Return

a GQLResult with either a non-null GQLDocument or a list of issues.

Parameters

filePath

the path of a file on the host filesystem where the source is coming from. If provided, filePath is used to display context for parsing errors. If the source doesn't come from a file, pass null.

fun Path.parseAsGQLDocument(options: ParserOptions = ParserOptions.Default): GQLResult<GQLDocument>
fun File.parseAsGQLDocument(options: ParserOptions = ParserOptions.Default): GQLResult<GQLDocument>