ExecutableSchema

class ExecutableSchema(schema: Schema, coercings: Map<String, Coercing<*>>, queryRoot: RootResolver?, mutationRoot: RootResolver?, subscriptionRoot: RootResolver?, resolver: Resolver, typeResolver: TypeResolver, instrumentations: List<Instrumentation>, persistedDocumentCache: PersistedDocumentCache?)

A GraphQL schema with execution information:

  • root values

  • coercings

  • resolver

ExecutableSchema also includes handling for persisted documents. This part is not technically part of the main GraphQL spec but is popular that we add first party support to it.

Constructors

Link copied to clipboard
constructor(schema: Schema, coercings: Map<String, Coercing<*>>, queryRoot: RootResolver?, mutationRoot: RootResolver?, subscriptionRoot: RootResolver?, resolver: Resolver, typeResolver: TypeResolver, instrumentations: List<Instrumentation>, persistedDocumentCache: PersistedDocumentCache?)

Types

Link copied to clipboard
class Builder

Functions

Link copied to clipboard
suspend fun execute(request: GraphQLRequest, executionContext: ExecutionContext = ExecutionContext.Empty): GraphQLResponse
Link copied to clipboard
fun subscribe(request: GraphQLRequest, executionContext: ExecutionContext = ExecutionContext.Empty): Flow<SubscriptionEvent>