github ghostdogpr/caliban v0.2.0

latest releases: v2.6.0, v2.5.3, v2.5.2...
4 years ago

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 a Step that describes the computation to perform, instead of an IO. This was necessary to enable query optimizations.
  • Added ArgBuilder#mapM by @sh0hei
  • Added missing support for GQLName annotations in ArgBuilder
  • Added a few missing validation rules (see #63)
  • Upgraded ZIO to 1.0.0-RC16

Don't miss a new caliban release

NewReleases is sending notifications on new releases.