Class ValidationSchemaWiring

  • All Implemented Interfaces:
    graphql.schema.idl.SchemaDirectiveWiring

    @PublicApi
    public class ValidationSchemaWiring
    extends java.lang.Object
    implements graphql.schema.idl.SchemaDirectiveWiring
    A SchemaDirectiveWiring that can be used to inject validation rules into the data fetchers when the graphql schema is being built. It will use the validation rules and ask each one of they apply to the field and or its arguments.

    If there are rules that apply then it will it will change the DataFetcher of that field so that rules get run BEFORE the original field fetch is run.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      graphql.schema.GraphQLFieldDefinition onField​(graphql.schema.idl.SchemaDirectiveWiringEnvironment<graphql.schema.GraphQLFieldDefinition> env)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface graphql.schema.idl.SchemaDirectiveWiring

        onArgument, onEnum, onEnumValue, onInputObjectField, onInputObjectType, onInterface, onObject, onScalar, onUnion
    • Constructor Detail

      • ValidationSchemaWiring

        public ValidationSchemaWiring​(ValidationRules ruleCandidates)
    • Method Detail

      • onField

        public graphql.schema.GraphQLFieldDefinition onField​(graphql.schema.idl.SchemaDirectiveWiringEnvironment<graphql.schema.GraphQLFieldDefinition> env)
        Specified by:
        onField in interface graphql.schema.idl.SchemaDirectiveWiring