SemiAuto

caliban.schema.SchemaDerivation.SemiAuto
See theSemiAuto companion object
sealed trait SemiAuto[A] extends Schema[R, A]

Attributes

Companion
object
Graph
Supertypes
trait Schema[R, A]
class Object
trait Matchable
class Any

Members list

Value members

Inherited methods

Defined the arguments of the given type. Should be empty except for Function.

Defined the arguments of the given type. Should be empty except for Function.

Attributes

Inherited from:
Schema
def contramap[A](f: A => A): Schema[R, A]

Builds a new Schema of A from an existing Schema of T and a function from A to T.

Builds a new Schema of A from an existing Schema of T and a function from A to T.

Value parameters

f

a function from A to T.

Attributes

Inherited from:
Schema
def optional: Boolean

Defines if the type is considered optional or non-null. Should be false except for Option.

Defines if the type is considered optional or non-null. Should be false except for Option.

Attributes

Inherited from:
Schema
def rename(name: String, inputName: Option[String]): Schema[R, T]

Changes the name of the generated graphql type.

Changes the name of the generated graphql type.

Value parameters

inputName

new name for the type when it's an input type (by default "Input" is added after the name)

name

new name for the type

Attributes

Inherited from:
Schema
def resolve(value: A): Step[R]

Resolves T by turning a value of type T into an execution step that describes how to resolve the value.

Resolves T by turning a value of type T into an execution step that describes how to resolve the value.

Value parameters

value

a value of type T

Attributes

Inherited from:
Schema
final def toType_(isInput: Boolean, isSubscription: Boolean): `__Type`

Generates a GraphQL type object from T. Unlike toType, this function is optimized and will not re-generate the type at each call.

Generates a GraphQL type object from T. Unlike toType, this function is optimized and will not re-generate the type at each call.

Value parameters

isInput

indicates if the type is passed as an argument. This is needed because GraphQL differentiates InputType from ObjectType.

isSubscription

indicates if the type is used in a subscription operation. For example, ZStream gives a different GraphQL type depending whether it is used in a subscription or elsewhere.

Attributes

Inherited from:
Schema

Deprecated and Inherited methods

def toType(isInput: Boolean, isSubscription: Boolean): `__Type`

Generates a GraphQL type object from T.

Generates a GraphQL type object from T.

Note that this method is public to allow derivation via the derives keyword in Scala 3. To avoid accidental usage (which would be bad for performance), we mark as @deprecated, which will lead to compiler warnings when used

Value parameters

isInput

indicates if the type is passed as an argument. This is needed because GraphQL differentiates InputType from ObjectType.

isSubscription

indicates if the type is used in a subscription operation. For example, ZStream gives a different GraphQL type depending whether it is used in a subscription or elsewhere.

Attributes

Deprecated
true
Inherited from:
Schema