spec/graphql/execution/lazy_spec.rb in graphql-1.8.16 vs spec/graphql/execution/lazy_spec.rb in graphql-1.8.17
- old
+ new
@@ -8,9 +8,16 @@
it "calls value handlers" do
res = run_query('{ int(value: 2, plus: 1) }')
assert_equal 3, res["data"]["int"]
end
+ it "Works with Query.new" do
+ query_str = '{ int(value: 2, plus: 1) }'
+ query = GraphQL::Query.new(LazyHelpers::LazySchema, query_str)
+ res = query.result
+ assert_equal 3, res["data"]["int"]
+ end
+
it "can do nested lazy values" do
res = run_query %|
{
a: nestedSum(value: 3) {
value