Schema

sangria.schema.Schema
See theSchema companion object
case class Schema[Ctx, Val](query: ObjectType[Ctx, Val], mutation: Option[ObjectType[Ctx, Val]], subscription: Option[ObjectType[Ctx, Val]], additionalTypes: List[Type & Named], description: Option[String], directives: List[Directive], validationRules: List[SchemaValidationRule], astDirectives: Vector[Directive], astNodes: Vector[AstNode]) extends HasAstInfo with HasDescription

GraphQL schema description.

Describes the schema that is presented by a Sangria server. An instance of this type needs to be presented to Sangria's execution method, so that it knows what to execute in response to a GraphQL request that conforms to this schema.

The types contained in the schema have associated actions that Sangria's execution uses to convert a parsed GraphQL request to its data store operations.

Attributes

Ctx

Type of a context object that will be passed to each Sangria execution of a GraphQL query against this schema.

description

A description of this schema element that can be presented to clients of the GraphQL service.

query

The query

See also:
Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def compare(oldSchema: Schema[_, _]): Vector[SchemaChange]
def extend(document: Document, builder: AstSchemaBuilder[Ctx]): Schema[Ctx, Val]
def getOutputType(tpe: Type, topLevel: Boolean): Option[OutputType[_]]
def isPossibleType(baseTypeName: String, tpe: ObjectType[_, _]): Boolean
def withDirective(directive: Directive): Schema[Ctx, Val]
def withDirectives(directives: Directive*): Schema[Ctx, Val]

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

Concrete fields

lazy val allTypes: Map[String, Type & Named]
lazy val inputTypes: Map[String, Named & InputType[Any]]
lazy val outputTypes: Map[String, Named & OutputType[Any]]
lazy val scalarTypes: Map[String, ScalarType[_]]
lazy val toAst: Document
lazy val typeList: Vector[Type & Named]
lazy val types: Map[String, (Int, Type & Named)]