This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch CAUSEWAY-3676
in repository https://gitbox.apache.org/repos/asf/causeway.git
The following commit(s) were added to refs/heads/CAUSEWAY-3676 by this push:
new a54ec68724 CAUSEWAY-3676: adds boolean tests
a54ec68724 is described below
commit a54ec68724276a854bc0af2a729a1194e4739f75
Author: danhaywood <[email protected]>
AuthorDate: Fri Jan 26 14:07:08 2024 +0000
CAUSEWAY-3676: adds boolean tests
---
.../viewer/graphql/model/types/TypeMapper.java | 7 +
.../viewer/test/domain/calc/Calculator.java | 47 +-
...=> Calculator_IntegTest.add_big_decimals._.gql} | 2 +-
...ulator_IntegTest.add_big_decimals.approved.json | 0
...=> Calculator_IntegTest.add_big_integers._.gql} | 2 +-
...ulator_IntegTest.add_big_integers.approved.json | 0
.../e2e/Calculator_IntegTest.add_doubles._.gql | 7 +
...Calculator_IntegTest.add_doubles.approved.json} | 4 +-
..._.gql => Calculator_IntegTest.add_floats._.gql} | 4 +-
.../Calculator_IntegTest.add_floats.approved.json | 0
...gql => Calculator_IntegTest.add_integers._.gql} | 2 +-
...alculator_IntegTest.add_integers.approved.json} | 2 +-
...ql => Calculator_IntegTest.boolean_and_1._.gql} | 4 +-
...lculator_IntegTest.boolean_and_1.approved.json} | 4 +-
...ql => Calculator_IntegTest.boolean_and_2._.gql} | 4 +-
...lculator_IntegTest.boolean_and_2.approved.json} | 4 +-
....gql => Calculator_IntegTest.boolean_not._.gql} | 4 +-
...Calculator_IntegTest.boolean_not.approved.json} | 4 +-
...gql => Calculator_IntegTest.boolean_or_1._.gql} | 4 +-
...alculator_IntegTest.boolean_or_1.approved.json} | 4 +-
...gql => Calculator_IntegTest.boolean_or_2._.gql} | 4 +-
...alculator_IntegTest.boolean_or_2.approved.json} | 4 +-
.../viewer/test/e2e/Calculator_IntegTest.java | 91 +++-
.../test/e2e/Calculator_IntegTest.plus_days._.gql | 7 +
.../Calculator_IntegTest.plus_days.approved.json | 0
.../viewer/test/schema/Schema_IntegTest.java | 4 +-
.../schema/Schema_IntegTest.schema.approved.json | 603 ++++++++++++++++++++-
...chema_IntegTest.schema_types_name.approved.json | 26 +-
.../graphql/test/src/test/resources/schema.gql | 217 +++++++-
29 files changed, 1013 insertions(+), 52 deletions(-)
diff --git
a/incubator/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/types/TypeMapper.java
b/incubator/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/types/TypeMapper.java
index f1697f4f5a..a9fe26dc8d 100644
---
a/incubator/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/types/TypeMapper.java
+++
b/incubator/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/types/TypeMapper.java
@@ -53,14 +53,21 @@ public class TypeMapper {
}
private static final Map<Class<?>, GraphQLScalarType> SCALAR_BY_CLASS =
_Maps.unmodifiableEntries(
+
pair(int.class, Scalars.GraphQLInt),
pair(Integer.class, Scalars.GraphQLInt),
pair(Short.class, Scalars.GraphQLInt),
pair(short.class, Scalars.GraphQLInt),
pair(BigInteger.class, Scalars.GraphQLInt),
+
+ pair(float.class, Scalars.GraphQLFloat),
+ pair(Float.class, Scalars.GraphQLFloat),
+ pair(double.class, Scalars.GraphQLFloat),
+ pair(Double.class, Scalars.GraphQLFloat),
pair(long.class, Scalars.GraphQLFloat),
pair(Long.class, Scalars.GraphQLFloat),
pair(BigDecimal.class, Scalars.GraphQLFloat),
+
pair(boolean.class, Scalars.GraphQLBoolean),
pair(Boolean.class, Scalars.GraphQLBoolean)
);
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/calc/Calculator.java
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/calc/Calculator.java
index be172b994d..75400121b9 100644
---
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/calc/Calculator.java
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/calc/Calculator.java
@@ -2,6 +2,10 @@ package
org.apache.causeway.viewer.graphql.viewer.test.domain.calc;
import lombok.RequiredArgsConstructor;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.time.LocalDate;
+
import javax.annotation.Priority;
import javax.inject.Inject;
import javax.inject.Named;
@@ -19,7 +23,48 @@ import org.apache.causeway.applib.annotation.SemanticsOf;
public class Calculator {
@Action(semantics = SemanticsOf.SAFE)
- public int add(int x, int y) {
+ public int addIntegers(int x, int y) {
+ return x+y;
+ }
+
+ @Action(semantics = SemanticsOf.SAFE)
+ public double addDoubles(double x, double y) {
+ return x+y;
+ }
+
+ @Action(semantics = SemanticsOf.SAFE)
+ public float addFloats(float x, float y) {
return x+y;
}
+
+ @Action(semantics = SemanticsOf.SAFE)
+ public BigInteger addBigIntegers(BigInteger x, BigInteger y) {
+ return x.add(y);
+ }
+
+ @Action(semantics = SemanticsOf.SAFE)
+ public BigDecimal addBigDecimals(BigDecimal x, BigDecimal y) {
+ return x.add(y);
+ }
+
+ @Action(semantics = SemanticsOf.SAFE)
+ public LocalDate plusDays(LocalDate date, int numDays) {
+ return date.plusDays(numDays);
+ }
+
+ @Action(semantics = SemanticsOf.SAFE)
+ public boolean and(boolean x, boolean y) {
+ return x & y;
+ }
+
+ @Action(semantics = SemanticsOf.SAFE)
+ public boolean or(boolean x, boolean y) {
+ return x | y;
+ }
+
+ @Action(semantics = SemanticsOf.SAFE)
+ public boolean not(boolean x) {
+ return !x;
+ }
+
}
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_big_decimals._.gql
similarity index 76%
copy from
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
copy to
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_big_decimals._.gql
index 8acaeb8670..73cbedc9de 100644
---
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_big_decimals._.gql
@@ -1,6 +1,6 @@
{
university_calc_Calculator {
- add {
+ addBigIntegers {
invoke(x: 1, y: 2)
}
}
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_big_decimals.approved.json
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_big_decimals.approved.json
new file mode 100644
index 0000000000..e69de29bb2
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_big_integers._.gql
similarity index 76%
copy from
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
copy to
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_big_integers._.gql
index 8acaeb8670..73cbedc9de 100644
---
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_big_integers._.gql
@@ -1,6 +1,6 @@
{
university_calc_Calculator {
- add {
+ addBigIntegers {
invoke(x: 1, y: 2)
}
}
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_big_integers.approved.json
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_big_integers.approved.json
new file mode 100644
index 0000000000..e69de29bb2
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_doubles._.gql
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_doubles._.gql
new file mode 100644
index 0000000000..79ff239ba7
--- /dev/null
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_doubles._.gql
@@ -0,0 +1,7 @@
+{
+ university_calc_Calculator {
+ addDoubles {
+ invoke(x: 1.1, y: 2.2)
+ }
+ }
+}
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_doubles.approved.json
similarity index 53%
copy from
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
copy to
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_doubles.approved.json
index 15ff5210a1..8060f5d0a3 100644
---
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_doubles.approved.json
@@ -1,8 +1,8 @@
{
"data" : {
"university_calc_Calculator" : {
- "add" : {
- "invoke" : 3
+ "addDoubles" : {
+ "invoke" : 3.3000000000000003
}
}
}
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_floats._.gql
similarity index 50%
copy from
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
copy to
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_floats._.gql
index 8acaeb8670..cf5cdf8d6c 100644
---
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_floats._.gql
@@ -1,7 +1,7 @@
{
university_calc_Calculator {
- add {
- invoke(x: 1, y: 2)
+ addFloats {
+ invoke(x: 1.1, y: 2.2)
}
}
}
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_floats.approved.json
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_floats.approved.json
new file mode 100644
index 0000000000..e69de29bb2
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_integers._.gql
similarity index 79%
copy from
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
copy to
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_integers._.gql
index 8acaeb8670..a86029a38b 100644
---
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_integers._.gql
@@ -1,6 +1,6 @@
{
university_calc_Calculator {
- add {
+ addIntegers {
invoke(x: 1, y: 2)
}
}
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_integers.approved.json
similarity index 78%
copy from
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
copy to
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_integers.approved.json
index 15ff5210a1..30779dd9c3 100644
---
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_integers.approved.json
@@ -1,7 +1,7 @@
{
"data" : {
"university_calc_Calculator" : {
- "add" : {
+ "addIntegers" : {
"invoke" : 3
}
}
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_and_1._.gql
similarity index 52%
copy from
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
copy to
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_and_1._.gql
index 8acaeb8670..6636e79bb8 100644
---
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_and_1._.gql
@@ -1,7 +1,7 @@
{
university_calc_Calculator {
- add {
- invoke(x: 1, y: 2)
+ and {
+ invoke(x: true, y: true)
}
}
}
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_and_1.approved.json
similarity index 63%
copy from
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
copy to
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_and_1.approved.json
index 15ff5210a1..0d0c358647 100644
---
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_and_1.approved.json
@@ -1,8 +1,8 @@
{
"data" : {
"university_calc_Calculator" : {
- "add" : {
- "invoke" : 3
+ "and" : {
+ "invoke" : true
}
}
}
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_and_2._.gql
similarity index 51%
copy from
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
copy to
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_and_2._.gql
index 8acaeb8670..066e5228b9 100644
---
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_and_2._.gql
@@ -1,7 +1,7 @@
{
university_calc_Calculator {
- add {
- invoke(x: 1, y: 2)
+ and {
+ invoke(x: true, y: false)
}
}
}
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_and_2.approved.json
similarity index 62%
copy from
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
copy to
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_and_2.approved.json
index 15ff5210a1..dd27e01109 100644
---
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_and_2.approved.json
@@ -1,8 +1,8 @@
{
"data" : {
"university_calc_Calculator" : {
- "add" : {
- "invoke" : 3
+ "and" : {
+ "invoke" : false
}
}
}
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_not._.gql
similarity index 56%
copy from
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
copy to
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_not._.gql
index 8acaeb8670..be0b179f70 100644
---
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_not._.gql
@@ -1,7 +1,7 @@
{
university_calc_Calculator {
- add {
- invoke(x: 1, y: 2)
+ not {
+ invoke(x: true)
}
}
}
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_not.approved.json
similarity index 62%
copy from
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
copy to
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_not.approved.json
index 15ff5210a1..537a7106a8 100644
---
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_not.approved.json
@@ -1,8 +1,8 @@
{
"data" : {
"university_calc_Calculator" : {
- "add" : {
- "invoke" : 3
+ "not" : {
+ "invoke" : false
}
}
}
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_or_1._.gql
similarity index 52%
copy from
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
copy to
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_or_1._.gql
index 8acaeb8670..d156b00e48 100644
---
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_or_1._.gql
@@ -1,7 +1,7 @@
{
university_calc_Calculator {
- add {
- invoke(x: 1, y: 2)
+ or {
+ invoke(x: true, y: true)
}
}
}
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_or_1.approved.json
similarity index 63%
copy from
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
copy to
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_or_1.approved.json
index 15ff5210a1..192047fbad 100644
---
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_or_1.approved.json
@@ -1,8 +1,8 @@
{
"data" : {
"university_calc_Calculator" : {
- "add" : {
- "invoke" : 3
+ "or" : {
+ "invoke" : true
}
}
}
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_or_2._.gql
similarity index 52%
rename from
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
rename to
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_or_2._.gql
index 8acaeb8670..ddb93068cb 100644
---
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_or_2._.gql
@@ -1,7 +1,7 @@
{
university_calc_Calculator {
- add {
- invoke(x: 1, y: 2)
+ or {
+ invoke(x: true, y: false)
}
}
}
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_or_2.approved.json
similarity index 63%
rename from
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
rename to
incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_or_2.approved.json
index 15ff5210a1..192047fbad 100644
---
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.boolean_or_2.approved.json
@@ -1,8 +1,8 @@
{
"data" : {
"university_calc_Calculator" : {
- "add" : {
- "invoke" : 3
+ "or" : {
+ "invoke" : true
}
}
}
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.java
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.java
index 4ef595ee74..b65b0e0a81 100644
---
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.java
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.java
@@ -21,6 +21,7 @@ package org.apache.causeway.viewer.graphql.viewer.test.e2e;
import org.approvaltests.Approvals;
import org.approvaltests.reporters.DiffReporter;
import org.approvaltests.reporters.UseReporter;
+import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
@@ -34,11 +35,99 @@ public class Calculator_IntegTest extends
Abstract_IntegTest {
@Test
@UseReporter(DiffReporter.class)
- void add_int() throws Exception {
+ void add_integers() throws Exception {
// when, then
Approvals.verify(submit(), jsonOptions());
}
+ @Test
+ @UseReporter(DiffReporter.class)
+ void add_doubles() throws Exception {
+
+ // when, then
+ Approvals.verify(submit(), jsonOptions());
+ }
+
+ @Test
+ @Disabled // not yet supported ... receives java.lang.Double
+ @UseReporter(DiffReporter.class)
+ void add_floats() throws Exception {
+
+ // when, then
+ Approvals.verify(submit(), jsonOptions());
+ }
+
+ @Test
+ @Disabled // not yet supported ... receives java.lang.Integer
+ @UseReporter(DiffReporter.class)
+ void add_big_integers() throws Exception {
+
+ // when, then
+ Approvals.verify(submit(), jsonOptions());
+ }
+
+ @Test
+ @Disabled // not yet supported ... receives java.lang.Double
+ @UseReporter(DiffReporter.class)
+ void add_big_decimals() throws Exception {
+
+ // when, then
+ Approvals.verify(submit(), jsonOptions());
+ }
+
+ @Test
+ @Disabled // not yet supported ... receives java.lang.String
+ @UseReporter(DiffReporter.class)
+ void plus_days() throws Exception {
+
+ // when, then
+ Approvals.verify(submit(), jsonOptions());
+ }
+
+ @Test
+ @UseReporter(DiffReporter.class)
+ void boolean_and_1() throws Exception {
+
+ // when, then
+ Approvals.verify(submit(), jsonOptions());
+
+ }
+
+ @Test
+ @UseReporter(DiffReporter.class)
+ void boolean_and_2() throws Exception {
+
+ // when, then
+ Approvals.verify(submit(), jsonOptions());
+ }
+
+ @Test
+ @UseReporter(DiffReporter.class)
+ void boolean_or_1() throws Exception {
+
+ // when, then
+ Approvals.verify(submit(), jsonOptions());
+
+ }
+
+ @Test
+ @UseReporter(DiffReporter.class)
+ void boolean_or_2() throws Exception {
+
+ // when, then
+ Approvals.verify(submit(), jsonOptions());
+
+ }
+
+ @Test
+ @UseReporter(DiffReporter.class)
+ void boolean_not() throws Exception {
+
+ // when, then
+ Approvals.verify(submit(), jsonOptions());
+
+ }
+
}
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.plus_days._.gql
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.plus_days._.gql
new file mode 100644
index 0000000000..c631e57829
--- /dev/null
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.plus_days._.gql
@@ -0,0 +1,7 @@
+{
+ university_calc_Calculator {
+ plusDays {
+ invoke(date: "2024-01-26", numDays: 2)
+ }
+ }
+}
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.plus_days.approved.json
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.plus_days.approved.json
new file mode 100644
index 0000000000..e69de29bb2
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.java
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.java
index 91cb19afd5..b3efa11078 100644
---
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.java
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.java
@@ -23,6 +23,7 @@ import
org.apache.causeway.viewer.graphql.viewer.test.CausewayViewerGraphqlTestM
import org.approvaltests.Approvals;
import org.approvaltests.reporters.DiffReporter;
import org.approvaltests.reporters.UseReporter;
+import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIfSystemProperties;
@@ -42,13 +43,14 @@ import static
org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
public class Schema_IntegTest extends
CausewayViewerGraphqlTestModuleIntegTestAbstract {
@Test
- // @DisabledIfSystemProperty(named = "isRunningWithSurefire", matches =
"true")
+ @Disabled // to avoid having to keep re-verify
@UseReporter(DiffReporter.class)
void schema() throws Exception {
Approvals.verify(submit(), jsonOptions());
}
@Test
+ @Disabled // to avoid having to keep re-verify
@UseReporter(DiffReporter.class)
void schema_types_name() throws Exception {
Approvals.verify(submit(), jsonOptions());
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.schema.approved.json
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.schema.approved.json
index b2a9b6fcd4..be87927121 100644
---
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.schema.approved.json
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.schema.approved.json
@@ -15,6 +15,15 @@
"interfaces" : null,
"enumValues" : null,
"possibleTypes" : null
+ }, {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "description" : "Built-in Float",
+ "fields" : null,
+ "inputFields" : null,
+ "interfaces" : null,
+ "enumValues" : null,
+ "possibleTypes" : null
}, {
"kind" : "SCALAR",
"name" : "ID",
@@ -22661,12 +22670,588 @@
"name" : "university_calc_Calculator",
"description" : null,
"fields" : [ {
- "name" : "add",
+ "name" : "addDoubles",
+ "description" : null,
+ "args" : [ ],
+ "type" : {
+ "kind" : "OBJECT",
+ "name" : "university_calc_Calculator__addDoubles__gqlv_action",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "addFloats",
+ "description" : null,
+ "args" : [ ],
+ "type" : {
+ "kind" : "OBJECT",
+ "name" : "university_calc_Calculator__addFloats__gqlv_action",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "addIntegers",
+ "description" : null,
+ "args" : [ ],
+ "type" : {
+ "kind" : "OBJECT",
+ "name" : "university_calc_Calculator__addIntegers__gqlv_action",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ } ],
+ "inputFields" : null,
+ "interfaces" : [ ],
+ "enumValues" : null,
+ "possibleTypes" : null
+ }, {
+ "kind" : "OBJECT",
+ "name" : "university_calc_Calculator__addDoubles__gqlv_action",
+ "description" : null,
+ "fields" : [ {
+ "name" : "hidden",
+ "description" : null,
+ "args" : [ ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Boolean",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "disabled",
+ "description" : null,
+ "args" : [ ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "String",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "validate",
+ "description" : null,
+ "args" : [ {
+ "name" : "x",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ }, {
+ "name" : "y",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ } ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "String",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "invoke",
+ "description" : null,
+ "args" : [ {
+ "name" : "x",
+ "description" : null,
+ "type" : {
+ "kind" : "NON_NULL",
+ "name" : null,
+ "ofType" : {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "ofType" : null
+ }
+ },
+ "defaultValue" : null
+ }, {
+ "name" : "y",
+ "description" : null,
+ "type" : {
+ "kind" : "NON_NULL",
+ "name" : null,
+ "ofType" : {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "ofType" : null
+ }
+ },
+ "defaultValue" : null
+ } ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "params",
+ "description" : null,
+ "args" : [ ],
+ "type" : {
+ "kind" : "OBJECT",
+ "name" :
"university_calc_Calculator__addDoubles__gqlv_action_params",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ } ],
+ "inputFields" : null,
+ "interfaces" : [ ],
+ "enumValues" : null,
+ "possibleTypes" : null
+ }, {
+ "kind" : "OBJECT",
+ "name" : "university_calc_Calculator__addDoubles__gqlv_action_params",
+ "description" : null,
+ "fields" : [ {
+ "name" : "x",
"description" : null,
"args" : [ ],
"type" : {
"kind" : "OBJECT",
- "name" : "university_calc_Calculator__add__gqlv_action",
+ "name" :
"university_calc_Calculator__addDoubles__x__gqlv_action_parameter",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "y",
+ "description" : null,
+ "args" : [ ],
+ "type" : {
+ "kind" : "OBJECT",
+ "name" :
"university_calc_Calculator__addDoubles__y__gqlv_action_parameter",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ } ],
+ "inputFields" : null,
+ "interfaces" : [ ],
+ "enumValues" : null,
+ "possibleTypes" : null
+ }, {
+ "kind" : "OBJECT",
+ "name" :
"university_calc_Calculator__addDoubles__x__gqlv_action_parameter",
+ "description" : null,
+ "fields" : [ {
+ "name" : "hidden",
+ "description" : null,
+ "args" : [ ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Boolean",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "validity",
+ "description" : null,
+ "args" : [ {
+ "name" : "x",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ } ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "String",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "disabled",
+ "description" : null,
+ "args" : [ {
+ "name" : "x",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ } ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "String",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ } ],
+ "inputFields" : null,
+ "interfaces" : [ ],
+ "enumValues" : null,
+ "possibleTypes" : null
+ }, {
+ "kind" : "OBJECT",
+ "name" :
"university_calc_Calculator__addDoubles__y__gqlv_action_parameter",
+ "description" : null,
+ "fields" : [ {
+ "name" : "hidden",
+ "description" : null,
+ "args" : [ {
+ "name" : "x",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ } ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Boolean",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "validity",
+ "description" : null,
+ "args" : [ {
+ "name" : "y",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ } ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "String",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "disabled",
+ "description" : null,
+ "args" : [ {
+ "name" : "x",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ }, {
+ "name" : "y",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ } ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "String",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ } ],
+ "inputFields" : null,
+ "interfaces" : [ ],
+ "enumValues" : null,
+ "possibleTypes" : null
+ }, {
+ "kind" : "OBJECT",
+ "name" : "university_calc_Calculator__addFloats__gqlv_action",
+ "description" : null,
+ "fields" : [ {
+ "name" : "hidden",
+ "description" : null,
+ "args" : [ ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Boolean",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "disabled",
+ "description" : null,
+ "args" : [ ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "String",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "validate",
+ "description" : null,
+ "args" : [ {
+ "name" : "x",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ }, {
+ "name" : "y",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ } ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "String",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "invoke",
+ "description" : null,
+ "args" : [ {
+ "name" : "x",
+ "description" : null,
+ "type" : {
+ "kind" : "NON_NULL",
+ "name" : null,
+ "ofType" : {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "ofType" : null
+ }
+ },
+ "defaultValue" : null
+ }, {
+ "name" : "y",
+ "description" : null,
+ "type" : {
+ "kind" : "NON_NULL",
+ "name" : null,
+ "ofType" : {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "ofType" : null
+ }
+ },
+ "defaultValue" : null
+ } ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "params",
+ "description" : null,
+ "args" : [ ],
+ "type" : {
+ "kind" : "OBJECT",
+ "name" :
"university_calc_Calculator__addFloats__gqlv_action_params",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ } ],
+ "inputFields" : null,
+ "interfaces" : [ ],
+ "enumValues" : null,
+ "possibleTypes" : null
+ }, {
+ "kind" : "OBJECT",
+ "name" : "university_calc_Calculator__addFloats__gqlv_action_params",
+ "description" : null,
+ "fields" : [ {
+ "name" : "x",
+ "description" : null,
+ "args" : [ ],
+ "type" : {
+ "kind" : "OBJECT",
+ "name" :
"university_calc_Calculator__addFloats__x__gqlv_action_parameter",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "y",
+ "description" : null,
+ "args" : [ ],
+ "type" : {
+ "kind" : "OBJECT",
+ "name" :
"university_calc_Calculator__addFloats__y__gqlv_action_parameter",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ } ],
+ "inputFields" : null,
+ "interfaces" : [ ],
+ "enumValues" : null,
+ "possibleTypes" : null
+ }, {
+ "kind" : "OBJECT",
+ "name" :
"university_calc_Calculator__addFloats__x__gqlv_action_parameter",
+ "description" : null,
+ "fields" : [ {
+ "name" : "hidden",
+ "description" : null,
+ "args" : [ ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Boolean",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "validity",
+ "description" : null,
+ "args" : [ {
+ "name" : "x",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ } ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "String",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "disabled",
+ "description" : null,
+ "args" : [ {
+ "name" : "x",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ } ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "String",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ } ],
+ "inputFields" : null,
+ "interfaces" : [ ],
+ "enumValues" : null,
+ "possibleTypes" : null
+ }, {
+ "kind" : "OBJECT",
+ "name" :
"university_calc_Calculator__addFloats__y__gqlv_action_parameter",
+ "description" : null,
+ "fields" : [ {
+ "name" : "hidden",
+ "description" : null,
+ "args" : [ {
+ "name" : "x",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ } ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Boolean",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "validity",
+ "description" : null,
+ "args" : [ {
+ "name" : "y",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ } ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "String",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "disabled",
+ "description" : null,
+ "args" : [ {
+ "name" : "x",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ }, {
+ "name" : "y",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Float",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ } ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "String",
"ofType" : null
},
"isDeprecated" : false,
@@ -22678,7 +23263,7 @@
"possibleTypes" : null
}, {
"kind" : "OBJECT",
- "name" : "university_calc_Calculator__add__gqlv_action",
+ "name" : "university_calc_Calculator__addIntegers__gqlv_action",
"description" : null,
"fields" : [ {
"name" : "hidden",
@@ -22774,7 +23359,7 @@
"args" : [ ],
"type" : {
"kind" : "OBJECT",
- "name" : "university_calc_Calculator__add__gqlv_action_params",
+ "name" :
"university_calc_Calculator__addIntegers__gqlv_action_params",
"ofType" : null
},
"isDeprecated" : false,
@@ -22786,7 +23371,7 @@
"possibleTypes" : null
}, {
"kind" : "OBJECT",
- "name" : "university_calc_Calculator__add__gqlv_action_params",
+ "name" : "university_calc_Calculator__addIntegers__gqlv_action_params",
"description" : null,
"fields" : [ {
"name" : "x",
@@ -22794,7 +23379,7 @@
"args" : [ ],
"type" : {
"kind" : "OBJECT",
- "name" :
"university_calc_Calculator__add__x__gqlv_action_parameter",
+ "name" :
"university_calc_Calculator__addIntegers__x__gqlv_action_parameter",
"ofType" : null
},
"isDeprecated" : false,
@@ -22805,7 +23390,7 @@
"args" : [ ],
"type" : {
"kind" : "OBJECT",
- "name" :
"university_calc_Calculator__add__y__gqlv_action_parameter",
+ "name" :
"university_calc_Calculator__addIntegers__y__gqlv_action_parameter",
"ofType" : null
},
"isDeprecated" : false,
@@ -22817,7 +23402,7 @@
"possibleTypes" : null
}, {
"kind" : "OBJECT",
- "name" : "university_calc_Calculator__add__x__gqlv_action_parameter",
+ "name" :
"university_calc_Calculator__addIntegers__x__gqlv_action_parameter",
"description" : null,
"fields" : [ {
"name" : "hidden",
@@ -22877,7 +23462,7 @@
"possibleTypes" : null
}, {
"kind" : "OBJECT",
- "name" : "university_calc_Calculator__add__y__gqlv_action_parameter",
+ "name" :
"university_calc_Calculator__addIntegers__y__gqlv_action_parameter",
"description" : null,
"fields" : [ {
"name" : "hidden",
diff --git
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.schema_types_name.approved.json
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.schema_types_name.approved.json
index 5a9fd75724..f52d86b11b 100644
---
a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.schema_types_name.approved.json
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.schema_types_name.approved.json
@@ -3,6 +3,8 @@
"__schema" : {
"types" : [ {
"name" : "Boolean"
+ }, {
+ "name" : "Float"
}, {
"name" : "ID"
}, {
@@ -762,13 +764,29 @@
}, {
"name" : "university_calc_Calculator"
}, {
- "name" : "university_calc_Calculator__add__gqlv_action"
+ "name" : "university_calc_Calculator__addDoubles__gqlv_action"
+ }, {
+ "name" : "university_calc_Calculator__addDoubles__gqlv_action_params"
+ }, {
+ "name" :
"university_calc_Calculator__addDoubles__x__gqlv_action_parameter"
+ }, {
+ "name" :
"university_calc_Calculator__addDoubles__y__gqlv_action_parameter"
+ }, {
+ "name" : "university_calc_Calculator__addFloats__gqlv_action"
+ }, {
+ "name" : "university_calc_Calculator__addFloats__gqlv_action_params"
+ }, {
+ "name" :
"university_calc_Calculator__addFloats__x__gqlv_action_parameter"
+ }, {
+ "name" :
"university_calc_Calculator__addFloats__y__gqlv_action_parameter"
+ }, {
+ "name" : "university_calc_Calculator__addIntegers__gqlv_action"
}, {
- "name" : "university_calc_Calculator__add__gqlv_action_params"
+ "name" : "university_calc_Calculator__addIntegers__gqlv_action_params"
}, {
- "name" : "university_calc_Calculator__add__x__gqlv_action_parameter"
+ "name" :
"university_calc_Calculator__addIntegers__x__gqlv_action_parameter"
}, {
- "name" : "university_calc_Calculator__add__y__gqlv_action_parameter"
+ "name" :
"university_calc_Calculator__addIntegers__y__gqlv_action_parameter"
}, {
"name" : "university_dept_Department"
}, {
diff --git a/incubator/viewers/graphql/test/src/test/resources/schema.gql
b/incubator/viewers/graphql/test/src/test/resources/schema.gql
index 2bdcc40dd4..c04ef7772d 100644
--- a/incubator/viewers/graphql/test/src/test/resources/schema.gql
+++ b/incubator/viewers/graphql/test/src/test/resources/schema.gql
@@ -2227,34 +2227,235 @@ type
university_admin_AdminMenu__otherAdminAction__gqlv_action {
}
type university_calc_Calculator {
- add: university_calc_Calculator__add__gqlv_action
+ addBigDecimals: university_calc_Calculator__addBigDecimals__gqlv_action
+ addBigIntegers: university_calc_Calculator__addBigIntegers__gqlv_action
+ addDoubles: university_calc_Calculator__addDoubles__gqlv_action
+ addFloats: university_calc_Calculator__addFloats__gqlv_action
+ addIntegers: university_calc_Calculator__addIntegers__gqlv_action
+ and: university_calc_Calculator__and__gqlv_action
+ not: university_calc_Calculator__not__gqlv_action
+ or: university_calc_Calculator__or__gqlv_action
+ plusDays: university_calc_Calculator__plusDays__gqlv_action
}
-type university_calc_Calculator__add__gqlv_action {
+type university_calc_Calculator__addBigDecimals__gqlv_action {
+ disabled: String
+ hidden: Boolean
+ invoke(x: Float!, y: Float!): Float
+ params: university_calc_Calculator__addBigDecimals__gqlv_action_params
+ validate(x: Float, y: Float): String
+}
+
+type university_calc_Calculator__addBigDecimals__gqlv_action_params {
+ x: university_calc_Calculator__addBigDecimals__x__gqlv_action_parameter
+ y: university_calc_Calculator__addBigDecimals__y__gqlv_action_parameter
+}
+
+type university_calc_Calculator__addBigDecimals__x__gqlv_action_parameter {
+ disabled(x: Float): String
+ hidden: Boolean
+ validity(x: Float): String
+}
+
+type university_calc_Calculator__addBigDecimals__y__gqlv_action_parameter {
+ disabled(x: Float, y: Float): String
+ hidden(x: Float): Boolean
+ validity(y: Float): String
+}
+
+type university_calc_Calculator__addBigIntegers__gqlv_action {
disabled: String
hidden: Boolean
invoke(x: Int!, y: Int!): Int
- params: university_calc_Calculator__add__gqlv_action_params
+ params: university_calc_Calculator__addBigIntegers__gqlv_action_params
validate(x: Int, y: Int): String
}
-type university_calc_Calculator__add__gqlv_action_params {
- x: university_calc_Calculator__add__x__gqlv_action_parameter
- y: university_calc_Calculator__add__y__gqlv_action_parameter
+type university_calc_Calculator__addBigIntegers__gqlv_action_params {
+ x: university_calc_Calculator__addBigIntegers__x__gqlv_action_parameter
+ y: university_calc_Calculator__addBigIntegers__y__gqlv_action_parameter
}
-type university_calc_Calculator__add__x__gqlv_action_parameter {
+type university_calc_Calculator__addBigIntegers__x__gqlv_action_parameter {
disabled(x: Int): String
hidden: Boolean
validity(x: Int): String
}
-type university_calc_Calculator__add__y__gqlv_action_parameter {
+type university_calc_Calculator__addBigIntegers__y__gqlv_action_parameter {
disabled(x: Int, y: Int): String
hidden(x: Int): Boolean
validity(y: Int): String
}
+type university_calc_Calculator__addDoubles__gqlv_action {
+ disabled: String
+ hidden: Boolean
+ invoke(x: Float!, y: Float!): Float
+ params: university_calc_Calculator__addDoubles__gqlv_action_params
+ validate(x: Float, y: Float): String
+}
+
+type university_calc_Calculator__addDoubles__gqlv_action_params {
+ x: university_calc_Calculator__addDoubles__x__gqlv_action_parameter
+ y: university_calc_Calculator__addDoubles__y__gqlv_action_parameter
+}
+
+type university_calc_Calculator__addDoubles__x__gqlv_action_parameter {
+ disabled(x: Float): String
+ hidden: Boolean
+ validity(x: Float): String
+}
+
+type university_calc_Calculator__addDoubles__y__gqlv_action_parameter {
+ disabled(x: Float, y: Float): String
+ hidden(x: Float): Boolean
+ validity(y: Float): String
+}
+
+type university_calc_Calculator__addFloats__gqlv_action {
+ disabled: String
+ hidden: Boolean
+ invoke(x: Float!, y: Float!): Float
+ params: university_calc_Calculator__addFloats__gqlv_action_params
+ validate(x: Float, y: Float): String
+}
+
+type university_calc_Calculator__addFloats__gqlv_action_params {
+ x: university_calc_Calculator__addFloats__x__gqlv_action_parameter
+ y: university_calc_Calculator__addFloats__y__gqlv_action_parameter
+}
+
+type university_calc_Calculator__addFloats__x__gqlv_action_parameter {
+ disabled(x: Float): String
+ hidden: Boolean
+ validity(x: Float): String
+}
+
+type university_calc_Calculator__addFloats__y__gqlv_action_parameter {
+ disabled(x: Float, y: Float): String
+ hidden(x: Float): Boolean
+ validity(y: Float): String
+}
+
+type university_calc_Calculator__addIntegers__gqlv_action {
+ disabled: String
+ hidden: Boolean
+ invoke(x: Int!, y: Int!): Int
+ params: university_calc_Calculator__addIntegers__gqlv_action_params
+ validate(x: Int, y: Int): String
+}
+
+type university_calc_Calculator__addIntegers__gqlv_action_params {
+ x: university_calc_Calculator__addIntegers__x__gqlv_action_parameter
+ y: university_calc_Calculator__addIntegers__y__gqlv_action_parameter
+}
+
+type university_calc_Calculator__addIntegers__x__gqlv_action_parameter {
+ disabled(x: Int): String
+ hidden: Boolean
+ validity(x: Int): String
+}
+
+type university_calc_Calculator__addIntegers__y__gqlv_action_parameter {
+ disabled(x: Int, y: Int): String
+ hidden(x: Int): Boolean
+ validity(y: Int): String
+}
+
+type university_calc_Calculator__and__gqlv_action {
+ disabled: String
+ hidden: Boolean
+ invoke(x: Boolean!, y: Boolean!): Boolean
+ params: university_calc_Calculator__and__gqlv_action_params
+ validate(x: Boolean, y: Boolean): String
+}
+
+type university_calc_Calculator__and__gqlv_action_params {
+ x: university_calc_Calculator__and__x__gqlv_action_parameter
+ y: university_calc_Calculator__and__y__gqlv_action_parameter
+}
+
+type university_calc_Calculator__and__x__gqlv_action_parameter {
+ disabled(x: Boolean): String
+ hidden: Boolean
+ validity(x: Boolean): String
+}
+
+type university_calc_Calculator__and__y__gqlv_action_parameter {
+ disabled(x: Boolean, y: Boolean): String
+ hidden(x: Boolean): Boolean
+ validity(y: Boolean): String
+}
+
+type university_calc_Calculator__not__gqlv_action {
+ disabled: String
+ hidden: Boolean
+ invoke(x: Boolean!): Boolean
+ params: university_calc_Calculator__not__gqlv_action_params
+ validate(x: Boolean): String
+}
+
+type university_calc_Calculator__not__gqlv_action_params {
+ x: university_calc_Calculator__not__x__gqlv_action_parameter
+}
+
+type university_calc_Calculator__not__x__gqlv_action_parameter {
+ disabled(x: Boolean): String
+ hidden: Boolean
+ validity(x: Boolean): String
+}
+
+type university_calc_Calculator__or__gqlv_action {
+ disabled: String
+ hidden: Boolean
+ invoke(x: Boolean!, y: Boolean!): Boolean
+ params: university_calc_Calculator__or__gqlv_action_params
+ validate(x: Boolean, y: Boolean): String
+}
+
+type university_calc_Calculator__or__gqlv_action_params {
+ x: university_calc_Calculator__or__x__gqlv_action_parameter
+ y: university_calc_Calculator__or__y__gqlv_action_parameter
+}
+
+type university_calc_Calculator__or__x__gqlv_action_parameter {
+ disabled(x: Boolean): String
+ hidden: Boolean
+ validity(x: Boolean): String
+}
+
+type university_calc_Calculator__or__y__gqlv_action_parameter {
+ disabled(x: Boolean, y: Boolean): String
+ hidden(x: Boolean): Boolean
+ validity(y: Boolean): String
+}
+
+type university_calc_Calculator__plusDays__date__gqlv_action_parameter {
+ disabled(date: String): String
+ hidden: Boolean
+ validity(date: String): String
+}
+
+type university_calc_Calculator__plusDays__gqlv_action {
+ disabled: String
+ hidden: Boolean
+ invoke(date: String!, numDays: Int!): String
+ params: university_calc_Calculator__plusDays__gqlv_action_params
+ validate(date: String, numDays: Int): String
+}
+
+type university_calc_Calculator__plusDays__gqlv_action_params {
+ date: university_calc_Calculator__plusDays__date__gqlv_action_parameter
+ numDays: university_calc_Calculator__plusDays__numDays__gqlv_action_parameter
+}
+
+type university_calc_Calculator__plusDays__numDays__gqlv_action_parameter {
+ disabled(date: String, numDays: Int): String
+ hidden(date: String): Boolean
+ validity(numDays: Int): String
+}
+
type university_dept_Department {
_gql_meta: university_dept_Department__gqlv_meta
addStaffMember: university_dept_Department__addStaffMember__gqlv_action