Viaduct

interface Viaduct(source)

The main entry point for executing GraphQL operations against the Viaduct runtime.

Instances are created via viaduct.service.ViaductBuilder (for full SPI control) or viaduct.service.BasicViaductFactory (for simpler use cases). A typical integration creates a single Viaduct instance at startup and routes incoming GraphQL requests through execute or executeAsync.

Functions

Link copied to clipboard
abstract suspend fun execute(executionInput: ExecutionInput, schemaId: SchemaId = SchemaId.Base): ExecutionResult

Executes an operation on this Viaduct instance, suspending until it completes.

Link copied to clipboard

Executes an operation against SchemaId.Base on the ForkJoinPool.commonPool.

Executes an operation against schemaId on the ForkJoinPool.commonPool.

abstract fun executeAsync(executionInput: ExecutionInput, schemaId: SchemaId, executor: Executor): CompletableFuture<ExecutionResult>

Executes an operation on this Viaduct instance asynchronously, returning a CompletableFuture.

Link copied to clipboard
abstract fun getAppliedScopes(schemaId: SchemaId): Set<String>?

Returns the set of scope IDs applied to the given schemaId, or null if no scopes are configured for it.