9
9
This library provides extended validation of fields and field arguments for [ graphql-java] ( https://github.com/graphql-java/graphql-java )
10
10
11
11
12
- # Status
12
+ # Using
13
13
14
- This code is currently under construction. It is fairly complete in providing powerful validation
15
- but as it has NOT been consumed by a production like project then its API usefulness has not been tested
16
- and battle tested.
17
-
18
- But the project welcomes all feedback and input on code design and validation requirements.
19
14
20
15
``` xml
21
16
<dependency >
@@ -37,7 +32,7 @@ compile 'com.graphql-java:graphql-java-extended-validation:14.0.1'
37
32
> use 14.0.1 or above for graphql-java 14.x and above
38
33
39
34
40
- Its currently available from JCenter repo and Maven central is pending .
35
+ Its currently available from JCenter repo and Maven central.
41
36
42
37
43
38
# SDL @Directive constraints
@@ -390,7 +385,7 @@ The String must contain at least one non-whitespace character, according to Java
390
385
391
386
- Example : ` updateAccident( accidentNotes : String @NotBlank) : DriverDetails `
392
387
393
- - Applies to : ` String `
388
+ - Applies to : ` String ` , ` ID `
394
389
395
390
- SDL : ` directive @NotBlank(message : String = "graphql.validation.NotBlank.message") on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION `
396
391
@@ -403,7 +398,7 @@ The element must have a non zero size.
403
398
404
399
- Example : ` updateAccident( accidentNotes : [Notes]! @NotEmpty) : DriverDetails `
405
400
406
- - Applies to : ` String ` , ` Lists ` , ` Input Objects `
401
+ - Applies to : ` String ` , ` ID ` , ` Lists ` , ` Input Objects `
407
402
408
403
- SDL : ` directive @NotEmpty(message : String = "graphql.validation.NotEmpty.message") on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION `
409
404
@@ -414,9 +409,9 @@ The element must have a non zero size.
414
409
415
410
The String must match the specified regular expression, which follows the Java regular expression conventions.
416
411
417
- - Example : ` updateDriver( licencePlate : String @Patttern(regex : "[A-Z][A-Z][A-Z]-[0-9][0-9][0-9]") : DriverDetails `
412
+ - Example : ` updateDriver( licencePlate : String @Pattern(regexp : "[A-Z][A-Z][A-Z]-[0-9][0-9][0-9]") : DriverDetails `
418
413
419
- - Applies to : ` String ` , ` Lists `
414
+ - Applies to : ` String ` , ` ID ` , ` Lists `
420
415
421
416
- SDL : ` directive @Pattern(regexp : String! =".*", message : String = "graphql.validation.Pattern.message") on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION `
422
417
@@ -468,7 +463,7 @@ The element size must be between the specified `min` and `max` boundaries (inclu
468
463
469
464
- Example : ` updateDrivingNotes( drivingNote : String @Size( min : 1000, max : 100000)) : DriverDetails `
470
465
471
- - Applies to : ` String ` , ` Lists ` , ` Input Objects `
466
+ - Applies to : ` String ` , ` ID ` , ` Lists ` , ` Input Objects `
472
467
473
468
- SDL : ` directive @Size(min : Int = 0, max : Int = 2147483647, message : String = "graphql.validation.Size.message") on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION `
474
469
0 commit comments