2.7 KiB
[0.10.0] 2018-09-13
Changes
-
Changed serialization of
NaiveDate
when using the optionalchronos
support.Note: while this is not a Rust breaking change, if you relied on the serialization format (perhaps by storing serialized data in a database or making asumptions in your client code written in another language) it could be a breaking change for your application.
-
The
GraphQLObject
,GraphQLInputObject
, andGraphQLEnum
custom derives will reject invalid names at compile time. -
Large integers (> signed 32bit) are now deserialized as floats. Previously, they produced an "integer out of range" error. For languages that do not have a distinction between integer and floating point types (such as javascript), this meant large whole floating point values could not be decoded (because they were represented without a fractional value such as
.0
). -
The
GraphQLObject
,GraphQLInputObject
, andGraphQLEnum
custom derives now parse doc strings and use them as descriptions. This behavior can be overridden by using an explicit GraphQLdescription
annotation such as#[graphql(description = "my description")]
. -
Introduced
IntoFieldError
trait to allow custom error handling i.e. custom result type. The error type must implement this trait resolving the errors intoFieldError
. -
GraphQLType
andToInputValue
are now implemented for Arc -
Error responses no longer have a data field, instead, error details are stored in the extensions field
Note: while this is a breaking change, it is a necessary one to better align with the latest GraphQL June 2018 specification, which defines the reserved extensions field for error details.