Releases: ghostdogpr/caliban
v0.8.3
Release Notes
- Upgraded ZIO and its dependencies to 1.0.0-RC21-1 #472 by @ghostdogpr
- Improved the handling of uncaught errors (zio's
Die
) so that they are properly caught with path and location #463 by @ghostdogpr - Fixed the Schema for
ZStream
when it is used outside of a Subscription #457 by @ghostdogpr - Fixed the Schema for
() => A
#459 by @ghostdogpr - Used triple-quotes for multiline comments in code generation #465 by @AlixBa
v0.8.2
Release Notes
- Renamed
caliban-codegen
tocaliban-tools
and added a new feature to compare GraphQL schemas from various origins (Caliban, remote server introspection, file, string). See documentation #436 by @ghostdogpr - Fixed false positives in object type validation #440 by @ghostdogpr
- Added
Schema
andArgBuilder
for ZIOChunk
#439 by @renancaju - Added
--effect
option to schema codegen #443 by @AlixBa - Updated zio-query to 0.2.2 (contains an important bug fix if you use multiple
DataSource
)
v0.8.1
Release Notes
- Upgraded ZIO and related dependencies to 1.0.0-RC20 #429 by @ghostdogpr
- Added schema validation for GraphQL objects. All schema validation rules have now been implemented. #259 by @zach-albia
- Changed the auto-derivation for value classes to generate a
Schema
for the underlying type #430 by @palanga - Fixed nested type name computation #427 by @kiranbayram
- Added
SelectionBuilder.combineAll
in caliban-client #411 @ghostdogpr
v0.8.0
Release Notes
Major library upgrades
- Upgraded ZIO to 1.0.0-RC19-2 + all ZIO-related dependencies #395 by @ghostdogpr
- Upgraded Scala.js to 1.x #395 by @ghostdogpr
- Upgraded ZQuery to 0.2.0. If you use ZQuery, make sure to check the release notes, they come with a migration guide! #380 #395 by @adamgfraser
- Upgraded tapir to 0.15.0 #389 by @ghostdogpr
Support for the Play Framework
- Added a brand new adapter for the Play Framework #382 by @javimartinez. Check the example app!
Other changes
- Allowed overriding the name of query/operation name in Tapir interop #375 by @fkowal
- Moved the codegen console output into the sbt module #385 by @joprice
- Made
query
optional in GET methods of Finch and Akka HTTP adapters #400 by @javimartinez - Handled missing variables properly #403 by @joprice
- Exposed more information in
FieldInfo
by @ghostdogpr
v0.7.8
Release Notes
- Made
ZQuery
stack-safe and fixed potential stack overflow exceptions when returning large lists #378 by @adamgfraser - Allowed configuring the package name in codegen #370 by @joprice
- Improved documentation
v0.7.7
Release Notes
Tapir Integration
Caliban is now able to generate a GraphQL API from Tapir endpoints! That means that if you use Tapir for exposing a REST API, you should be able to expose a GraphQL API with minimal efforts.
Creating a GraphQL
object is similar to creating routes for http4s or Akka HTTP:
val addBook: Endpoint[Book, Nothing, Unit, Nothing] = ???
def bookAddLogic(book: Book): UIO[Unit] = ???
val api = addBook.toGraphQL(bookAddLogic)
Simple conversions rules will create Query fields for GET endpoints and Mutations fields for POST/PUT/DELETE endpoints. You might need to provide custom Schema
or ArgBuilder
instances if you use types that Caliban can't handle (see schema documentation).
Check the documentation for more information. There's also a full example in the examples project.
Other Changes
- Changed
Http4sAdapter.makeWebSocketService
's implementation so that incoming messages are processed in a child fiber, allowing usage ofFiberRef
#364 by @mitsutaka-takeda - Added options to the codegen tool to pass a custom scalafmt file or use custom headers when getting the schema by introspection #357 by @kiranbayram
- Fixed newline handling in graphql response when
toString
is used instead of Json #358 by @gjuhasz86 - Handled Scala reserved keywords properly in schema code generation
Build
- Upgraded Magnolia to 0.16.0
- Upgraded Monix to 3.2.1
- Upgrade http4s to 0.21.4
v0.7.6
Release Notes
Caliban
- Added support for arguments not wrapped in cases classes. That means a field can be of type
String => ???
orInt => ???
. In that case though, the arbitrary namevalue
will be used to name the argument. #342 by @ghostdogpr - Added support for variables in WebSockets #348 by @mitsutaka-takeda
- Added the option to disable introspection #329 by @joprice
- Added schema directives validation #333 by @javimartinez
- Made
ZQuery
run arbitrary effects in parallel when using the parallelism combinators #339 by @adamgfraser - Fixed validation rules to avoid an error saying that a type was defined multiple times when creating a custom schema #346 by @ghostdogpr
Caliban Client
- Added support for
Json
scalar in Caliban Client #345 by @ghostdogpr - Added code generation for the
Subscription
object #340 by @rleibman - Prevented the client generation from creating code that doesn't compile when
_
is used as a field by @ghostdogpr
Build
- Made the codegen usable as a library (
caliban-codegen
) separated from the sbt plugin (now namedcaliban-codegen-sbt
) #327 by @joprice - Stopped publishing the backend components for Scala.js (Scala.js stays of course available for
caliban-client
) #324 by @ghostdogpr - Upgraded Magnolia to 0.15.0 and started using
ReadOnlyCaseClass
for improved compile times #324 by @ghostdogpr
v0.7.5
Release Notes
- Added support for Apollo Federation via a new module called
caliban-federation
#314 by @paulpdaniels - Allowed the codegen tool to work directly from a GraphQL API URL, using introspection #318 by @ghostdogpr
- Added the ability to send keep-alive messages in the adapters that support WebSockets #317 #323 by @rleibman @ghostdogpr
- Added
ZQuery#orDie
#320 by @adamgfraser
v0.7.4
Release Notes
- Added a new adapter for uzhttp, a new minimal, low-level HTTP server library powered by ZIO. A good choice if you only need to expose your GraphQL API and don't need extra capabilities. WebSockets are supported as well. The example is the simplest of all the adapters! #313 by @ghostdogpr
- Added support for Apollo Persisted Queries using a new Wrapper #302 by @ghostdogpr
- Fixed an issue causing compilation issues when using different ZIO environments in different places. With this fix, it is no longer required to use the same env everywhere in your API #311 by @ghostdogpr
- Added a helper and an example to make http4s middleware creation easier (e.g. for authentication) #310 by @ghostdogpr
- Added instances of
ArgBuilder
forSeq
,Set
andVector
#304 by @javimartinez - Added GET variant to the Finch adapter #312 by @javimartinez
- Added various aliases for
ZQuery
#306 by @adamgfraser - Added
ArgBuilder
example to the docs #315 by @gjuhasz86
v0.7.3
Release Notes
Akka Http Adapter
There are some minor breaking changes to akka-http adapter API.
With this release AkkaHttpAdapter
doesn't lock you up with circe
, but lets you choose a json backend between circe
and play-json
.
The simplest way to keep previous behavior is to:
- mixin
AkkaHttpCirceAdapter
trait to your endpoint definition wrapper - add
"de.heikoseeberger" %% "akka-http-circe" % "1.31.0"
dependency to yourbuild.sbt
, because now it's optional forcaliban-akka-http
. Luckily, compiler will detect if it's missing. - Use
adapter
instead ofAkkaHttpAdapter
to create routes.
You can see an example of this simple migration here.
A more composable and recommended way to create caliban adapter would be this (this time it's play-json):
val adapter = AkkaHttpAdapter(new PlayJsonBackend)
Other Changes
- Fixed an issue in
ZQuery
causing some effects to be evaluated twice #291 by @adamgfraser - Added
ZQuery#optional
#293 by @adamgfraser - Added
Schema
instances forSeq
andVector
#297 by @ghostdogpr - Added
Schema
instance for PlayJson
#294 by @vpavkin