v0.2.0
Release Notes
Highlights
This release brings support for Query Optimization (deduplication, batching), based on a new data type ZQuery
contributed by @adamgfraser.
Imagine the following QraphQL query:
query {
orders { # calls getOrders
id
customer { # calls getCustomer
id
name
}
}
}
Without optimizations, this would result in 1 call to getOrders
followed by N calls to getCustomer
(N being the number of orders). This is commonly referred to as the N+1 Problem. Using ZQuery
, you can provide a function that gets a list of customers from a list of IDs, so that Caliban will only perform 2 calls.
See the full documentation for more information.
Other changes
- Changed the signature of
Schema#resolve
. It now returns aStep
that describes the computation to perform, instead of anIO
. This was necessary to enable query optimizations. - Added
ArgBuilder#mapM
by @sh0hei - Added missing support for
GQLName
annotations inArgBuilder
- Added a few missing validation rules (see #63)
- Upgraded ZIO to
1.0.0-RC16