github ghostdogpr/caliban v3.2.1

3 hours ago

Release Notes

This release adds @defer support to Caliban Gateway and fixes queries with repeated fragment spreads taking exponential time to process. It also includes a few bug fixes and forks fewer fibers per gateway request.

New Features

  • Added @defer support to the gateway, enabled by default and using the deferSpec=20220824 format, by @ghostdogpr in #3160

Bug Fixes

  • Fixed exponential processing of queries that spread the same fragments several times at each level, in maxDepth, maxFields, cost estimation, cache control and the gateway, by @ghostdogpr in #3160
  • Fixed recursive @oneOf input types, whose schema never finished building, by @ghostdogpr in #3140
  • Fixed @interfaceObject support in the gateway, for Gateway.fromSupergraph and for Subgraph.federation without SDL, by @ghostdogpr in #3137
  • Fixed @defer multipart responses in the Quick and Tapir adapters, where the delimiter ending a part was only sent once the next part was ready, by @xsistens in #3148
  • Stopped using $ in variable names generated by the client codegen, which failed to compile on Scala 3.9 with -Werror, by @ghostdogpr in #3181

Note: the gateway now rejects operations that select more than 100,000 fields once their fragments are expanded. Use GatewayConfig.withMaxOperationFields to change this limit. GatewayConfig has a new field, so its copy and apply signatures change.

Performance Improvements

  • Reduced the fibers forked per gateway request from 51 to 24 on the ChilliCream gateway benchmark, using 7% less CPU per request, by @ghostdogpr in #3145

Other Small Improvements

  • Set PaginationError as the innerThrowable of the errors returned for rejected pagination arguments, so that wrappers can identify them, by @ghostdogpr in #3180
  • Stitched queries that reuse a fragment's fields in several places now contain generated fragments (F0, F1, …) by @ghostdogpr in #3160
  • The tracer's document attribute is now the operation itself, with its real operation type, instead of wrapping the root as query{{…}}, by @ghostdogpr in #3160

Don't miss a new caliban release

NewReleases is sending notifications on new releases.