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
- All
Abstract Value Members
-
abstract
val
additionalDirectives: List[__Directive]
- 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
@@[R2 <: R](wrapper: Wrapper[R2]): GraphQL[R2]
A symbolic alias for
withWrapper
. -
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @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: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
interpreter: 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
- @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
-
final
def
toDocument: Document
Converts the schema to a Document.
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
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
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
.