trait GenericSchema[R] extends SchemaDerivation[R] with TemporalSchema
- Alphabetic
- By Inheritance
- GenericSchema
- TemporalSchema
- SchemaDerivation
- CommonSchemaDerivation
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
type
Typeclass[T] = Schema[R, T]
- Definition Classes
- CommonSchemaDerivation
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply[A](implicit ev: Schema[R, A]): Schema[R, A]
- Definition Classes
- SchemaDerivation
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- implicit val base64CursorSchema: Schema[Any, Base64Cursor]
- implicit val bigDecimalSchema: Schema[Any, BigDecimal]
- implicit val bigIntSchema: Schema[Any, BigInt]
- implicit val booleanSchema: Schema[Any, Boolean]
- implicit def chunkSchema[R0, A](implicit ev: Schema[R0, A]): Schema[R0, Chunk[A]]
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
- def customErrorEffectSchema[R0, R1 >: R0, R2 >: R0, E, A](convertError: (E) ⇒ ExecutionError)(implicit ev: Schema[R2, A]): Schema[R0, ZIO[R1, E, A]]
- def customErrorQuerySchema[R0, R1 >: R0, R2 >: R0, E, A](convertError: (E) ⇒ ExecutionError)(implicit ev: Schema[R2, A]): Schema[R0, ZQuery[R1, E, A]]
- def customErrorStreamSchema[R0, R1 >: R0, R2 >: R0, E, A](convertError: (E) ⇒ ExecutionError)(implicit ev: Schema[R2, A]): Schema[R0, ZStream[R1, E, A]]
-
def
customizeInputTypeName(name: String): String
Default naming logic for input types.
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, the "Input" suffix is added after the type name, given that it is not already present.
- Definition Classes
- CommonSchemaDerivation
- implicit val doubleSchema: Schema[Any, Double]
- implicit def effectSchema[R0, R1 >: R0, R2 >: R0, E <: Throwable, A](implicit ev: Schema[R2, A]): Schema[R0, ZIO[R1, E, A]]
- implicit def eitherSchema[RA, RB, A, B](implicit evA: Schema[RA, A], evB: Schema[RB, B]): Schema[RA with RB, Either[A, B]]
-
def
enumSchema[A](name: String, description: Option[String] = None, values: List[__EnumValue], directives: List[Directive] = List.empty, repr: (A) ⇒ String): Schema[Any, A]
Creates an enum schema for a type A
Creates an enum schema for a type A
- name
name of the scalar type
- description
description of the scalar type
- values
list of possible enum values
- directives
the directives to add to the type
- repr
function that defines how to convert A into a string. WARNING: The resulting string must be contained in the values list
- See also
enumValue convenience method for creating enum values required by this method
- def enumValue(name: String, description: Option[String] = None, isDeprecated: Boolean = false, deprecationReason: Option[String] = None, directives: List[Directive] = List.empty): __EnumValue
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
field[V](name: String, description: Option[String] = None, directives: List[Directive] = List.empty): PartiallyAppliedField[V]
Manually defines a field from a name, a description, some directives and a resolver.
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, usefieldWithArgs
instead. -
def
fieldLazy[V](name: String, description: Option[String] = None, directives: List[Directive] = List.empty): PartiallyAppliedFieldLazy[V]
Manually defines a lazy field from a name, a description, some directives and a resolver.
-
def
fieldWithArgs[V, A](name: String, description: Option[String] = None, directives: List[Directive] = Nil): PartiallyAppliedFieldWithArgs[V, A]
Manually defines a field with arguments from a name, a description, some directives and a resolver.
- implicit val floatSchema: Schema[Any, Float]
- implicit def functionSchema[RA, RB, A, B](implicit arg1: ArgBuilder[A], ev1: Schema[RA, A], ev2: Schema[RB, B]): Schema[RB, (A) ⇒ B]
- implicit def functionUnitSchema[R0, A](implicit ev: Schema[R0, A]): Schema[R0, () ⇒ A]
- implicit def futureSchema[R0, A](implicit ev: Schema[R0, A]): Schema[R0, Future[A]]
-
macro
def
gen[R0, T]: Typeclass[T]
Returns an instance of
Schema
for the given type T.Returns an instance of
Schema
for the given type T. This method requires aSchema
for all types nested inside T. It should be used only if T is a case class or a sealed trait.- Definition Classes
- SchemaDerivation
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- implicit def infallibleEffectSchema[R0, R1 >: R0, R2 >: R0, A](implicit ev: Schema[R2, A]): Schema[R0, URIO[R1, A]]
- implicit def infallibleQuerySchema[R0, R1 >: R0, R2 >: R0, A](implicit ev: Schema[R2, A]): Schema[R0, ZQuery[R1, Nothing, A]]
- implicit def infallibleStreamSchema[R1, R2 >: R1, A](implicit ev: Schema[R2, A]): Schema[R1, ZStream[R1, Nothing, A]]
-
lazy val
instantEpochSchema: Schema[Any, Instant]
- Definition Classes
- TemporalSchema
-
implicit
lazy val
instantSchema: Schema[Any, Instant]
- Definition Classes
- TemporalSchema
- implicit val intSchema: Schema[Any, Int]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isScalarValueType[T](ctx: ReadOnlyCaseClass[Typeclass, T]): Boolean
- Definition Classes
- CommonSchemaDerivation
-
def
isValueType[T](ctx: ReadOnlyCaseClass[Typeclass, T]): Boolean
- Definition Classes
- CommonSchemaDerivation
-
def
join[T](ctx: ReadOnlyCaseClass[Typeclass, T]): Typeclass[T]
- Definition Classes
- CommonSchemaDerivation
- implicit def listSchema[R0, A](implicit ev: Schema[R0, A]): Schema[R0, List[A]]
-
val
localDateEpochSchema: Schema[Any, LocalDate]
- Definition Classes
- TemporalSchema
-
implicit
lazy val
localDateSchema: Schema[Any, LocalDate]
- Definition Classes
- TemporalSchema
-
def
localDateSchemaWithFormatter(formatter: DateTimeFormatter): Schema[Any, LocalDate]
- Definition Classes
- TemporalSchema
-
val
localDateTimeEpochSchema: Schema[Any, LocalDateTime]
- Definition Classes
- TemporalSchema
-
implicit
lazy val
localDateTimeSchema: Schema[Any, LocalDateTime]
- Definition Classes
- TemporalSchema
-
def
localDateTimeSchemaWithFormatter(formatter: DateTimeFormatter): Schema[Any, LocalDateTime]
- Definition Classes
- TemporalSchema
-
implicit
lazy val
localTimeSchema: Schema[Any, LocalTime]
- Definition Classes
- TemporalSchema
-
def
localTimeSchemaWithFormatter(formatter: DateTimeFormatter): Schema[Any, LocalTime]
- Definition Classes
- TemporalSchema
- implicit val longSchema: Schema[Any, Long]
- implicit def mapSchema[RA, RB, A, B](implicit evA: Schema[RA, A], evB: Schema[RB, B]): Schema[RA with RB, Map[A, B]]
- implicit def metadataFunctionSchema[R0, A](implicit ev: Schema[R0, A]): Schema[R0, (Field) ⇒ A]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
obj[R1, V](name: String, description: Option[String] = None, directives: List[Directive] = Nil)(fields: (FieldAttributes) ⇒ List[(__Field, (V) ⇒ Step[R1])]): Schema[R1, V]
Creates a new hand-rolled schema.
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.
- name
The name of the type
- 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) ) )
-
def
objectSchema[R1, A](name: String, description: Option[String], fields: (Boolean, Boolean) ⇒ List[(__Field, (A) ⇒ Step[R1])], directives: List[Directive] = List.empty): Schema[R1, A]
Creates an object schema for a type
A
Creates an object schema for a type
A
- name
name of the type
- description
description of the type
- fields
list of fields with a type description and a resolver for each field
-
implicit
lazy val
offsetDateTimeSchema: Schema[Any, OffsetDateTime]
- Definition Classes
- TemporalSchema
-
def
offsetDateTimeSchemaWithFormatter(formatter: DateTimeFormatter): Schema[Any, OffsetDateTime]
- Definition Classes
- TemporalSchema
- implicit def optionSchema[R0, A](implicit ev: Schema[R0, A]): Schema[R0, Option[A]]
- implicit def querySchema[R0, R1 >: R0, R2 >: R0, E <: Throwable, A](implicit ev: Schema[R2, A]): Schema[R0, ZQuery[R1, E, A]]
-
lazy val
sampleDate: ZonedDateTime
- Definition Classes
- TemporalSchema
-
def
scalarSchema[A](name: String, description: Option[String], specifiedBy: Option[String], directives: Option[List[Directive]], makeResponse: (A) ⇒ ResponseValue): Schema[Any, A]
Creates a scalar schema for a type
A
Creates a scalar schema for a type
A
- name
name of the scalar type
- description
description of the scalar type
- specifiedBy
URL of the scalar specification
- directives
the directives to add to the type
- makeResponse
function from
A
to ResponseValue that defines how to resolveA
- implicit def seqSchema[R0, A](implicit ev: Schema[R0, A]): Schema[R0, Seq[A]]
- implicit def setSchema[R0, A](implicit ev: Schema[R0, A]): Schema[R0, Set[A]]
- implicit val shortSchema: Schema[Any, Short]
-
def
split[T](ctx: SealedTrait[Typeclass, T]): Typeclass[T]
- Definition Classes
- CommonSchemaDerivation
- implicit def streamSchema[R0, R1 >: R0, R2 >: R0, E <: Throwable, A](implicit ev: Schema[R2, A]): Schema[R0, ZStream[R1, E, A]]
- implicit val stringSchema: Schema[Any, String]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
temporalSchema[A <: Temporal](name: String, description: Option[String] = None)(f: (A) ⇒ ResponseValue): Schema[Any, A]
- Definition Classes
- TemporalSchema
-
def
temporalSchemaWithFormatter[A <: Temporal](name: String, description: Option[String] = None)(formatter: DateTimeFormatter): Schema[Any, A]
- Definition Classes
- TemporalSchema
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- implicit def tupleSchema[RA, RB, A, B](implicit evA: Schema[RA, A], evB: Schema[RB, B]): Schema[RA with RB, (A, B)]
- implicit val unitSchema: Schema[Any, Unit]
- implicit val uploadSchema: Schema[Any, Upload]
- implicit val uuidSchema: Schema[Any, UUID]
- implicit def vectorSchema[R0, A](implicit ev: Schema[R0, A]): Schema[R0, Vector[A]]
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
implicit
lazy val
zonedDateTimeSchema: Schema[Any, ZonedDateTime]
- Definition Classes
- TemporalSchema
-
def
zonedDateTimeSchemaWithFormatter(formatter: DateTimeFormatter): Schema[Any, ZonedDateTime]
- Definition Classes
- TemporalSchema
-
object
auto extends AutoSchemaDerivation[R]
- Definition Classes
- SchemaDerivation