GQLDocument

class GQLDocument(val definitions: List<GQLDefinition>, val sourceLocation: SourceLocation?) : GQLNode

The top level node in a GraphQL document. This can be a schema document or an executable document (or something else if need be)

See parseAsGQLDocument for how to obtain a GQLDocument.

Constructors

Link copied to clipboard
constructor(definitions: List<GQLDefinition>, sourceLocation: SourceLocation?)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val children: List<GQLDefinition>

The children of this node.

Link copied to clipboard
Link copied to clipboard
open override val sourceLocation: SourceLocation?

Functions

Link copied to clipboard
fun copy(definitions: List<GQLDefinition> = this.definitions, sourceLocation: SourceLocation? = this.sourceLocation): GQLDocument
Link copied to clipboard
open override fun copyWithNewChildrenInternal(container: NodeContainer): GQLNode

Internal-only. Copies this code using the given children

Link copied to clipboard
Link copied to clipboard

Returns a "full schema" document. Full schema documents are for use by clients and other tools that need to know what features are supported by a given server. They include builtin directives and merge all type extensions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Outputs a schema document to SDL. For executable documents, use toUtf8()

Link copied to clipboard
fun GQLNode.toUtf8(indent: String = " "): String
fun GQLNode.toUtf8(sink: BufferedSink, indent: String = " ")
Link copied to clipboard
Link copied to clipboard

Validates the given document as an executable document.

Link copied to clipboard
Link copied to clipboard

Add builtin definitions from the latest spec version to the GQLDocument

Link copied to clipboard
open override fun writeInternal(writer: SDLWriter)

Internal-only. Copies this code using the given children