kgraphql / com.apurebase.kgraphql.schema.dsl / PropertyDSL

PropertyDSL

class PropertyDSL<T : Any, R> : LimitedAccessItemDSL<T>, Target

Constructors

<init>

PropertyDSL(name: String, block: PropertyDSL<T, R>.() -> Unit)

Properties

name

val name: String

Functions

accessRule

fun accessRule(rule: (T, Context) -> Exception?): Unit

addInputValues

fun addInputValues(inputValues: Collection<InputValueDef<*>>): Unit

resolver

fun resolver(function: suspend (T) -> R): ResolverDSL
fun <E> resolver(function: suspend (T, E) -> R): ResolverDSL
fun <E, W> resolver(function: suspend (T, E, W) -> R): ResolverDSL
fun <E, W, Q> resolver(function: suspend (T, E, W, Q) -> R): ResolverDSL
fun <E, W, Q, A> resolver(function: suspend (T, E, W, Q, A) -> R): ResolverDSL
fun <E, W, Q, A, S> resolver(function: suspend (T, E, W, Q, A, S) -> R): ResolverDSL

setReturnType

fun setReturnType(type: KType): Unit

toKQLProperty

fun toKQLProperty(): Function<T, R>