All Downloads are FREE. Search and download functionalities are using the official Maven repository.

graphql.nadel.instrumentation.parameters.NadelInstrumentationQueryValidationParameters.kt Maven / Gradle / Ivy

Go to download

Nadel is a Java library that combines multiple GrahpQL services together into one API.

There is a newer version: 2024-11-20T03-31-21-302962b7
Show newest version
package graphql.nadel.instrumentation.parameters

import graphql.ExecutionInput
import graphql.execution.instrumentation.InstrumentationState
import graphql.language.Document
import graphql.schema.GraphQLSchema

/**
 * Parameters sent to [graphql.nadel.instrumentation.NadelInstrumentation] methods
 */
data class NadelInstrumentationQueryValidationParameters(
    val executionInput: ExecutionInput,
    val document: Document,
    val schema: GraphQLSchema,
    private val instrumentationState: InstrumentationState?,
    private val context: Any?,
){
    fun  getContext(): T? {
        @Suppress("UNCHECKED_CAST") // trust the caller
        return context as T?
    }

    fun  getInstrumentationState(): T? {
        @Suppress("UNCHECKED_CAST") // trust the caller
        return instrumentationState as T?
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy