spec/graphql/execution/lazy_spec.rb in graphql-1.6.4 vs spec/graphql/execution/lazy_spec.rb in graphql-1.6.5
- old
+ new
@@ -15,16 +15,28 @@
{
a: nestedSum(value: 3) {
value
nestedSum(value: 7) {
value
+ nestedSum(value: 1) {
+ value
+ nestedSum(value: -50) {
+ value
+ }
+ }
}
}
b: nestedSum(value: 2) {
value
nestedSum(value: 11) {
value
+ nestedSum(value: 2) {
+ value
+ nestedSum(value: -50) {
+ value
+ }
+ }
}
}
c: listSum(values: [1,2]) {
nestedSum(value: 3) {
@@ -33,12 +45,27 @@
}
}
|
expected_data = {
- "a"=>{"value"=>14, "nestedSum"=>{"value"=>46}},
- "b"=>{"value"=>14, "nestedSum"=>{"value"=>46}},
- "c"=>[{"nestedSum"=>{"value"=>14}}, {"nestedSum"=>{"value"=>14}}],
+ "a"=>{"value"=>14, "nestedSum"=>{
+ "value"=>46,
+ "nestedSum"=>{
+ "value"=>95,
+ "nestedSum"=>{"value"=>90}
+ }
+ }},
+ "b"=>{"value"=>14, "nestedSum"=>{
+ "value"=>46,
+ "nestedSum"=>{
+ "value"=>95,
+ "nestedSum"=>{"value"=>90}
+ }
+ }},
+ "c"=>[
+ {"nestedSum"=>{"value"=>14}},
+ {"nestedSum"=>{"value"=>14}}
+ ],
}
assert_equal expected_data, res["data"]
end