trait GraphQL[-R] extends AnyRef
A GraphQL[-R]
represents a GraphQL API whose execution requires a ZIO environment of type R
.
It is intended to be created only once, typically when you start your server. The introspection schema will be generated when this class is instantiated.
- Self Type
- GraphQL[R]
- Alphabetic
- By Inheritance
- GraphQL
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract val queryAnalyzers: List[QueryAnalyzer[R]]
- Attributes
- protected
- abstract val schema: RootSchema[R]
- Attributes
- protected
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- final def check(query: String): IO[CalibanError, Unit]
Parses and validates the provided query against this API.
Parses and validates the provided query against this API.
- query
a string containing the GraphQL query.
- returns
an effect that either fails with a CalibanError or succeeds with
Unit
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def combine[R1 <: R](that: GraphQL[R1]): GraphQL[R1]
Merges this GraphQL API with another GraphQL API.
Merges this GraphQL API with another GraphQL API. In case of conflicts (same field declared on both APIs), fields from
that
API will be used.- that
another GraphQL API object
- returns
a new GraphQL API
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def interpreter: GraphQLInterpreter[R, CalibanError]
Creates an interpreter from your API.
Creates an interpreter from your API. A GraphQLInterpreter is a wrapper around your API that allows adding some middleware around the query execution.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def rename(queriesName: Option[String] = None, mutationsName: Option[String] = None, subscriptionsName: Option[String] = None): GraphQL[R]
Renames the root queries, mutations and subscriptions objects.
Renames the root queries, mutations and subscriptions objects.
- queriesName
a new name for the root queries object
- mutationsName
a new name for the root mutations object
- subscriptionsName
a new name for the root subscriptions object
- returns
a new GraphQL API
- final def render: String
Returns a string that renders the API types into the GraphQL format.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def withQueryAnalyzer[R2 <: R](queryAnalyzer: QueryAnalyzer[R2]): GraphQL[R2]
Attaches a function that will analyze each query before execution, possibly modify or reject it.
Attaches a function that will analyze each query before execution, possibly modify or reject it.
- queryAnalyzer
a function from
Field
toZIO[R, CalibanError, Field]
- returns
a new GraphQL API
- final def |+|[R1 <: R](that: GraphQL[R1]): GraphQL[R1]
Operator alias for
combine
.