GQLDocument

data class GQLDocument(val definitions: List<GQLDefinition>, val filePath: String?) : 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
fun GQLDocument(definitions: List<GQLDefinition>, filePath: String?)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun copyWithNewChildrenInternal(container: NodeContainer): GQLNode

Internal-only. Copies this code using the given children

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

Internal-only. Copies this code using the given children

Properties

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

The children of this node.

Link copied to clipboard
val definitions: List<GQLDefinition>
Link copied to clipboard
val filePath: String?
Link copied to clipboard
open override val sourceLocation: SourceLocation

Extensions

Link copied to clipboard
fun GQLDocument.validateAsExecutable(schema: Schema, fieldsOnDisjointTypesMustMerge: Boolean = true): GQLResult<List<GQLDefinition>>

Validates the given document as an executable document.

Link copied to clipboard

Validate the given document as a schema:

Link copied to clipboard
fun GQLDocument.withBuiltinDefinitions(): GQLDocument
Link copied to clipboard
fun GQLDocument.withoutBuiltinDefinitions(): GQLDocument