graphql.nadel.enginekt.transform.query.NadelNamespacedFields.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.transform.query
import graphql.nadel.schema.NadelDirectives.namespacedDirectiveDefinition
import graphql.normalized.ExecutableNormalizedField
import graphql.schema.GraphQLSchema
object NadelNamespacedFields {
fun isNamespacedField(overallField: ExecutableNormalizedField, schema: GraphQLSchema): Boolean {
return overallField
.getFieldDefinitions(schema)
.any {
it.hasAppliedDirective(namespacedDirectiveDefinition.name)
}
}
}