GraphQL
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.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
GraphQL[R]
Members list
Value members
Concrete methods
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.
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.
Value parameters
- aspect
-
A wrapper type that will be applied to this GraphQL
Attributes
- Returns
-
A new 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.
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.
Value parameters
- that
-
another GraphQL API object
Attributes
- Returns
-
a new GraphQL 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.
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.
Attributes
- See also
-
interpreterEither for a variant that returns an Either instead, making it easier to embed in non-ZIO applications
Impure variant of interpreterEither which throws schema validation errors. Useful for cases that the schema is known to be valid or when we're not planning on handling the error (e.g., during app startup)
Impure variant of interpreterEither which throws schema validation errors. Useful for cases that the schema is known to be valid or when we're not planning on handling the error (e.g., during app startup)
Attributes
Renames the root queries, mutations and subscriptions objects.
Renames the root queries, mutations and subscriptions objects.
Value parameters
- mutationsName
-
a new name for the root mutations object
- queriesName
-
a new name for the root queries object
- subscriptionsName
-
a new name for the root subscriptions object
Attributes
- Returns
-
a new GraphQL API
Returns a string that renders the API types into the GraphQL SDL.
Returns a string that renders the API types into the GraphQL SDL.
Attributes
Converts the schema to a Document.
Converts the schema to a Document.
Attributes
Transforms the schema using the given transformer. This can be used to rename or filter types, fields and arguments.
Transforms the schema using the given transformer. This can be used to rename or filter types, fields and arguments.
Attributes
Adds linking to additional types which are unreachable from the root query.
Adds linking to additional types which are unreachable from the root query.
Value parameters
- types
-
The type definitions to add.
Attributes
- Note
-
This is for advanced usage only i.e. when declaring federation type links
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).
Value parameters
- wrapper
-
a wrapping function
Attributes
- Returns
-
a new GraphQL API
Abstract fields
Concrete fields
Creates an interpreter from your API. A GraphQLInterpreter is a wrapper around your API that allows adding some middleware around the query execution. Returns a Left containing the schema validation error if the schema is invalid.
Creates an interpreter from your API. A GraphQLInterpreter is a wrapper around your API that allows adding some middleware around the query execution. Returns a Left containing the schema validation error if the schema is invalid.
Attributes
- See also
-
interpreter for a ZIO variant of this method that makes it easier to embed in ZIO applications
interpreterUnsafe of an unsafe variant that will throw validation errors