graphql.nadel.enginekt.document.DocumentPredicates.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nadel-engine-nextgen Show documentation
Show all versions of nadel-engine-nextgen Show documentation
Nadel is a Java library that combines multiple GrahpQL services together into one API.
The newest version!
package graphql.nadel.enginekt.document
import graphql.normalized.VariablePredicate
class DocumentPredicates {
companion object {
/**
* A predicate that causes JSON arguments to be compiled as variables
*/
val jsonPredicate =
VariablePredicate { _, _, normalizedInputValue ->
"JSON" == normalizedInputValue.unwrappedTypeName && normalizedInputValue.value != null
}
/**
* A predicate that causes ALL arguments to be compiled as variables
*/
val allVariablesPredicate =
VariablePredicate { _, _, _ ->
true
}
}
}