Package graphql.validation.constraints
Class DirectiveConstraints
- java.lang.Object
-
- graphql.validation.constraints.DirectiveConstraints
-
@PublicApi public class DirectiveConstraints extends java.lang.ObjectThis contains a map ofDirectiveConstraints and helps run them against a specific field or argumentThis ships with a set of standard constraints via
STANDARD_CONSTRAINTSbut you can add your own implementations if you wish
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDirectiveConstraints.Builder
-
Field Summary
Fields Modifier and Type Field Description static java.util.List<DirectiveConstraint>STANDARD_CONSTRAINTSThese are the standard directive rules that come with the system
-
Constructor Summary
Constructors Constructor Description DirectiveConstraints(DirectiveConstraints.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,DirectiveConstraint>getConstraints()graphql.schema.idl.TypeDefinitionRegistrygetDirectivesDeclaration()java.lang.StringgetDirectivesSDL()static DirectiveConstraints.BuildernewDirectiveConstraints()java.util.List<DirectiveConstraint>whichApplyTo(graphql.schema.GraphQLArgument argument, graphql.schema.GraphQLFieldDefinition fieldDefinition, graphql.schema.GraphQLFieldsContainer fieldsContainer)java.util.List<DirectiveConstraint>whichApplyTo(graphql.schema.GraphQLFieldDefinition fieldDefinition, graphql.schema.GraphQLFieldsContainer fieldsContainer)
-
-
-
Field Detail
-
STANDARD_CONSTRAINTS
public static final java.util.List<DirectiveConstraint> STANDARD_CONSTRAINTS
These are the standard directive rules that come with the system
-
-
Constructor Detail
-
DirectiveConstraints
public DirectiveConstraints(DirectiveConstraints.Builder builder)
-
-
Method Detail
-
newDirectiveConstraints
public static DirectiveConstraints.Builder newDirectiveConstraints()
-
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)
-
-