abstract class Mapping[F[_]] extends QueryExecutor[F, Json]
- Alphabetic
- By Inheritance
- Mapping
- QueryExecutor
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Mapping()
Type Members
- case class CursorField[T](fieldName: String, f: (Cursor) => Result[T], encoder: Encoder[T], required: List[String], hidden: Boolean)(implicit pos: SourcePos) extends FieldMapping with Product with Serializable
- case class Delegate(fieldName: String, interpreter: Mapping[F], join: (Cursor, Query) => Result[Query] = ComponentElaborator.TrivialJoin)(implicit pos: SourcePos) extends FieldMapping with Product with Serializable
- trait FieldMapping extends Product with Serializable
- case class LeafCursor(context: Context, focus: Any, parent: Option[Cursor], env: Env) extends Cursor with Product with Serializable
Cursor positioned at a GraphQL result leaf
- trait LeafMapping[T] extends TypeMapping
- abstract class ObjectMapping extends TypeMapping
- case class PrefixedMapping(tpe: Type, mappings: List[(List[String], ObjectMapping)])(implicit pos: SourcePos) extends TypeMapping with Product with Serializable
- case class PrimitiveField(fieldName: String, hidden: Boolean = false)(implicit pos: SourcePos) extends FieldMapping with Product with Serializable
- case class PrimitiveMapping(tpe: Type)(implicit pos: SourcePos) extends TypeMapping with Product with Serializable
- case class RootCursor(context: Context, parent: Option[Cursor], env: Env) extends AbstractCursor with Product with Serializable
Root
Cursor
focussed on the top level operation of a queryRoot
Cursor
focussed on the top level operation of a queryConstruction of mapping-specific cursors is handled by delegation to
mkCursorForField which is typically overridden in
Mappingsubtypes.
- case class RootEffect extends FieldMapping with Product with Serializable
Root effects can perform an intial effect prior to computing the resulting
Cursor
and effectiveQuery
.Root effects can perform an intial effect prior to computing the resulting
Cursor
and effectiveQuery
.Convenience methods are provided to cover the cases where only one of the query or the cursor are computed, and for where the computation is one-shot or a Stream. One-shot effects are used to perform initial effectful setup for a query or to perform the effect associated with a GraphQL mutation. Stream effects are used for GraphQL subscriptions.
If only the query is computed the default root cursor for the mapping will be used. If only the cursor is computed the client query (after elaboration) is used unmodified ... in this case results of the performed effect can only be passed to the result construction stage via the environment associated with the returned cursor.
- trait TypeMapping extends Product with Serializable
Abstract Value Members
Concrete 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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def compileAndRun(text: String, name: Option[String] = None, untypedVars: Option[Json] = None, introspectionLevel: IntrospectionLevel = Full, env: Env = Env.empty)(implicit sc: Compiler[F, F]): F[Json]
- Definition Classes
- QueryExecutor
- def compileAndRunAll(text: String, name: Option[String] = None, untypedVars: Option[Json] = None, introspectionLevel: IntrospectionLevel = Full, env: Env = Env.empty): Stream[F, Json]
- Definition Classes
- Mapping → QueryExecutor
- def compileAndRunOne(text: String, name: Option[String] = None, untypedVars: Option[Json] = None, introspectionLevel: IntrospectionLevel = Full, env: Env = Env.empty)(implicit sc: Compiler[F, F]): F[Json]
- Definition Classes
- Mapping → QueryExecutor
- lazy val compiler: QueryCompiler
- def compilerPhases: List[Phase]
- lazy val componentElaborator: ComponentElaborator[[_]F[_]]
- def defaultRootCursor(query: Query, tpe: Type, env: Env): F[Result[(Query, Cursor)]]
Yields a
Cursor
focused on the top level operation type of the query - def encoderForLeaf(tpe: Type): Option[Encoder[Any]]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fieldMapping(context: Context, fieldName: String): Option[FieldMapping]
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val interpreter: QueryInterpreter[F]
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isLeaf(tpe: Type): Boolean
True if the supplied type is a leaf with respect to the GraphQL schema or mapping, false otherwise.
- def leafMapping[T](tpe: Type): Option[LeafMapping[T]]
- def mkCursorForField(parent: Cursor, fieldName: String, resultName: Option[String]): Result[Cursor]
Yields a
Cursor
suitable for traversing the query result corresponding to thefieldName
child ofparent
.Yields a
Cursor
suitable for traversing the query result corresponding to thefieldName
child ofparent
.This method is typically overridden in and delegated to by
Mapping
subtypes. - final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def objectMapping(context: Context): Option[ObjectMapping]
- def rootEffect(context: Context, fieldName: String): Option[RootEffect]
Yields the
RootEffect
, if any, associated withfieldName
. - def run(op: Operation, env: Env = Env.empty): Stream[F, Json]
- def run(query: Query, rootTpe: Type, env: Env): Stream[F, Json]
- val selectElaborator: SelectElaborator
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def typeMapping(tpe: NamedType): Option[TypeMapping]
- val validator: MappingValidator
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- object CursorField extends Serializable
- object LeafMapping extends Serializable
- object ObjectMapping extends Serializable
- object RootEffect extends Serializable