Mutation

data class Mutation(val name: String) : QueryElement, Operation

Represents a GraphQL mutation Created using query

Parameters

name

Name for the mutation (Optional).

See also

Constructors

Link copied to clipboard
constructor(name: String)

Properties

Link copied to clipboard
Link copied to clipboard
open val parent: QueryElement?

Functions

Link copied to clipboard
fun field(name: String, init: Field.() -> Unit = {}): Field

Creates and register a Field as a child of the current QueryElement

Link copied to clipboard
fun fragment(name: String, type: String, init: Fragment.() -> Unit): Fragment

Create and register a fragment for use in the mutation

Link copied to clipboard
fun registerFragment(fragment: Fragment)

Register an existing Fragment into the mutation

Link copied to clipboard
open override fun toString(): String

Converts the query object into a string containing a GraphQL query.

Link copied to clipboard
fun typename()

Gets the name of the current type of the current QueryElement. Equivalent to __typename.

Link copied to clipboard
fun variable(variable: Variable)

fun variable(name: String, type: String)

Create a variable for use in the GraphQL query