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 additionalDirectives: List[__Directive]
- Attributes
- protected
- abstract val features: Set[Feature]
- Attributes
- protected
- abstract val schemaBuilder: RootSchemaBuilder[R]
- Attributes
- protected
- abstract val wrappers: List[Wrapper[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 @@[LowerR <: UpperR, UpperR <: R](aspect: GraphQLAspect[LowerR, UpperR]): GraphQL[UpperR]
Attaches an aspect that will wrap the entire GraphQL so that it can be manipulated.
Attaches an aspect that will wrap the entire GraphQL so that it can be manipulated. This method is a higher-level abstraction of withWrapper which allows the caller to completely replace or change all aspects of the schema.
- aspect
A wrapper type that will be applied to this GraphQL
- returns
A new GraphQL API
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @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 enable(feature: Feature): GraphQL[R]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def interpreter(implicit trace: Trace): IO[ValidationError, 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. Fails with a caliban.CalibanError.ValidationError if the schema is invalid.
- 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
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @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 SDL.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def toDocument: Document
Converts the schema to a Document.
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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 wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def withAdditionalDirectives(directives: List[__Directive]): GraphQL[R]
- final def withAdditionalTypes(types: List[__Type]): GraphQL[R]
Adds linking to additional types which are unreachable from the root query.
Adds linking to additional types which are unreachable from the root query.
- types
The type definitions to add.
- Note
This is for advanced usage only i.e. when declaring federation type links
- final def withSchemaDirectives(directives: List[Directive]): GraphQL[R]
- final def withWrapper[R2 <: R](wrapper: Wrapper[R2]): GraphQL[R2]
Attaches a function that will wrap one of the stages of query processing (parsing, validation, execution, field execution or overall).
Attaches a function that will wrap one of the stages of query processing (parsing, validation, execution, field execution or overall).
- wrapper
a wrapping function
- returns
a new GraphQL API
- final def |+|[R1 <: R](that: GraphQL[R1]): GraphQL[R1]
Operator alias for
combine
.
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)