Mapping

abstract class Mapping[F[_]](val M: Monad[F]) extends QueryExecutor[F, Json]
trait QueryExecutor[F, Json]
class Object
trait Matchable
class Any

Type members

Classlikes

case class CursorField[T](fieldName: String, f: Cursor => Result[T], encoder: Encoder[T], required: List[String], hidden: Boolean)(pos: SourcePos) extends FieldMapping
Companion
object
object CursorField
Companion
class
case class Delegate(fieldName: String, interpreter: Mapping[F], join: (Cursor, Query) => Result[Query])(pos: SourcePos) extends FieldMapping
trait FieldMapping extends Product with Serializable
trait LeafMapping[T] extends TypeMapping
Companion
object
object LeafMapping
Companion
class
case class Mutation(run: (Query, Env) => Stream[F, Result[(Query, Env)]])

Root mappings can perform a mutation prior to constructing the result Cursor. A Mutation may perform a Unit effect and simply return the passed arguments; or it may refine the passed Query and/or Env that will be used to interpret the resulting Cursor.

Root mappings can perform a mutation prior to constructing the result Cursor. A Mutation may perform a Unit effect and simply return the passed arguments; or it may refine the passed Query and/or Env that will be used to interpret the resulting Cursor.

Companion
object
object Mutation
Companion
class
trait ObjectMapping extends TypeMapping
Companion
object
Companion
class
case class PrefixedMapping(tpe: Type, mappings: List[(List[String], ObjectMapping)])(pos: SourcePos) extends TypeMapping
case class PrimitiveMapping(tpe: Type)(pos: SourcePos) extends TypeMapping
trait RootMapping extends FieldMapping
trait TypeMapping extends Product with Serializable

Value members

Concrete methods

def compileAndRunAll(text: String, name: Option[String], untypedVars: Option[Json], introspectionLevel: IntrospectionLevel, env: Env): Stream[F, Json]
def compileAndRunOne(text: String, name: Option[String], untypedVars: Option[Json], introspectionLevel: IntrospectionLevel, env: Env)(sc: Compiler[F, F]): F[Json]
def compilerPhases: List[Phase]
def fieldMapping(path: List[String], tpe: Type, fieldName: String): Option[FieldMapping]
def leafMapping[T](tpe: Type): Option[LeafMapping[T]]
def objectMapping(path: List[String], tpe: Type): Option[ObjectMapping]
def rootCursor(path: List[String], rootTpe: Type, fieldName: String, child: Query, env: Env): Stream[F, Result[(Query, Cursor)]]
def rootMapping(path: List[String], tpe: Type, fieldName: String): Option[RootMapping]
def run(query: Query, rootTpe: Type, env: Env): Stream[F, Json]
def run(op: Operation, env: Env): Stream[F, Json]
def typeMapping(tpe: Type): Option[TypeMapping]

Inherited methods

def compileAndRun(text: String, name: Option[String], untypedVars: Option[Json], introspectionLevel: IntrospectionLevel, env: Env)(sc: Compiler[F, F]): F[Json]
Inherited from
QueryExecutor

Abstract fields

Implicits

Implicits

implicit val M: Monad[F]