public class NoopSchemaGeneratorHooks implements SchemaGeneratorHooks
Constructor and Description |
---|
NoopSchemaGeneratorHooks() |
Modifier and Type | Method and Description |
---|---|
graphql.schema.DataFetcher<?> |
didGenerateDataFetcher(kotlin.reflect.KFunction<?> function,
graphql.schema.DataFetcher<?> dataFetcher)
Called after converting the function to a data fetcher allowing wrapping the fetcher to modify data or instrument it.
This is more useful than the graphql.execution.instrumentation.Instrumentation as you have the function type here
|
void |
didGenerateGraphQLType(kotlin.reflect.KType type,
graphql.schema.GraphQLType generatedType)
Called after wrapping the type based on nullity but before adding the generated type to the schema
|
graphql.schema.GraphQLFieldDefinition |
didGenerateMutationType(kotlin.reflect.KFunction<?> function,
graphql.schema.GraphQLFieldDefinition fieldDefinition)
Called after converting the function to a field definition but before adding to the schema to allow customization
|
graphql.schema.GraphQLFieldDefinition |
didGenerateQueryType(kotlin.reflect.KFunction<?> function,
graphql.schema.GraphQLFieldDefinition fieldDefinition)
Called after converting the function to a field definition but before adding to the schema to allow customization
|
boolean |
isValidFunction(kotlin.reflect.KFunction<?> function)
Called when looking at the KClass functions to determine if it valid for adding to the generated schema.
If any filter returns false, it is rejected.
|
boolean |
isValidProperty(kotlin.reflect.KProperty<?> property)
Called when looking at the KClass properties to determine if it valid for adding to the generated schema.
If any filter returns false, it is rejected.
|
graphql.schema.GraphQLSchema.Builder |
willBuildSchema(graphql.schema.GraphQLSchema.Builder builder)
Called before the final GraphQL schema is built.
This doesn't prevent the called from rebuilding the final schema using java-graphql's functionality
|
graphql.schema.GraphQLType |
willGenerateGraphQLType(kotlin.reflect.KType type)
Called before using reflection to generate the graphql object type for the given KType.
This allows supporting objects that the caller does not want to use reflection on for special handling
|
didGenerateDataFetcher, didGenerateGraphQLType, didGenerateMutationType, didGenerateQueryType, isValidFunction, isValidProperty, willBuildSchema, willGenerateGraphQLType
public graphql.schema.GraphQLSchema.Builder willBuildSchema(graphql.schema.GraphQLSchema.Builder builder)
Called before the final GraphQL schema is built. This doesn't prevent the called from rebuilding the final schema using java-graphql's functionality
public graphql.schema.GraphQLType willGenerateGraphQLType(kotlin.reflect.KType type)
Called before using reflection to generate the graphql object type for the given KType. This allows supporting objects that the caller does not want to use reflection on for special handling
public boolean isValidProperty(kotlin.reflect.KProperty<?> property)
Called when looking at the KClass properties to determine if it valid for adding to the generated schema. If any filter returns false, it is rejected.
public boolean isValidFunction(kotlin.reflect.KFunction<?> function)
Called when looking at the KClass functions to determine if it valid for adding to the generated schema. If any filter returns false, it is rejected.
public void didGenerateGraphQLType(kotlin.reflect.KType type, graphql.schema.GraphQLType generatedType)
Called after wrapping the type based on nullity but before adding the generated type to the schema
public graphql.schema.DataFetcher<?> didGenerateDataFetcher(kotlin.reflect.KFunction<?> function, graphql.schema.DataFetcher<?> dataFetcher)
Called after converting the function to a data fetcher allowing wrapping the fetcher to modify data or instrument it. This is more useful than the graphql.execution.instrumentation.Instrumentation as you have the function type here
public graphql.schema.GraphQLFieldDefinition didGenerateQueryType(kotlin.reflect.KFunction<?> function, graphql.schema.GraphQLFieldDefinition fieldDefinition)
Called after converting the function to a field definition but before adding to the schema to allow customization
public graphql.schema.GraphQLFieldDefinition didGenerateMutationType(kotlin.reflect.KFunction<?> function, graphql.schema.GraphQLFieldDefinition fieldDefinition)
Called after converting the function to a field definition but before adding to the schema to allow customization