QuickAdapter

caliban.QuickAdapter
See theQuickAdapter companion object
final class QuickAdapter[-R]

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def configure(config: ExecutionConfiguration)(implicit trace: Trace): QuickAdapter[R]
def configure[R1](configurator: Configurator[R1])(implicit trace: Trace): QuickAdapter[R & R1]
def configureWebSocket[R1](config: WebSocketConfig[R1]): QuickAdapter[R & R1]
def runServer(port: Int, apiPath: String, graphiqlPath: Option[String], uploadPath: Option[String], webSocketPath: Option[String])(implicit trace: Trace): RIO[R, Nothing]

Runs the server using the default zio-http server configuration on the specified port. This is meant as a convenience method for getting started quickly

Runs the server using the default zio-http server configuration on the specified port. This is meant as a convenience method for getting started quickly

Value parameters

apiPath

The route to serve the API on, e.g., /api/graphql

graphiqlPath

Optionally define a route to serve the GraphiQL UI on, e.g., /graphiql

port

The port to serve the API on

uploadPath

The route where files can be uploaded, e.g., /upload/graphql. If None, uploads will be disabled.

webSocketPath

The path where websocket requests will be set. If None, websocket-based subscriptions will be disabled.

Attributes

def toApp(apiPath: String, graphiqlPath: Option[String], uploadPath: Option[String], webSocketPath: Option[String]): HttpApp[R]

Converts this adapter to an HttpApp serving the GraphQL API at the specified path.

Converts this adapter to an HttpApp serving the GraphQL API at the specified path.

Value parameters

apiPath

The path where the GraphQL API will be served.

graphiqlPath

The path where the GraphiQL UI will be served. If None, GraphiQL will not be served.

uploadPath

The path where files can be uploaded. If None, uploads will be disabled.

webSocketPath

The path where websocket requests will be set. If None, websocket-based subscriptions will be disabled.

Attributes

Concrete fields

Converts this adapter to a QuickHandlers which contains zio.http.RequestHandlers for manually constructing zio-http routes

Converts this adapter to a QuickHandlers which contains zio.http.RequestHandlers for manually constructing zio-http routes

Attributes

Deprecated fields

lazy val handler: RequestHandler[R, Nothing]

Attributes

Deprecated
true