Skip to content

Commit 75e0b07

Browse files
committed
Better doco for expressions
1 parent 6328ece commit 75e0b07

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

readme.md

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

5353
## The supplied constraints
5454

55-
<!-- generated by DocHelper on 2019-08-17T11:14:09.722Z -->
55+
<!-- generated by DocHelper on 2019-08-17T11:55:22.933Z -->
5656

5757
### @AssertFalse
5858

@@ -121,7 +121,7 @@ The element must be a number inside the specified `integer` and `fraction` range
121121

122122
### @Expression
123123

124-
The provided expression must evaluate to true.
124+
The provided expression must evaluate to true. The expression language is <a href="https://javaee.github.io/tutorial/jsf-el001.html">Java EL</a> and expressions MUST resolve to a boolean value, ie. it is valid or not.
125125

126126
- Example : `drivers( first : Int, after : String!, last : Int, before : String)
127127
: DriverConnection @Expression(value : "${args.containsOneOf('first','last') }"`
@@ -275,4 +275,4 @@ The element size must be between the specified `min` and `max` boundaries (inclu
275275

276276
- Message : `graphql.validation.Size.message`
277277

278-
<!-- --- -->
278+
<!-- end -->

src/main/java/graphql/validation/constraints/standard/ExpressionConstraint.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ public Documentation getDocumentation() {
2727
return Documentation.newDocumentation()
2828
.messageTemplate(getMessageTemplate())
2929

30-
.description("The provided expression must evaluate to true.")
30+
.description("The provided expression must evaluate to true. " +
31+
"The expression language is <a href=\"https://javaee.github.io/tutorial/jsf-el001.html\">Java EL</a> " +
32+
"and expressions MUST resolve to a boolean value, ie. it is valid or not.")
3133

3234
.example("drivers( first : Int, after : String!, last : Int, before : String) \n" +
3335
" : DriverConnection @Expression(value : \"${args.containsOneOf('first','last') }\"")

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class DocHelper {
1717
PrintStream out = System.out
1818
out.printf("""\n\n<!-- generated by DocHelper on ${Instant.now()} -->\n""")
1919
standardRules.forEach({ it -> printConstraint(it) })
20-
out.printf("""<!-- --- -->\n""")
20+
out.printf("""<!-- end -->\n""")
2121

2222
}
2323

0 commit comments

Comments
 (0)