Wrappers

caliban.wrappers.Wrappers$
object Wrappers

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Wrappers.type

Members list

Value members

Concrete methods

def logSlowQueries(duration: Duration): OverallWrapper[Any]

Returns a wrapper that logs slow queries

Returns a wrapper that logs slow queries

Value parameters

duration

threshold above which queries are considered slow

Attributes

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 parameters

maxDepth

the max allowed depth

Attributes

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 parameters

maxFields

the max allowed number of fields

Attributes

def metrics(totalLabel: String, durationLabel: String, buckets: Boundaries, extraLabels: Set[MetricLabel]): EffectfulWrapper[Any]

Returns a wrapper that adds field metrics to the query

Returns a wrapper that adds field metrics to the query

Value parameters

buckets

the buckets to use for the duration metric

durationLabel

the name of the duration metric

extraLabels

extra labels to add to the metrics

totalLabel

the name of the total fields metric

Attributes

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

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 parameters

duration

threshold above which queries are considered slow

Attributes

def printSlowQueries(duration: Duration): OverallWrapper[Any]

Returns a wrapper that prints slow queries

Returns a wrapper that prints slow queries

Value parameters

duration

threshold above which queries are considered slow

Attributes

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

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 parameters

duration

threshold above which queries should be timed out

Attributes

Concrete fields

lazy val printErrors: OverallWrapper[Any]

Returns a wrapper that prints errors to the console

Returns a wrapper that prints errors to the console

Attributes