jvmMain.graphql.GraphInputContext.kt Maven / Gradle / Ivy
The newest version!
package io.fluidsonic.raptor
// TODO
//
//internal class GraphInputContext(
// private val arguments: Map,
// private val definitions: Collection,
// private val system: GraphSystem,
// private val environment: RaptorGraphScope
//) {
//
//
//
//
// inline fun useBlocking(block: () -> Result): Result {
// val parentContext = threadLocalContext.get()
// threadLocalContext.set(this)
//
// try {
// return block()
// }
// finally {
// threadLocalContext.set(parentContext)
// }
// }
//
//
// companion object {
//
// private val threadLocalContext = ThreadLocal()
//
//
// val current
// get() = threadLocalContext.get()
// ?: error("GraphInputContext.current can only be used in code wrapped by GraphInputContext.use/useBlocking { … }")
// // TODO This error is actually raised if you try to access an input object argument by delegate outside of the factory. Improve detection/error message here!
// }
//}