You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run integration tests through the GraphQL API (#206)
With this change, integration tests will route calls directly through the GraphQL API and not just to the translator. Thus we can find potential errors in the return values faster.
Copy file name to clipboardExpand all lines: core/src/test/resources/issues/gh-147.adoc
+11-3Lines changed: 11 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,9 @@ query {
60
60
person(name: "Kevin Bacon") {
61
61
born
62
62
... on Actor {
63
+
__typename
63
64
namedColleagues(name: "Meg") {
65
+
__typename
64
66
... name
65
67
}
66
68
}
@@ -75,11 +77,13 @@ fragment name on Actor { name }
75
77
----
76
78
{
77
79
"person" : [ {
80
+
"born" : 1958,
81
+
"__typename" : "Actor",
78
82
"namedColleagues" : [ {
83
+
"__typename" : "Actor",
79
84
"name" : "Meg Ryan"
80
85
} ],
81
-
"score" : 7,
82
-
"born" : 1958
86
+
"score" : 7
83
87
} ]
84
88
}
85
89
----
@@ -90,7 +94,9 @@ fragment name on Actor { name }
90
94
{
91
95
"personName" : "Kevin Bacon",
92
96
"personNamedColleaguesName" : "Meg",
93
-
"personScoreValue" : 7
97
+
"personNamedColleaguesValidTypes" : [ "Actor" ],
98
+
"personScoreValue" : 7,
99
+
"personValidTypes" : [ "Actor" ]
94
100
}
95
101
----
96
102
@@ -101,10 +107,12 @@ MATCH (person:Person)
101
107
WHERE person.name = $personName
102
108
RETURN person {
103
109
.born,
110
+
__typename: head([label IN labels(person) WHERE label IN $personValidTypes]),
104
111
namedColleagues: [personNamedColleagues IN apoc.cypher.runFirstColumnMany('WITH $this AS this, $name AS name WITH $this AS this MATCH (this)-[:ACTED_IN]->()<-[:ACTED_IN]-(other) WHERE other.name CONTAINS $name RETURN other', {
105
112
this: person,
106
113
name: $personNamedColleaguesName
107
114
}) | personNamedColleagues {
115
+
__typename: head([label IN labels(personNamedColleagues) WHERE label IN $personNamedColleaguesValidTypes]),
108
116
.name
109
117
}],
110
118
score: apoc.cypher.runFirstColumnSingle('WITH $this AS this, $value AS value RETURN $value', {
0 commit comments