Class DirectiveConstraints


  • @PublicApi
    public class DirectiveConstraints
    extends java.lang.Object
    This contains a map of DirectiveConstraints and helps run them against a specific field or argument

    This ships with a set of standard constraints via STANDARD_CONSTRAINTS but you can add your own implementations if you wish

    • Field Detail

      • STANDARD_CONSTRAINTS

        public static final java.util.List<DirectiveConstraint> STANDARD_CONSTRAINTS
        These are the standard directive rules that come with the system
    • Method Detail

      • getConstraints

        public java.util.Map<java.lang.String,​DirectiveConstraint> getConstraints()
      • getDirectivesSDL

        public java.lang.String getDirectivesSDL()
      • getDirectivesDeclaration

        public graphql.schema.idl.TypeDefinitionRegistry getDirectivesDeclaration()
      • whichApplyTo

        public java.util.List<DirectiveConstraint> whichApplyTo​(graphql.schema.GraphQLFieldDefinition fieldDefinition,
                                                                graphql.schema.GraphQLFieldsContainer fieldsContainer)
      • whichApplyTo

        public java.util.List<DirectiveConstraint> whichApplyTo​(graphql.schema.GraphQLArgument argument,
                                                                graphql.schema.GraphQLFieldDefinition fieldDefinition,
                                                                graphql.schema.GraphQLFieldsContainer fieldsContainer)