QueryInterpreter

grackle.QueryInterpreter
See theQueryInterpreter companion object
class QueryInterpreter[F[_]](mapping: Mapping[F])

Attributes

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

Members list

Value members

Concrete methods

def cursorCompatible(tpe: Type, cursorTpe: Type): Boolean

Attributes

Source
queryinterpreter.scala
def run(query: Query, rootTpe: Type, env: Env): Stream[F, Result[Json]]

Interpret query with expected type rootTpe.

Interpret query with expected type rootTpe.

The query is fully interpreted, including deferred or staged components.

GraphQL errors are accumulated in the result.

Attributes

Source
queryinterpreter.scala
def runFields(query: Query, tpe: Type, cursor: Cursor): Result[List[(String, ProtoJson)]]

Interpret query against cursor, yielding a collection of fields.

Interpret query against cursor, yielding a collection of fields.

If the query is valid, the field subqueries will all be valid fields of the enclosing type tpe and the resulting fields may be used to build a Json object of type tpe. If the query is invalid errors will be returned on the left hand side of the result.

Attributes

Source
queryinterpreter.scala
def runList(query: Query, tpe: Type, parent: Cursor, unique: Boolean, nullable: Boolean): Result[ProtoJson]

Attributes

Source
queryinterpreter.scala
def runOneShot(query: Query, rootTpe: Type, rootCursor: Cursor): F[Result[ProtoJson]]

Run a non-subscription query yielding a single result.

Run a non-subscription query yielding a single result.

Attributes

Source
queryinterpreter.scala
def runRootValue(query: Query, rootTpe: Type, parentCursor: Cursor): F[Result[ProtoJson]]

Interpret query with expected type rootTpe.

Interpret query with expected type rootTpe.

At most one stage will be run and the result may contain deferred components.

Errors are accumulated on the Left of the result.

Attributes

Source
queryinterpreter.scala
def runSubscription(query: Query, rootTpe: Type, rootCursor: Cursor): Stream[F, Result[ProtoJson]]

Run a subscription query yielding a stream of results.

Run a subscription query yielding a stream of results.

Attributes

Source
queryinterpreter.scala
def runValue(query: Query, tpe: Type, cursor: Cursor): Result[ProtoJson]

Interpret query against cursor with expected type tpe.

Interpret query against cursor with expected type tpe.

If the query is invalid errors will be returned on the left hand side of the result.

Attributes

Source
queryinterpreter.scala