README.md in graphql-batch-0.2.1 vs README.md in graphql-batch-0.2.2
- old
+ new
@@ -88,9 +88,10 @@
CountLoader.for(Shop, :custom_collections).load(context.shop_id),
]).then do |results|
results.reduce(&:+)
end
end
+```
`.then` can optionally take two lambda arguments, the first of which is equivalent to passing a block to `.then`, and the second one handles exceptions. This can be used to provide a fallback
```ruby
resolve -> (obj, args, context) do