All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Add
DataLoader::enable_all_cache
andDataLoader::enable_cache
methods. #642 - Change the execution order of
chain
andrace
guards. #614 - Change log level from
error
toinfo
. #518
- Add support for
graphql-ws
pings. #635 - Add feature gate
websocket
for async-graphql-tide. #636 - Implement GraphQL enum to
Value
conversion. #617 - Implement
ScalarType
forHashMap
/BTreeMap
to useToString
/FromStr
. #585
- Add support for serde_cbor. #619
- Released
Axum
integration.async-graphql-axum
- Implement
From<MaybeUndefined<T>> for Option<Option<T>>
. #599 - Add human readable for serializer. #604
- Change
GraphQLPlaygroundConfig::with_setting
to acceptimpl Into<Value>
#583 - Remove unnecessary unwrap in multipart handler #594
- Add binary types to
ConstValue
andValue
. #569 - Implemented
OutputType
for Bytes. - Changed Lookahead to support multiple fields. #574
- Implement
TryFrom<&[SelectionField<'a>]>
forLookahead<'a>
. #575 - Attach custom HTTP headers to the response when an error occurs. #572
- Allow field visible to support paths. #578
- Add support for the
list
operator to the input value validator. #579
- Add support for generic
ComplexObject
. #562
-
Implement
From<SelectionField>
forLookahead
. #557 -
Add Decimal scalar (from
rust_decimal
crate) #559
- Allows to get the actual field name and alias in
ResolveInfo
. #551
- Fix the bug that
MergedObject
may cause panic. #539
-
Bump upstream crate
bson
fromv1.2.0
tov2.0.0-beta.1
. #516 -
Add
serial
attribute forObject
,SimpleObject
andMergedObject
macros. #539 -
Remove the
static
constraint of thereceive_body
andreceive_batch_body
functions. #544 -
Implement
InputType
andOutputType
for[T; N]
array.
- Rework error propagation. #531
-
Add support for returning multiple resolver errors. #531
-
Bump upstream crate
multer
fromv1.2.2
tov2.0.0
. -
Aligned NaiveDateTime formatting with DateTime. #535
-
Allow the ability to set GraphQL Playground settings. #508
-
WebSocket is now generic in graphql_subscription_upgrade functions. #530
-
Removed
Copy
trait from initializer ingraphql_subscription_with_data
. #530
-
If
InputObject
contains an unnamed field, the correct error message will be given. #498 -
Added
Websocket::with_message_stream
for client message customization. #501 -
Added the
Secret
type using secrecy crate.
- Fix the problem that the
ComplexObject
macro cannot work due to thesecret
attribute.
- Fixed an error in exporting Federation SDL.
- Now when the resolver returns the
Result
type,E
can be all types that implementasync_graphql::Into<Error>
.
- Fix stack overflow during Registry::create_type for recursive type while running Schema::build. #474
- Add
secret
attribute for arguments, they will not appear in the log.
#[Object]
impl Query {
async fn login(&self, username:String, #[graphql(secret)] password: String) -> i32 {
todo!()
}
}
- Rework
Extension
, now fully supports asynchronous, better to use than before, and can achieve more features, it contains a lot of changes. (if you don't have a custom extension, it will not cause the existing code to fail to compile)
- Add
async_graphql_warp::graphql_protocol
,async_graphql_warp::graphql_subscription_upgrade
andasync_graphql_warp::graphql_subscription_upgrade_with_data
to control WebSocket subscription more finely.
- Add the
BuildHasher
generic parameter todataloader::HashMapCache
to allow custom hashing algorithms. #455
- Add cache support for DataLoader. #455
- Implements
ScalarType
forserde_json::Value
. - Add
SelectionField::alias
andSelectionField::arguments
methods.
- Prevent Warp WS Close, Ping, and Pong messages from being parsed as GraphQL #459
- Fix Schema::sdl() does not include subscription definitions. #464
- Remove
SchemaBuilder::override_name
method. #437
- Add
name
andvisible
attributes forNewtype
macro for define a new scalar. #437 NewType
macro now also implementsFrom<InnerType>
andInto<InnerType>
.
- Add
Request::disable_introspection
method. #456
- Fix chrono-tz integration. #452
- Rework Extension & TracingExtension & OpenTelemetryExtension
- In websocket, if the client sends
start
beforeconnection_init
, the connection will be immediately disconnected and return1011
error. #451
- Fix docs.
- Add
extension::OpenTelemetry
.
- Remove
TracingConfig
, now Request span always takes the current span as the parent, so this option is no longer needed. - Remove
multipart
feature.
- Now all features are not activated by default.
- Add
SchemaBuilder::enable_subscription_in_federation
method. #449
- Fix tracing extension doesn't work with async code. #448
- Add ComplexObject macro.
- Add
DataLoader::loader
method. #441 - Fix the validation does not work on some inline fragments.
- Support generics in Subscription types. #438
- Remove unnecessary Box from WebSocket messages.
- Export subscription type to Federation SDL. (for GraphGate 😁)
- Add
extends
attribute for derive macros Subscription and MergedSubscription. - Add
SchemaBuilder::override_name
method. #437
- Execute
_entity
requests in parallel. #431
- Add descriptions for the exported Federation SDL.
- Moved
Variables
fromasync_graphql::context::Variables
toasync_graphql::Variables
.
-
Allow the
deprecation
attribute to have no reason.#[derive(SimpleObject)] struct MyObject { #[graphql(deprecation)] a: i32, #[graphql(deprecation = true)] b: i32, #[graphql(deprecation = false)] c: i32, #[graphql(deprecation = "reason")] d: i32, }
- Fix the problem that the borrowing lifetime returned by the
Context::data
function is too small.
- When introspection is disabled, introspection related types are no longer registered.
- Add support for Federation nested keys.
- Fixed the error that the directive locations
FIELD_DEFINITION
andENUM_VALUE
cannot be parsed.
- Fixed #409
- Add subscription support for tide with tide-websockets.
- Fixed the bug that can accept subscription requests during the initialization of WebSocket.
- Fixed GraphQL over WebSocket Protocol does not support ConnectionError events. #406