SelectElaborator

grackle.QueryCompiler.SelectElaborator
See theSelectElaborator companion object
trait SelectElaborator extends Phase

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.

Attributes

Companion
object
Source
compiler.scala
Graph
Supertypes
trait Phase
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def select(ref: TypeRef, name: String, args: List[Binding], directives: List[Directive]): Elab[Unit]

Attributes

Source
compiler.scala

Concrete methods

Attributes

Source
compiler.scala

Attributes

Source
compiler.scala

Attributes

Source
compiler.scala
override def transform(query: Query): Elab[Query]

Transform the supplied query algebra term query.

Transform the supplied query algebra term query.

Attributes

Definition Classes
Source
compiler.scala

Inherited methods

def transformSelect(fieldName: String, alias: Option[String], child: Query): Elab[Query]

Attributes

Inherited from:
Phase
Source
compiler.scala
def validateSubselection(fieldName: String, child: Query): Elab[Unit]

Attributes

Inherited from:
Phase
Source
compiler.scala

Concrete fields

Attributes

Source
compiler.scala

Attributes

Source
compiler.scala

Attributes

Source
compiler.scala

Attributes

Source
compiler.scala

Inherited fields

Attributes

Inherited from:
Phase
Source
compiler.scala