graphql.kickstart.tools.resolver.MissingFieldResolver.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graphql-java-tools Show documentation
Show all versions of graphql-java-tools Show documentation
Tools to help map a GraphQL schema to existing Java objects.
package graphql.kickstart.tools.resolver
import graphql.kickstart.tools.MissingResolverInfo
import graphql.kickstart.tools.SchemaParserOptions
import graphql.kickstart.tools.TypeClassMatcher
import graphql.language.FieldDefinition
import graphql.schema.DataFetcher
internal class MissingFieldResolver(
field: FieldDefinition,
options: SchemaParserOptions
) : FieldResolver(field, FieldResolverScanner.Search(Any::class.java, MissingResolverInfo(), null), options, Any::class.java) {
override fun scanForMatches(): List = listOf()
override fun createDataFetcher(): DataFetcher<*> =
options.missingResolverDataFetcher ?: DataFetcher { TODO("Schema resolver not implemented") }
}