Wrappers

object Wrappers
class Object
trait Matchable
class Any

Value members

Concrete methods

def maxDepth(maxDepth: Int): ValidationWrapper[Any]

Returns a wrapper that checks that the query's depth is under a given max

Returns a wrapper that checks that the query's depth is under a given max

Value Params
maxDepth

the max allowed depth

def maxFields(maxFields: Int): ValidationWrapper[Any]

Returns a wrapper that checks that the query has a limited number of fields

Returns a wrapper that checks that the query has a limited number of fields

Value Params
maxFields

the max allowed number of fields

def onSlowQueries[R](duration: Duration)(f: (Duration, String) => URIO[R, Any]): OverallWrapper[R & Clock]

Returns a wrapper that runs a given function in case of slow queries

Returns a wrapper that runs a given function in case of slow queries

Value Params
duration

threshold above which queries are considered slow

def printSlowQueries(duration: Duration): OverallWrapper[Console & Clock]

Returns a wrapper that prints slow queries

Returns a wrapper that prints slow queries

Value Params
duration

threshold above which queries are considered slow

def timeout(duration: Duration): OverallWrapper[Clock]

Returns a wrapper that times out queries taking more than a specified time.

Returns a wrapper that times out queries taking more than a specified time.

Value Params
duration

threshold above which queries should be timed out

Concrete fields

lazy val printErrors: OverallWrapper[Console]

Returns a wrapper that prints errors to the console

Returns a wrapper that prints errors to the console