caliban
package caliban
- Alphabetic
- By Inheritance
- caliban
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Package Members
Type Members
- sealed trait CalibanError extends Throwable with NoStackTrace with Product with Serializable
The base type for all Caliban errors.
- trait GraphQL[-R] extends AnyRef
A
GraphQL[-R]
represents a GraphQL API whose execution requires a ZIO environment of typeR
.A
GraphQL[-R]
represents a GraphQL API whose execution requires a ZIO environment of typeR
.It is intended to be created only once, typically when you start your server. The introspection schema will be generated when this class is instantiated.
- trait GraphQLAspect[+LowerR, -UpperR] extends AnyRef
A
GraphQLAspect
is wrapping type similar to a polymorphic function, which is capable of transforming a GraphQL into another while possibly enlarging the required environment type.A
GraphQLAspect
is wrapping type similar to a polymorphic function, which is capable of transforming a GraphQL into another while possibly enlarging the required environment type. It allows a flexible way to augment an existing GraphQL with new capabilities or features. - case class GraphQLIncrementalResponse[+E](incremental: List[Incremental[E]], hasNext: Boolean) extends Product with Serializable
- trait GraphQLInterpreter[-R, +E] extends AnyRef
A
GraphQLInterpreter[-R, +E]
represents a GraphQL interpreter whose execution requires a ZIO environment of typeR
and can fail with anE
.A
GraphQLInterpreter[-R, +E]
represents a GraphQL interpreter whose execution requires a ZIO environment of typeR
and can fail with anE
.It is a wrapper around a
GraphQL
API definition that allows adding some middleware around query execution, and possibly transform the environment or the error type. - case class GraphQLRequest(query: Option[String] = None, operationName: Option[String] = None, variables: Option[Map[String, InputValue]] = None, extensions: Option[Map[String, InputValue]] = None) extends Product with Serializable
Represents a GraphQL request, containing a query, an operation name and a map of variables.
- case class GraphQLResponse[+E](data: ResponseValue, errors: List[E], extensions: Option[ObjectValue] = None, hasNext: Option[Boolean] = None) extends Product with Serializable
Represents the result of a GraphQL query, containing a data object and a list of errors.
- case class GraphQLWSClose(code: Int, reason: String) extends Product with Serializable
- case class GraphQLWSInput(type: String, id: Option[String], payload: Option[InputValue]) extends Product with Serializable
- case class GraphQLWSOutput(type: String, id: Option[String], payload: Option[ResponseValue]) extends Product with Serializable
- sealed trait Incremental[+E] extends Product with Serializable
- sealed trait InputValue extends AnyRef
- sealed trait ResponseValue extends AnyRef
- case class RootResolver[+Query, +Mutation, +Subscription](queryResolver: Option[Query], mutationResolver: Option[Mutation], subscriptionResolver: Option[Subscription]) extends Product with Serializable
A
root resolver
contains resolvers for the 3 types of operations allowed in GraphQL: queries, mutations and subscriptions.A
root resolver
contains resolvers for the 3 types of operations allowed in GraphQL: queries, mutations and subscriptions.A
resolver
is a simple value of the case class describing the API. - sealed trait Value extends InputValue with ResponseValue
Value Members
- def graphQL[R, Q, M, S](resolver: RootResolver[Q, M, S], directives: List[__Directive] = Nil, schemaDirectives: List[Directive] = Nil, schemaDescription: Option[String] = None)(implicit arg0: SubscriptionSchema[S], querySchema: Schema[R, Q], mutationSchema: Schema[R, M], subscriptionSchema: Schema[R, S]): GraphQL[R]
Builds a GraphQL API for the given resolver.
Builds a GraphQL API for the given resolver.
It requires an instance of caliban.schema.Schema for each operation type. This schema will be derived by Magnolia automatically.
- def render[T](implicit schema: Schema[Any, T]): String
Returns a string that renders the given type into the GraphQL SDL.
- def renderSchema[Q, M, S](directives: List[__Directive] = Nil, schemaDirectives: List[Directive] = Nil, schemaDescription: Option[String] = None)(implicit querySchema: Schema[Any, Q], mutationSchema: Schema[Any, M], subscriptionSchema: Schema[Any, S]): String
Returns a string that renders the given schema into the GraphQL SDL.
- def renderSchemaWith[R, Q, M, S](directives: List[__Directive] = Nil, schemaDirectives: List[Directive] = Nil, schemaDescription: Option[String] = None)(implicit querySchema: Schema[R, Q], mutationSchema: Schema[R, M], subscriptionSchema: Schema[R, S]): String
Returns a string that renders the given schema into the GraphQL SDL.
Returns a string that renders the given schema into the GraphQL SDL. This variant of the method allows specifying the environment type when it's not
Any
. - def renderWith[R, T](implicit schema: Schema[R, T]): String
Returns a string that renders the given type into the GraphQL SDL.
Returns a string that renders the given type into the GraphQL SDL. This variant of the method allows specifying the environment type when it's not
Any
. - object CalibanError extends Serializable
- object Configurator
- object GraphQLAspect
- object GraphQLIncrementalResponse extends Serializable
- object GraphQLInterpreter
- object GraphQLRequest extends Serializable
- object GraphQLResponse extends Serializable
- object GraphQLWSInput extends Serializable
- object GraphQLWSOutput extends Serializable
- object Incremental extends Serializable
- object InputValue
- object Macros
- object ResponseValue
- object RootResolver extends Serializable
- object Value