QueryInterpreter

Companion:
class
class Object
trait Matchable
class Any

Type members

Classlikes

object ProtoJson

Types

type ProtoJson <: AnyRef

Opaque type of partially constructed query results.

Opaque type of partially constructed query results.

Values may be fully expanded Json values, objects or arrays which not yet fully evaluated subtrees, or subqueries which are deferred to the next stage or another component of a composite interpreter.

Value members

Concrete methods

def complete[F[_]](pj: ProtoJson): Stream[F, Result[Json]]

Complete a possibly partial result.

Complete a possibly partial result.

Completes a single possibly partial result as described for completeAll.

def completeAll[F[_]](pjs: List[ProtoJson]): Stream[F, (Chain[Problem], List[Json])]

Complete a collection of possibly deferred results.

Complete a collection of possibly deferred results.

Each result is completed by locating any subtrees which have been deferred or delegated to some other component interpreter in an overall composite interpreter. Deferred subtrees are gathered, grouped by their associated interpreter and then evaluated in batches. The results of these batch evaluations are then completed in a subsequent stage recursively until the results are fully evaluated or yield errors.

Complete results are substituted back into the corresponding enclosing Json.

Errors are aggregated across all the results and are accumulated on the Left of the result.

def mkError(message: String, locations: List[(Int, Int)], path: List[String]): Problem

Construct a GraphQL error object

Construct a GraphQL error object

def mkErrorResult[T](message: String, locations: List[(Int, Int)], path: List[String]): Result[T]

Construct a GraphQL error object as the left hand side of a Result

Construct a GraphQL error object as the left hand side of a Result

Construct a GraphQL error response from a Result, ignoring any right hand side in result.

Construct a GraphQL error response from a Result, ignoring any right hand side in result.

def mkOneError(message: String, locations: List[(Int, Int)], path: List[String]): Type[Problem]
def mkResponse(data: Option[Json], errors: List[Problem]): Json

Construct a GraphQL response from the possibly absent result data and a collection of errors.

Construct a GraphQL response from the possibly absent result data and a collection of errors.

def mkResponse(result: Result[Json]): Json

Construct a GraphQL response from a Result.

Construct a GraphQL response from a Result.