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.
- Implement the
ConnectionNameTypeandEdgeNameTypetraits to specify GraphQL type names forConnectionandEdge, which can be automatically generated usingDefaultConnectionNameandDefaultEdgeName. - Add
#[non_exhaustive]attribute to Request/Response types. - Introduce ability to pre-parse Request's query. #891
- Add
introspection-onlymode. #894 - Add
bson-uuidfeature to implementScalarTypeforbson::Uuid. #875 - Bump
regexcrate from1.4.5to1.5.5. #862 - Bump
chrono-tzcrate from0.5.3to0.6.1. #831 - Move the pest parser code generation step into a test. #901
- Update
logto version0.4.16. #903 - Added impl of
CursorTypefor floats #897 - Implement
OutputTypefortokio::sync::RwLockandtokio::sync::Mutex. #896 - Bump
uuidto1.0.0. #907 - Add some options for exporting SDL. #877
- Update Axum integration to Axum 0.5.1 #883
- Support macro type in enum variant. #884
- Introduce process_with for input object #817
- Add
MaybeUndefined::update_tomethod. #881
- Panics when the same Rust type has the same name. #880
- Make
HashMapmore generics forInputOutputandOutputType. - Add support
groupattribute to Object/SimpleObject/ComplexObject/Subscription macros. #838 - Fixed recursive generic input objects failing to compile. #859
- Add
ErrorExtensionValues::getmethod. #855
- Export
@oneOfdirective to SDL when Oneof type is defined. #766
- Add support for oneof field on object. #766
- Bump
Actix-webfrom4.0.0-rc.3to4.0.1.
- Add
OneOfObjectmacro to support for oneof input object. - Bump actix-web from
4.0.0-rc.2to4.0.0-rc.3.
- Implement
ScalarTypefortime::Date. #822
- Pass context to resolvers with flatten attribute. #813
- Add support for using both
ComplexObjectandInputObject. - Bump
Actix-webfrom4.0.0-beta.19to4.0.0-rc.2.
- Implement
InputTypeandOutputTypeforBox<[T]>andArc<[T]>. #805
- Fix possible stack overflow in validator, thanks @quapka.
- Add
skip_inputattribute toInputObjectmacro,skip_outputattribute toSimpleObjectmacro.
- Fixed some integrations overwritten HTTP headers. #793
- Fixed variable type not checked when given a default value. #795
- Remove
'staticbound forimpl From<T> for Error.
- Bump hashbrown from
0.11.2to0.12.0. - Implement
InputTypeforBox<str>andArc<str>. #792 - Add scalars for the
timecrate's datetime types. #791 - Add
DataContexttrait. #786
- Add support
flattenattribute forSimpleObject,ComplexObjectandObjectmacros. #533 - Actix integration: cbor response support + error handling improvements #784
- Add
UnionandInterfacesupport for trait objects. #780
- Bump
lruto0.7.1. #773 - Align
indexmapversion to1.6.2. #776 - Bump actix-web from
4.0.0-beta.18to4.0.0-beta.19. - Fix the generic
SimpleObjectcan't define the lifetimes. #774
- Add
InputType/OutputTypesupport forhashbrowncrate. - Bump actix-web from
4.0.0-beta.14to4.0.0-beta.18. #768
- Federation's
_Entityshould not be sent if empty as it's in conflict with GraphQL Union type validation #765. - Fix field guards not working on
ComplexObject. #767
- Bump poem to
1.2.2.
- Bump poem to
1.2.1.
- Bump actix-web from
4.0.0-beta.11to4.0.0-beta.14.
- [async-graphql-axum] bump axum from
0.3to0.4.
- No longer assumes that a subscription stream that failed to resolve has ended. #744
- Rework to implement
InputTypeandOutputTypeforHashMapandBTreeMap.
- Fix possible deadlock in dataloader. #555
- Add some helper methods for
BatchRequest.- BatchRequest::iter
- BatchRequest::iter_mut
- BatchRequest::variables
- BatchRequest::data
- BatchRequest::disable_introspection
- Fix implicit interfaces not being exposed via the __schema introspection. #741
- Fix panic on f32-64::INFINITE/f32-64::NEG_INFINITE/f32-64::NAN output. #735
- Fix the custom validator cannot work on
Option<Vec<T>>.
- Fix the validator cannot work on
Option<Vec<T>>.
#[graphql(validator(list))]no longer applies tomax_itemsandmin_items.- Implement
InputValue/OutputValueforserde_json::Value. - Add support for
SmolStrvia a feature. #730
- Fix error extensions cause stack overflow. #719
- Custom directives. Book
- Remove skipped fields from the document before executing the query.
- Add
isRepeatablefield to__Directive- [GraphQL - October 2021]
- Remove
OutputJsonbecauseJsoncan replace it. - Allowed use validators on wrapper types, for example:
Option<T>,MaybeUnefined<T>.
- [integrations] Make
GraphQLWebSocket::newuse generic stream. - [integrations] Add
GraphQLWebSocket::new_with_pairmethod.
- Add
url,regexandipvalidators.
- Remove the
ctxparameter ofCustomValidator::check. #710
- Change the signature of the
connection::queryfunction to allow the callback to use any type that implementsInto<Error>. - Remove
ResolverErrorand useError::new_with_sourceinstead. - Add
ErrorExtensionValues::unsetmethod. - Use the
SimpleObjectmacro and theInputObjectmacro at the same time. - Types that are not referenced will be hidden in introspection.
- Make the API of integrations is more consistent.
- Remove
async-graphql-tide. - Rework validators. Book
- Rework guards. Book
- Implemented CursorType for i32/i64. #701
- An error is returned when the number fails to parse. #704
- Fix Federation entity union is empty during schema introspection. #700
- Fix the problem that
EmptyMutationmay cause when used inMergedObject. #694 - If a GraphQL name conflict is detected when creating schema, it will cause panic. #499
- Add
chrono::Durationcustom scalar. #689 - Implement
From<Option<Option<T>>>forMaybeUndefined<T>. - Add
MaybeUndefined::as_opt_ref,MaybeUndefined::as_opt_deref,MaybeUndefined::map,MaybeUndefined::map_value,MaybeUndefined::contains,MaybeUndefined::contains_value, andMaybeUndefined::transposemethods. - Made
MaybeUndefined::is_undefined,MaybeUndefined::is_null,MaybeUndefined::is_value,MaybeUndefined::valueandMaybeUndefined::as_opt_refconst. - Add
ResolverErrortype. #671 - [async-graphql-axum] Bump axum from
0.2.5to0.3. - [async-graphql-poem] Export the HTTP headers in the
Context.
- Use Rust
2021edition. - Subscription typename - [GraphQL - October 2021] #681
- Allow directive on variable definition - [GraphQL - October 2021] #678
- Specified By - [GraphQL - October 2021] #677
- Add
specified_by_urlforTz,DateTime<Tz>,Url,UuidandUploadscalars. - Number value literal lookahead restrictions - [GraphQL - October 2021] #685
- [async-graphql-poem] Bump poem to
1.0.13.
- Add derived for object & simple object & complex object. #667 #670
- Respect query object field order. #612
- Bump poem from
0.6.6to1.0.7.
- Implement
Defaultfor ID #659. - Implement
ScalarTypeforbson::Bsonandbson::Document. #661 - Add
CharsMinLengthandCharsMaxLengthvalidators. #656 - Fix the
Subscriptionmacro to work on Rust 2021. #665
- Add
visiblemacro argument for union type. #655
- Add
DataLoader::enable_all_cacheandDataLoader::enable_cachemethods. #642 - Change the execution order of
chainandraceguards. #614 - Change log level from
errortoinfo. #518
- Add support for
graphql-wspings. #635 - Add feature gate
websocketfor async-graphql-tide. #636 - Implement GraphQL enum to
Valueconversion. #617 - Implement
ScalarTypeforHashMap/BTreeMapto useToString/FromStr. #585
- Add support for serde_cbor. #619
- Released
Axumintegration.async-graphql-axum
- Implement
From<MaybeUndefined<T>> for Option<Option<T>>. #599 - Add human readable for serializer. #604
- Change
GraphQLPlaygroundConfig::with_settingto acceptimpl Into<Value>#583 - Remove unnecessary unwrap in multipart handler #594
- Add binary types to
ConstValueandValue. #569 - Implemented
OutputTypefor 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
listattribute to the input value validator. #579
- Add support for generic
ComplexObject. #562
-
Implement
From<SelectionField>forLookahead. #557 -
Add Decimal scalar (from
rust_decimalcrate) #559
- Allows to get the actual field name and alias in
ResolveInfo. #551
- Fix the bug that
MergedObjectmay cause panic. #539
-
Bump upstream crate
bsonfromv1.2.0tov2.0.0-beta.1. #516 -
Add
serialattribute forObject,SimpleObjectandMergedObjectmacros. #539 -
Remove the
staticconstraint of thereceive_bodyandreceive_batch_bodyfunctions. #544 -
Implement
InputTypeandOutputTypefor[T; N]array.
- Rework error propagation. #531
-
Add support for returning multiple resolver errors. #531
-
Bump upstream crate
multerfromv1.2.2tov2.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
Copytrait from initializer ingraphql_subscription_with_data. #530
-
If
InputObjectcontains an unnamed field, the correct error message will be given. #498 -
Added
Websocket::with_message_streamfor client message customization. #501 -
Added the
Secrettype using secrecy crate.
- Fix the problem that the
ComplexObjectmacro cannot work due to thesecretattribute.
- Fixed an error in exporting Federation SDL.
- Now when the resolver returns the
Resulttype,Ecan be all types that implementasync_graphql::Into<Error>.
- Fix stack overflow during Registry::create_type for recursive type while running Schema::build. #474
- Add
secretattribute 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_upgradeandasync_graphql_warp::graphql_subscription_upgrade_with_datato control WebSocket subscription more finely.
- Add the
BuildHashergeneric parameter todataloader::HashMapCacheto allow custom hashing algorithms. #455
- Add cache support for DataLoader. #455
- Implements
ScalarTypeforserde_json::Value. - Add
SelectionField::aliasandSelectionField::argumentsmethods.
- 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_namemethod. #437
- Add
nameandvisibleattributes forNewtypemacro for define a new scalar. #437 NewTypemacro now also implementsFrom<InnerType>andInto<InnerType>.
- Add
Request::disable_introspectionmethod. #456
- Fix chrono-tz integration. #452
- Rework Extension & TracingExtension & OpenTelemetryExtension
- In websocket, if the client sends
startbeforeconnection_init, the connection will be immediately disconnected and return1011error. #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
multipartfeature.
- Now all features are not activated by default.
- Add
SchemaBuilder::enable_subscription_in_federationmethod. #449
- Fix tracing extension doesn't work with async code. #448
- Add ComplexObject macro.
- Add
DataLoader::loadermethod. #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
extendsattribute for derive macros Subscription and MergedSubscription. - Add
SchemaBuilder::override_namemethod. #437
- Execute
_entityrequests in parallel. #431
- Add descriptions for the exported Federation SDL.
- Moved
Variablesfromasync_graphql::context::Variablestoasync_graphql::Variables.
-
Allow the
deprecationattribute 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::datafunction 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_DEFINITIONandENUM_VALUEcannot 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