GenericSchema
Value members
Concrete methods
Manually defines a field from a name, a description, some directives and a resolver.
If the field is a function that should be called lazily, use fieldLazy
instead.
If the field takes arguments, use fieldWithArgs
instead.
Manually defines a field from a name, a description, some directives and a resolver.
If the field is a function that should be called lazily, use fieldLazy
instead.
If the field takes arguments, use fieldWithArgs
instead.
Manually defines a lazy field from a name, a description, some directives and a resolver.
Manually defines a lazy field from a name, a description, some directives and a resolver.
Manually defines a field with arguments from a name, a description, some directives and a resolver.
Manually defines a field with arguments from a name, a description, some directives and a resolver.
Creates a new hand-rolled schema. For normal usage use the derived schemas, this is primarily for schemas which can't be resolved by derivation.
Creates a new hand-rolled schema. For normal usage use the derived schemas, this is primarily for schemas which can't be resolved by derivation.
- Value parameters:
- description
An optional description of the type
- directives
The directives to add to the type
- fields
The fields to add to this object
case class Group(id: String, users: UQuery[List[User]], parent: UQuery[Option[Group]], organization: UQuery[Organization]) case class Organization(id: String, groups: UQuery[List[Group]]) case class User(id: String, group: UQuery[Group]) implicit val groupSchema: Schema[Any, Group] = obj("Group", Some("A group of users"))(implicit ft => List( field("id")(_.id), field("users")(_.users), field("parent")(_.parent), field("organization")(_.organization) ) ) implicit val orgSchema: Schema[Any, Organization] = obj("Organization", Some("An organization of groups"))(implicit ft => List( field("id")(_.id), field("groups")(_.groups) ) ) implicit val userSchema: Schema[Any, User] = obj("User", Some("A user of the service"))(implicit ft => List( field("id")(_.id), field("group")(_.group) ) )
- name
The name of the type
Creates an object schema for a type A
Creates an object schema for a type A
- Value parameters:
- description
description of the type
- fields
list of fields with a type description and a resolver for each field
- name
name of the type
Creates a scalar schema for a type A
Creates a scalar schema for a type A
- Value parameters:
- description
description of the scalar type
- makeResponse
function from
A
to ResponseValue that defines how to resolveA
- name
name of the scalar type
- specifiedBy
URL of the scalar specification
Inherited methods
Default naming logic for input types. This is needed to avoid a name clash between a type used as an input and the same type used as an output. GraphQL needs 2 different types, and they can't have the same name. By default, we add the "Input" suffix after the type name.
Default naming logic for input types. This is needed to avoid a name clash between a type used as an input and the same type used as an output. GraphQL needs 2 different types, and they can't have the same name. By default, we add the "Input" suffix after the type name.
- Inherited from:
- SchemaDerivation
- Inherited from:
- TemporalSchema
- Inherited from:
- TemporalSchema