Caching

caliban.wrappers.Caching
object Caching

Attributes

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

Members list

Type members

Classlikes

case class CacheHint(maxAge: Option[Duration], scope: Option[CacheScope], inheritMaxAge: Boolean)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
object CacheHint

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
CacheHint.type
case class CachePolicy(hint: CacheHint)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object CacheScope

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
CacheScope.type
sealed trait CacheScope

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Private.type
object Public.type
case class CacheSettings(defaultMaxAge: Duration, defaultScope: CacheScope, toHeader: CachePolicy => String)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object CacheSettings

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class GQLCacheControl(maxAge: Option[Duration], scope: Option[CacheScope], inheritMaxAge: Boolean) extends GQLDirective

Assigns a cache hint to a field or a type

Assigns a cache hint to a field or a type

Value parameters

inheritMaxAge

Whether the maxAge should be inherited from the parent type

maxAge

The maximum duration that this field should be cached for

scope

The scope of that should be applied to the cache

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class GQLDirective
trait StaticAnnotation
class Annotation
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def aspect[R](output: Ref[CachePolicy] => Wrapper[R]): GraphQLAspect[Nothing, R]
def disableCaching: UIO[Unit]

Disables caching for the current query

Disables caching for the current query

Attributes

def extension(settings: CacheSettings): GraphQLAspect[Nothing, Any]

Computes the total cache policy for a query and stores it in the extensions of the response. The result can then be used by http adapters to set the appropriate cache headers.

Computes the total cache policy for a query and stores it in the extensions of the response. The result can then be used by http adapters to set the appropriate cache headers.

Attributes

def setCacheHint(hint: CacheHint): UIO[Unit]

Overrides the cache hint for a particular field. This can be used to dynamically set the cache hint within a resolver

Overrides the cache hint for a particular field. This can be used to dynamically set the cache hint within a resolver

Attributes

Concrete fields

val DirectiveName: String
val InheritMaxAgeName: String
val MaxAgeName: String
val ScopeName: String