Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 29, 2021

Bumps caliban-tools_2.13 from 0.9.5 to 1.3.0.

Release notes

Sourced from caliban-tools_2.13's releases.

v1.3.0

Release Notes

This release brings two important changes to Caliban:

  • the server adapters have been completely rewritten using Tapir
  • the Schema.gen function has been changed to make it easier to deal with ZIO environment, especially with Scala 3

New adapters based on Tapir

Adapters have been completely rewritten and are now sharing code thanks to Tapir, with the following benefits:

  • features are now consistent between each of the adapters: upload support, request interceptors, websocket hooks...
  • you can create your own adapter very easily for any library that Tapir supports
  • you can use the Json library of your choice easily
  • tapir endpoints can be used to generate an sttp client (our test suite takes advantage of that)

Notable changes:

  • FinchAdapter has been removed
  • PlayRouter has been removed, in favor of PlayAdapter which is consistent with the other adapters
  • AkkaHttpAdapter json support is now done via tapir
  • Http4sAdapter requires Clock with Blocking in the environment (this constraint comes from the tapir interpreter)
  • ContextWrapper is now RequestInterceptor
  • Callbacks is now WebSocketHooks

Look at the documentation for more info. Examples have been updated and migration shouldn't be difficult, but feel free to drop by Discord if you need any help.

Change done in #1125 by @​ghostdogpr

New gen function

TL;DR gen[A] becomes gen[R, A]

For Scala 2: You no longer need to worry about calling the right gen (from Schema vs GenericSchema), you can simply use Schema.gen everywhere. It now takes 2 type parameters R and A but you can usually omit them if you explicitly define the return type of your schema.

object schema extends GenericSchema[MyEnv]
import schema._
implicit val queriesSchema: Schema[MyEnv, Queries] = Schema.gen
// or
implicit val queriesSchema = Schema.gen[MyEnv, Queries]

If you use genMacro, you still need to do it on GenericSchema.

For Scala 3: It is no longer necessary to use GenericSchema[R]. You can simply use Schema.gen when you need to explicitly derive a schema. Caliban will be able to derive a Schema[R, A] directly from that.

If your R is not Any, you need to pass it to the graphQL function, unless you already have a Schema[R, Query] in scope:

val api = graphQL[MyEnv, Queries, Unit, Unit](https://github.com/ghostdogpr/caliban/blob/HEAD/RootResolver(queries))
</tr></table> 

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [caliban-tools_2.13](https://github.com/ghostdogpr/caliban) from 0.9.5 to 1.3.0.
- [Release notes](https://github.com/ghostdogpr/caliban/releases)
- [Commits](ghostdogpr/caliban@v0.9.5...v1.3.0)

---
updated-dependencies:
- dependency-name: com.github.ghostdogpr:caliban-tools_2.13
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Nov 29, 2021
@dependabot dependabot bot requested a review from johanneshiry November 29, 2021 04:21
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Dec 16, 2021

Superseded by #54.

@dependabot dependabot bot closed this Dec 16, 2021
@dependabot dependabot bot deleted the dependabot/gradle/main/com.github.ghostdogpr-caliban-tools_2.13-1.3.0 branch December 16, 2021 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant