gql

package gql

Members list

Packages

package gql.dsl
package gql.preparation
package gql.resolver
package gql.std
package gql.util

Type members

Classlikes

final case class Arg[+A](impl: FreeApply[Impl, ValidatedNec[String, A]])

A small free algebra for combining arguments and decoding them.

A small free algebra for combining arguments and decoding them. ArgDecoder can trivially be lifted into Arg with loss of field-level information.

Note that Arg must be non-empty, and therefore it does not form an cats.Applicative, but instead it forms cats.Apply.

Attributes

Companion
object
Source
Arg.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Arg

Attributes

Companion
class
Source
Arg.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Arg.type
final case class ArgDecoder[A, B](av: ArgValue[A], decode: ArgParam[A] => Either[String, B])

A combination of an argument declaration ArgParam and a decoder function for ArgParam.

A combination of an argument declaration ArgParam and a decoder function for ArgParam. This structure is more specialized than just decoding with Arg, since you will have access to field specific information such as if the argument was provided explicitly or the default was used.

The trivial implementation of an ArgDecoder given an ArgValue:

val av: ArgValue[A] = ???
ArgDecoder[A, A](av, _.value.asRight)

Attributes

Source
Arg.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class ArgParam[A](defaulted: Boolean, value: A)

A GraphQL argument value suppled in respect to a declared ArgValue, usually provided by a calling client.

A GraphQL argument value suppled in respect to a declared ArgValue, usually provided by a calling client.

Attributes

Source
Arg.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class ArgValue[A](name: String, input: Eval[In[A]], defaultValue: Option[Value[Const, Unit]], description: Option[String])

A GraphQL argument declaration with an optional default value.

A GraphQL argument declaration with an optional default value. The argument references an input type, which is suspended in Eval for recursion.

Attributes

Source
Arg.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object AstImplicits

Attributes

Source
ast.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final case class Cursor(path: Chain[GraphArc])

A collection of GraphQL arcs wraped up with an associated algebra.

A collection of GraphQL arcs wraped up with an associated algebra. Usually used for reporting where an error occured.

Attributes

Companion
object
Source
Cursor.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Cursor

Attributes

Companion
class
Source
Cursor.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Cursor.type
final case class Directive[A](name: String, arg: EmptyableArg[A])

A Directive takes an argument A and performs some context specific ast transformation.

A Directive takes an argument A and performs some context specific ast transformation.

Attributes

Companion
object
Source
Directive.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Directive

Consider taking a look at the skip and include directives as an example.

Consider taking a look at the skip and include directives as an example.

Attributes

Companion
class
Source
Directive.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Directive.type
sealed trait EmptyableArg[A]

Attributes

Companion
object
Source
Arg.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Empty.type
class Lift[A]
object EmptyableArg

Attributes

Companion
trait
Source
Arg.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait GraphArc

One arc in a GraphQL path.

One arc in a GraphQL path.

Attributes

Companion
object
Source
Cursor.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Field
class Index
object GraphArc

Attributes

Companion
trait
Source
Cursor.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
GraphArc.type
sealed trait InverseModifier

Attributes

Companion
object
Source
Modifier.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object List.type
object Optional.type

Attributes

Companion
trait
Source
Modifier.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class InverseModifierStack[+T](modifiers: List[InverseModifier], inner: T)

The Scala counterpart to ModifierStack.

The Scala counterpart to ModifierStack.

Note that they are not equivalent, since ModifierStack explicitly declares Modifier.NonNull, while InverseModifierStack explicitly declares the opposite; InverseModifier.Optional.

Attributes

Companion
object
Source
Modifier.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
Modifier.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait Modifier

Attributes

Companion
object
Source
Modifier.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object List.type
object NonNull.type
object Modifier

Attributes

Companion
trait
Source
Modifier.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Modifier.type
final case class ModifierStack[+T](modifiers: List[Modifier], inner: T)

A very convinient algebra for transforming GraphQL types with modifiers.

A very convinient algebra for transforming GraphQL types with modifiers. It can take a GraphQL type to a Scala type and back.

Attributes

Companion
object
Source
Modifier.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ModifierStack

Attributes

Companion
class
Source
Modifier.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait Position[+F[_], A]

Attributes

Companion
object
Source
Directive.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Field[F, A]
class FragmentSpread[A]
object Position

Attributes

Companion
trait
Source
Directive.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Position.type
final case class QueryParameters(query: String, variables: Option[Map[String, Json]], operationName: Option[String])

The neccessary parameters to execute a GraphQL query.

The neccessary parameters to execute a GraphQL query. QueryParameters is usually provided by a calling client.

Attributes

Source
QueryParameters.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class QueryResult(data: JsonObject, errors: Chain[Error])

The result of executing a GraphQL query.

The result of executing a GraphQL query. Errors thrown during evaluation can be handled with a partial function.

Attributes

Companion
object
Source
QueryResult.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object QueryResult

Attributes

Companion
class
Source
QueryResult.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class SchemaShape[F[_], Q, M, S](query: Type[F, Q], mutation: Option[Type[F, M]], subscription: Option[Type[F, S]], outputTypes: List[OutToplevel[F, _]], inputTypes: List[InToplevel[_]], positions: List[Position[F, _]])

The underlying graph that compiles into a GraphQL schema.

The underlying graph that compiles into a GraphQL schema. Provides a plethora of methods to derive information, perform validation, render, introspect and generate stub implementations.

Attributes

Companion
object
Source
SchemaShape.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object SchemaShape

Attributes

Companion
class
Source
SchemaShape.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class SchemaState[F[_]](nextId: Int, batchFunctions: Map[BatchKey[_, _], BatchFunction[F, _, _]], positions: List[Position[F, _]])

A structure to accumulate information for building stateful schemas.

A structure to accumulate information for building stateful schemas. Needed to build batch functions and directives.

Attributes

Companion
object
Source
SchemaState.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object SchemaState

Attributes

Companion
class
Source
SchemaState.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
object Validation

Attributes

Source
Validation.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Validation.type
object ast extends Implicits

A tree-like structure representing a GraphQL schema, akin to most schema builders.

A tree-like structure representing a GraphQL schema, akin to most schema builders.

Attributes

Source
ast.scala
Supertypes
trait Implicits
class Object
trait Matchable
class Any
Self type
ast.type