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

graphql.nadel.enginekt.document.DocumentPredicates.kt Maven / Gradle / Ivy

Go to download

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
            }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy