Package graphql.validation
Class ValidationUtil
- java.lang.Object
-
- graphql.validation.ValidationUtil
-
- Direct Known Subclasses:
ArgumentValidationUtil
public class ValidationUtil extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ValidationUtil()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.util.Map<java.lang.String,ObjectField>
fieldMap(ObjectValue objectValue)
private java.util.Set<java.lang.String>
getMissingFields(GraphQLInputObjectType type, java.util.Map<java.lang.String,ObjectField> objectFieldMap, GraphqlFieldVisibility fieldVisibility)
TypeName
getUnmodifiedType(Type<?> type)
protected void
handleEnumError(Value<?> value, GraphQLEnumType type, GraphQLError invalid)
protected void
handleExtraFieldError(Value<?> value, GraphQLInputObjectType type, ObjectField objectField)
protected void
handleFieldNotValidError(ObjectField objectField, GraphQLInputObjectType type)
protected void
handleFieldNotValidError(Value<?> value, GraphQLType type, int index)
protected void
handleMissingFieldsError(Value<?> value, GraphQLInputObjectType type, java.util.Set<java.lang.String> missingFields)
protected void
handleNotObjectError(Value<?> value, GraphQLInputObjectType type)
protected void
handleNullError(Value<?> value, GraphQLType type)
protected void
handleScalarError(Value<?> value, GraphQLScalarType type, GraphQLError invalid)
(package private) boolean
isValidLiteralValue(Value<?> value, GraphQLInputObjectType type, GraphQLSchema schema, GraphQLContext graphQLContext, java.util.Locale locale)
private boolean
isValidLiteralValue(Value<?> value, GraphQLList type, GraphQLSchema schema, GraphQLContext graphQLContext, java.util.Locale locale)
boolean
isValidLiteralValue(Value<?> value, GraphQLType type, GraphQLSchema schema, GraphQLContext graphQLContext, java.util.Locale locale)
private java.util.Optional<GraphQLError>
parseLiteral(Value<?> value, Coercing<?,?> coercing, GraphQLContext graphQLContext, java.util.Locale locale)
private java.util.Optional<GraphQLError>
parseLiteralEnum(Value<?> value, GraphQLEnumType graphQLEnumType, GraphQLContext graphQLContext, java.util.Locale locale)
-
-
-
Method Detail
-
handleNullError
protected void handleNullError(Value<?> value, GraphQLType type)
-
handleScalarError
protected void handleScalarError(Value<?> value, GraphQLScalarType type, GraphQLError invalid)
-
handleEnumError
protected void handleEnumError(Value<?> value, GraphQLEnumType type, GraphQLError invalid)
-
handleNotObjectError
protected void handleNotObjectError(Value<?> value, GraphQLInputObjectType type)
-
handleMissingFieldsError
protected void handleMissingFieldsError(Value<?> value, GraphQLInputObjectType type, java.util.Set<java.lang.String> missingFields)
-
handleExtraFieldError
protected void handleExtraFieldError(Value<?> value, GraphQLInputObjectType type, ObjectField objectField)
-
handleFieldNotValidError
protected void handleFieldNotValidError(ObjectField objectField, GraphQLInputObjectType type)
-
handleFieldNotValidError
protected void handleFieldNotValidError(Value<?> value, GraphQLType type, int index)
-
isValidLiteralValue
public boolean isValidLiteralValue(Value<?> value, GraphQLType type, GraphQLSchema schema, GraphQLContext graphQLContext, java.util.Locale locale)
-
parseLiteralEnum
private java.util.Optional<GraphQLError> parseLiteralEnum(Value<?> value, GraphQLEnumType graphQLEnumType, GraphQLContext graphQLContext, java.util.Locale locale)
-
parseLiteral
private java.util.Optional<GraphQLError> parseLiteral(Value<?> value, Coercing<?,?> coercing, GraphQLContext graphQLContext, java.util.Locale locale)
-
isValidLiteralValue
boolean isValidLiteralValue(Value<?> value, GraphQLInputObjectType type, GraphQLSchema schema, GraphQLContext graphQLContext, java.util.Locale locale)
-
getMissingFields
private java.util.Set<java.lang.String> getMissingFields(GraphQLInputObjectType type, java.util.Map<java.lang.String,ObjectField> objectFieldMap, GraphqlFieldVisibility fieldVisibility)
-
fieldMap
private java.util.Map<java.lang.String,ObjectField> fieldMap(ObjectValue objectValue)
-
isValidLiteralValue
private boolean isValidLiteralValue(Value<?> value, GraphQLList type, GraphQLSchema schema, GraphQLContext graphQLContext, java.util.Locale locale)
-
-