v0.3.0
Release Notes
Partial failures
Caliban now supports partial failures: instead of returning either an error or a response, it will return a combination of a response and a list of errors. Fields that return an effect that can fail will be defined as nullable and return null
on failure, while adding an entry to the list of errors. Infallible effects like UIO
are unchanged.
GraphQL#execute
now returns a URIO[R, GraphQLResponse[E]]
with:
case class GraphQLResponse[+E](data: ResponseValue, errors: List[E])
If you use the Http4sAdapter
, there is nothing to change.
wrapExecutionWith
GraphQL#wrapExecutionWith
is a new method that takes a function and return a new GraphQL
interpreter that'll wrap the execute
method with this function. It is used to implement mapError
(customize errors) and provide
(eliminate the environment), but you can use it for other purposes such as adding a general timeout, logging response times, etc.
The GraphQL
type has a new type parameter E
so that you can change the error type.
Other Changes
- Made
ArgBuilder#build
return anEither
instead of anIO
. - Fixed enum values that were incorrectly suffixed by "Input"
- Added support for
BigInt
andBigDecimal
(they return a custom scalar) - Added
fieldName
inExecutionError
for better error diagnostics - Added an annotation
GQLInputName
to customize input type names - Upgraded ZIO to 1.0.0-RC17