object QueryCompiler

Source
compiler.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. QueryCompiler
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. class ComponentElaborator[F[_]] extends Phase

    A compiler phase which partitions a query for execution by multiple composed mappings.

    A compiler phase which partitions a query for execution by multiple composed mappings.

    This phase transforms the input query by assigning subtrees to component mappings as specified by the supplied cmapping.

    The mapping has Type and field name pairs as keys and mapping and join function pairs as values. When the traversal of the input query visits a Select node with type Type.field name it will replace the Select with a Component node comprising,

    1. the mapping which will be responsible for evaluating the subquery. 2. A join function which will be called during interpretation with,

    i) The deferred subquery. ii) the cursor at that point in evaluation.

    This join function is responsible for computing the continuation query which will be evaluated by the responsible interpreter.

    Because the join is provided with the cursor of the parent interpreter the subquery can be parameterised with values derived from the parent query.

  2. class EffectElaborator[F[_]] extends Phase

    A compiler phase which partitions a query for execution which may invoke multiple effect handlers.

    A compiler phase which partitions a query for execution which may invoke multiple effect handlers.

    This phase transforms the input query by assigning subtrees to effect handlers as specified by the supplied emapping.

    The mapping has Type and field name pairs as keys and effect handlers as values. When the traversal of the input query visits a Select node with type Type.field name it will replace the Select with an Effect node comprising,

    1. the effect handler which will be responsible for running the effect and evaluating the subquery against its result. 2. the subquery which will be evaluated by the effect handler.

  3. type Elab[T] = IndexedStateT[Result, ElabState, ElabState, T]

    Elaboration monad.

    Elaboration monad.

    Supports threading of state through the elaboration of a query. Provides, + access to the schema, context, variables and fragments of a query. + ability to transform the children of Selects to supply semantics for field arguments. + ability to add contextual data to the resulting query both to support propagation of context to the elaboration of children, and to to drive run time behaviour. + ability to add selects for additional attributes to the resulting query. + ability to test existence and properties of neighbour nodes of the node being elaborated. + ability to report errors and warnings during elaboration.

  4. case class ElabState(parent: Option[ElabState], schema: Schema, context: Context, vars: Vars, fragments: Map[String, UntypedFragment], query: Query, localEnv: Env, attributes: List[(String, Query)], childTransform: (Query) => Elab[Query]) extends Product with Serializable

    The state managed by the elaboration monad.

  5. class IntrospectionElaborator extends Phase

    A phase which elaborates GraphQL introspection queries into the query algrebra.

  6. sealed trait IntrospectionLevel extends AnyRef
  7. trait Phase extends AnyRef

    A QueryCompiler phase.

  8. class QuerySizeValidator extends Phase

    A compiler phase which estimates the size of a query and applies width and depth limits.

  9. trait SelectElaborator extends Phase

    A compiler phase which translates Select nodes to be directly interpretable.

    A compiler phase which translates Select nodes to be directly interpretable.

    This phase,

    1. types bindings according to the schema: i) untyped enums are validated and typed according to their declared type. ii) String and Int bindings are translated to ID bindings where appropriate. iii) default values are supplied for missing arguments. iv) arguments are permuted into the order declared in the schema.

    2. eliminates Select arguments by delegating to a model-specific PartialFunction which is responsible for translating Select nodes into a form which is directly interpretable, for example, replacing them with a Filter or Unique node with a Predicate which is parameterized by the arguments, ie.,

    UntypedSelect("character", None, List(IDBinding("id", "1000")), Nil, child) might be translated to, Select("character, None, Filter(FieldEquals("id", "1000"), child)) 3. GraphQL introspection query field arguments are elaborated.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  20. object ComponentElaborator
  21. object EffectElaborator
  22. object Elab
  23. object IntrospectionElaborator
  24. object IntrospectionLevel
  25. object SelectElaborator
  26. object VariablesSkipAndFragmentElaborator extends Phase

    A phase which elaborates variables, directives, fragment spreads and inline fragments.

    A phase which elaborates variables, directives, fragment spreads and inline fragments.

    1. Query variable values are substituted for all variable references.

    2. skip and include directives are handled during this phase and the guarded subqueries are retained or removed as appropriate.

    3. Fragment spread and inline fragments are expanded.

    4. types narrowing coercions by resolving the target type against the schema.

    5. verifies that leaves have an empty subselection set and that structured types have a non-empty subselection set.

Inherited from AnyRef

Inherited from Any

Ungrouped