Package-level declarations

Types

Link copied to clipboard
data class Argument(val name: String, val types: List<String>) : QueryComponent

Represents an argument to a field in a query

Link copied to clipboard
data class Directive(type: Directive.DirectiveType, condition: String) : QueryComponent

Represents a directive for use in a field

Link copied to clipboard
data class Field(val name: String, val parent: QueryElement?) : QueryElement

Represents a field to be queried

Link copied to clipboard
data class Fragment(val name: String, type: String, val inline: Boolean) : QueryElement

Represents a fragment

Link copied to clipboard
data class FragmentUse(val attachedFragment: Fragment, val parent: QueryElement?) : QueryElement

Represents a reference to a fragment in a field

Link copied to clipboard
sealed interface Introspection : QueryComponent

Base Class for Introspection related components

Link copied to clipboard
data class Mutation(val name: String) : QueryElement, Operation

Represents a GraphQL mutation Created using query

Link copied to clipboard
sealed interface Operation

Base class for operations to be done in GraphQL

Link copied to clipboard
data class Query(val name: String) : QueryElement, Operation

Represents a GraphQL query Created using query

Link copied to clipboard
interface QueryComponent

Base class of all components of a GraphQl query

Link copied to clipboard

Represents a component in a query that has children

Link copied to clipboard

Represents a __schema from the GraphQL introspection API. Allows getting information on the schema.

Link copied to clipboard
data class TypeIntrospection(val type: String, val parent: QueryElement?) : QueryElement, Introspection

Represents a __type from the GraphQL introspection API.

Link copied to clipboard

Represents a __typename from the GraphQL introspection API

Link copied to clipboard
class Variable(name: String, val type: String) : QueryComponent

Represents a variable declaration in a query.

Functions

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

Creates a Fragment that can be registered in a Query for use

Link copied to clipboard
fun mutation(name: String = "", init: Mutation.() -> Unit): Mutation

Creates a Mutation

Link copied to clipboard
fun query(name: String = "", init: Query.() -> Unit): Query

Creates a Query