Skip to content

Releases: ghostdogpr/caliban

v0.8.3

27 Jun 06:44
6ab4499
Compare
Choose a tag to compare

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

13 Jun 04:17
e608315
Compare
Choose a tag to compare

Release Notes

  • Renamed caliban-codegen to caliban-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 and ArgBuilder for ZIO Chunk #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

02 Jun 00:17
fb2f726
Compare
Choose a tag to compare

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

20 May 00:50
fb776fa
Compare
Choose a tag to compare

Release Notes

Major library upgrades

Support for the Play Framework

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

10 May 04:12
2efe7cb
Compare
Choose a tag to compare

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

05 May 02:14
Compare
Choose a tag to compare

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 of FiberRef #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

25 Apr 09:23
9b4a80e
Compare
Choose a tag to compare

Release Notes

Caliban

  • Added support for arguments not wrapped in cases classes. That means a field can be of type String => ??? or Int => ???. In that case though, the arbitrary name value 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 named caliban-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

15 Apr 11:23
c4f256f
Compare
Choose a tag to compare

Release Notes

v0.7.4

11 Apr 00:53
6b8c0ec
Compare
Choose a tag to compare

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 for Seq, Set and Vector #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

25 Mar 23:57
8366580
Compare
Choose a tag to compare

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 your build.sbt, because now it's optional for caliban-akka-http. Luckily, compiler will detect if it's missing.
  • Use adapter instead of AkkaHttpAdapter 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)

#292 #296 by @vpavkin

Other Changes