DefaultGraphQLModule

Default Guice module for GraphQL applications. Sets up the GraphQL resource and GraphiQL assets, and provides a GraphQL instance given configured bindings.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
var binder: Binder

Functions

Link copied to clipboard
protected open fun addError(message: Message)
protected open fun addError(t: Throwable)
protected open fun addError(message: String, vararg arguments: Any)
Link copied to clipboard
fun adminServletBinder(): KotlinMultibinder<ServletConfig>
Link copied to clipboard
fun appServletBinder(): KotlinMultibinder<ServletConfig>
Link copied to clipboard
fun authFilterBinder(): KotlinOptionalBinder<AuthFilter<*, *>>
Link copied to clipboard
fun authorizerBinder(): KotlinOptionalBinder<Authorizer<Principal>>
Link copied to clipboard
protected open fun <T : Any> bind(key: Key<T>): LinkedBindingBuilder<T>
protected open fun <T : Any> bind(typeLiteral: TypeLiteral<T>): AnnotatedBindingBuilder<T>
protected open fun <T : Any> bind(clazz: Class<T>): AnnotatedBindingBuilder<T>
Link copied to clipboard
protected open fun bindConstant(): AnnotatedConstantBindingBuilder
Link copied to clipboard
protected open fun binder(): Binder
Link copied to clipboard
protected open fun bindInterceptor(classMatcher: Matcher<in Class<*>>, methodMatcher: Matcher<in Method>, vararg interceptors: MethodInterceptor)
Link copied to clipboard
protected open fun bindListener(bindingMatcher: Matcher<in Binding<*>>, vararg listener: ProvisionListener)
protected open fun bindListener(typeMatcher: Matcher<in TypeLiteral<*>>, listener: TypeListener)
Link copied to clipboard
protected open fun bindScope(scopeAnnotation: Class<out Annotation>, scope: Scope)
Link copied to clipboard
override fun configure(builder: Binder)
protected override fun configure()
Link copied to clipboard
open override fun configureApplication()

Configure application bindings here

Link copied to clipboard
protected open fun convertToTypes(typeMatcher: Matcher<in TypeLiteral<*>>, converter: TypeConverter)
Link copied to clipboard
protected open fun currentStage(): Stage
Link copied to clipboard
fun dataFetcherExceptionHandlerBinder(): KotlinOptionalBinder<DataFetcherExceptionHandler>

Optional binder for specifying a DataFetcherExceptionHandler to be used by queries, mutations, and subscriptions to handle errors. Defaults to one that skips printing of exception stack traces.

Link copied to clipboard
fun dataLoaderRegistryFactoryBinder(): KotlinOptionalBinder<KotlinDataLoaderRegistryFactory>

Optional binder for the dataLoaderRegistryFactory

Link copied to clipboard
fun environmentCallbackBinder(): KotlinMultibinder<EnvironmentCallback>
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
protected open fun <T : Any> getMembersInjector(type: TypeLiteral<T>): MembersInjector<T>
protected open fun <T : Any> getMembersInjector(type: Class<T>): MembersInjector<T>
Link copied to clipboard
protected open fun <T : Any> getProvider(key: Key<T>): Provider<T>
protected open fun <T : Any> getProvider(type: Class<T>): Provider<T>
Link copied to clipboard
fun graphQLInstrumentationsBinder(): KotlinMultibinder<Instrumentation>

Binder for graphql Instrumentations. RequestIdInstrumentation will be registered by default, but additional ones can be registered via this binder.

Link copied to clipboard
fun graphQLMutationsBinder(): KotlinMultibinder<Any>

Binder for graphql mutations

Link copied to clipboard
fun graphQLPackagesBinder(): KotlinMultibinder<String>

Binder for graphql packages

Link copied to clipboard
fun graphQLQueriesBinder(): KotlinMultibinder<Any>

Binder for graphql queries

Link copied to clipboard
fun graphQLSubscriptionsBinder(): KotlinMultibinder<Any>

Binder for graphql subscriptions

Link copied to clipboard

Optional binder for the graphQLWebSocketAuthenticator

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
protected open fun install(module: Module)
Link copied to clipboard
@Provides
fun provideGraphQLInstance(@Named(value = "graphQLPackages") graphQLPackages: Set<String>, @Named(value = "graphQLQueries") queries: Set<Any>, @Named(value = "graphQLMutations") mutations: Set<Any>, @Named(value = "graphQLSubscriptions") subscriptions: Set<Any>, instrumentations: Set<Instrumentation>, hooks: LeakyCauldronHooks = LeakyCauldronHooks(), exceptionHandler: DataFetcherExceptionHandler = CustomDataFetcherExceptionHandler()): GraphQL
Link copied to clipboard
protected open fun requestInjection(instance: Any)
protected open fun <T : Any> requestInjection(type: TypeLiteral<T>, instance: T)
Link copied to clipboard
protected open fun requestStaticInjection(vararg types: Class<*>)
Link copied to clipboard
protected open fun requireBinding(key: Key<*>)
protected open fun requireBinding(type: Class<*>)
Link copied to clipboard
fun resourceBinder(): KotlinMultibinder<Any>
Link copied to clipboard
fun schemaDirectivesBinder(): KotlinMapBinder<String, KotlinSchemaDirectiveWiring>

Binder for Schema Directives. By default an "auth" directive is registered; additional schema directives can be registered via this binder.