Skip to content

Commit 3870469

Browse files
committed
Tweaked doc and readme
1 parent b3bafa1 commit 3870469

File tree

3 files changed

+25
-13
lines changed

3 files changed

+25
-13
lines changed

readme.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,7 @@ the `name` field must be at least 3 characters long and no more than 100 charact
4848

4949
## The supplied constraints
5050

51-
### @Arguments
52-
53-
The provided expression must evaluate to true.
54-
55-
- Example : `drivers( first : Int, after : String!, last : Int, before : String)
56-
: DriverConnection @Arguments(expression : "${args.containsOneOf('first','last') }"`
57-
58-
- Applies to : `Output Fields`
59-
60-
- SDL : `directive @Arguments(expression : String!, message : String = "graphql.validation.Arguments.message") on FIELD_DEFINITION`
61-
62-
- Message : `graphql.validation.Arguments.message`
63-
51+
<!-- generated by DocHelper on 2019-08-17T11:14:09.722Z -->
6452

6553
### @AssertFalse
6654

@@ -127,6 +115,20 @@ The element must be a number inside the specified `integer` and `fraction` range
127115
- Message : `graphql.validation.Digits.message`
128116

129117

118+
### @Expression
119+
120+
The provided expression must evaluate to true.
121+
122+
- Example : `drivers( first : Int, after : String!, last : Int, before : String)
123+
: DriverConnection @Expression(value : "${args.containsOneOf('first','last') }"`
124+
125+
- Applies to : `All Types and Scalars`
126+
127+
- SDL : `directive @Expression(value : String!, message : String = "graphql.validation.Expression.message") on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION`
128+
129+
- Message : `graphql.validation.Expression.message`
130+
131+
130132
### @Max
131133

132134
The element must be a number whose value must be less than or equal to the specified maximum.
@@ -268,3 +270,5 @@ The element size must be between the specified `min` and `max` boundaries (inclu
268270
- SDL : `directive @Size(min : Int = 0, max : Int = 2147483647, message : String = "graphql.validation.Size.message") on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION`
269271

270272
- Message : `graphql.validation.Size.message`
273+
274+
<!-- --- -->

src/test/groovy/graphql/validation/DocHelper.groovy

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ package graphql.validation
33
import graphql.validation.constraints.DirectiveConstraint
44
import graphql.validation.constraints.DirectiveConstraints
55

6+
import java.time.Instant
7+
68

79
/**
810
* Useful for printing out the readme.md
@@ -11,7 +13,11 @@ class DocHelper {
1113

1214
static void main(String[] args) {
1315
ArrayList<DirectiveConstraint> standardRules = sorted()
16+
17+
PrintStream out = System.out
18+
out.printf("""\n\n<!-- generated by DocHelper on ${Instant.now()} -->\n""")
1419
standardRules.forEach({ it -> printConstraint(it) })
20+
out.printf("""<!-- --- -->\n""")
1521

1622
}
1723

src/test/groovy/graphql/validation/el/ELSupportTest.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package graphql.validation.el
22

3+
34
import spock.lang.Specification
45
import spock.lang.Unroll
56

@@ -47,6 +48,7 @@ class ELSupportTest extends Specification {
4748

4849
}
4950

51+
@Unroll
5052
def "basic expression support"() {
5153
def el = new ELSupport(Locale.getDefault())
5254

0 commit comments

Comments
 (0)