Release Notes
The highlight of this release is the addition of a new sbt plugin to generate your Caliban client code directly from your Caliban server code at compile time. This is useful if you use Caliban on both client and server side. Check the plugin documentation for more details.
Here's a little preview showing how you tell sbt where your GraphQL server API is defined:
lazy val api =
project
.enablePlugins(CompileTimeCalibanServerPlugin)
.settings(
Compile / ctCalibanServer / ctCalibanServerSettings :=
Seq(
"com.example.my.awesome.project.api.CalibanServer.graphqlApi" -> ClientGenerationSettings.default
)
)
It is still very new, so let us know if you encounter any bug. This sbt voodoo magic was brought in #1037 by @guizmaii 🙏
Server
- Added support for
@GQLDefault
annotation for defining the default value of a field #1043 by @frekw - Added
Schema
andArgBuilder
instances forShort
#1011 by @Fluxx - Added helpers for creating
Schema
instances for non-Throwable errors, seecustomErrorEffectSchema
,customErrorQuerySchema
andcustomErrorStreamSchema
#1059 by @ghostdogpr - Fixed fragment spreads parsing in Scala 3 #1066 by @ghostdogpr
- Fixed field metadata for enums coming from JSON variables (they now return
EnumValue
instead ofStringValue
) #1064 by @frekw
Adapters
- Upgraded http4s to 0.23.5. This caused a change in the interface of
makeWebSocketService
, becauseWebSocketBuilder
was deprecated by http4s. It now requires aWebSocketBuilder2
. See the examples project for an updated usage. #1075 by @ghostdogpr - Added WebSocket lifecycle hooks to the zio-http adapter #1013 by @frekw
Tools
- Added a new sbt plugin to generate client code from server code #1037 by @guizmaii (see above)
- Fixed
deprecated
behaviour inSchemaLoader.fromCaliban
#1006 by @ghostdogpr - Fixed
LocationInfo
json decoding #1015 by @frekw - Fixed interface types resolution in
RemoteSchema
#1018 by @frekw - Added GraphQL error extensions decoding #1038 by @frekw
- Added
then
to the list of reserved keywords #1032 by @RhnSharma - Added
SchemaLoader.fromDocument
#1036 by @frekw