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.
- docs: Tweak dataloader example and link to full example #1194
- docs: Mention the importance of using dataloader with federation/entities #1194
- chore: enable GraphiQL/Playground via feature flag #1202
- fix: Export directives to federation SDL so they can be composed. #1209
- Fix doc contents details and add AutoCorrect lint to CI. #1210
- fix: provide correct type for _service with dynamic schema #1212
- feat(subscription): support generics in MergedSubscription types #1222
- feat: modify Connection to allow optionally disable nodes field in gql output. #1218
- fixes interface type condition query #1228
- fixes #1226
- update MSRV to
1.64.0
- dynamic schema: add boxed_any function #1179
- Improve GraphiQL v2 #1182
- Fix: __Type.oneOf to __Type.isOneOf #1188
- Implemente From for ConstValue #1169
- Fixes #1192
- Fix named_list_nn #1172
- Add
DynamicRequestExt::root_value
to specify the root value for the request - Change
CustomValidator::check
returns error type fromString
toInputValueError<T>
. - Add support that custom validators can set error extensions. #1174
- Fixes #1157
- Add boolean dynamic ValueAccessor method #1153
- Update MSRV to
1.60.0
- [async-graphql-axum] bump axum from
0.5.1
to0.6.0
#1106
- Add support to federation(v2) for dynamic schema
- Simplified way to create type reference
dynamic::TypeRef
- Keep object 'implements' order stable in SDL export #1142
- Fix regression on
ComplexObject
descriptions #1141
- Add support for dynamic schema
- Add
tempfile
feature, enabled by default
- Add support for using
Union
andOneofObject
on the same struct #1116
- Add credentials to GraphiQL 2 #1105
- Add TypeName support for InputObject #1110
- Fix error message #1058
- Add TypeName support for Enum, Union, OneofInputObject, Subscription, MergedObject, MergedSubscription, Scalar, Interface, Directive
- Fixes #1052
- Implement
CustomValidator<T>
forF: Fn(&T) -> Result<(), E: Into<String>>
- Add
validator
attribute toInputObject
macro #1072
- Dynamic Document Title for GraphiQL v2 and GraphQL Playground #1099
- Skip tracing for introspection queries. #841
- Add
SchemaBuilder::disable_suggestions
method to disable field suggestions. #1101
- Implement a simple approach to using the link directive. #1060
- docs: Update federation docs with examples of each directive. #1080
- Add support for parse request from query string. #1085
- Compare to expected schema #1048
- docs: readme flair #1054
- Remove
bson-uuid
feature #1032 - Add
no_cache
forcache_control
attribute #1051 - Resurrect code generation through tests #1062
- Support for primitive type in CursorType #1049
- Add
SDLExportOptions::include_specified_by
method to enablespecifiedBy
directive #1065
- Update MSRV to
1.59.0
- Support
@specifiedBy
directive in SDL export #1041 - Add GraphiQL v2 #1044
- Export SDL: consistently avoid trailing spaces #1043
- Define
override
directive on fields #1029 - Add
@tag
support #1038 - Export SDL: avoid trailing space for scalar definitions #1036
- Fixes #1039
- Fixes extension
request.data(X)
being lost in the resolver #1018 - Add Apollo federation
@shareable
directive support #1025 - Add Apollo Federation
@inaccessible
directive support #1026
on_connection_init
takesFnOnce
instead ofFn
#1022
- Add tracing to dataloader methods when the tracing feature is enabled. #996
- Limit parser recursion depth to
64
.
- Limit execution recursion depth to
32
by default.
- Fix serializing of JSON default values #969
- Bump
rocket-0.5.0-rc.1
torocket-0.5.0-rc.2
forasync-graphql-rocket
#968 - Implement
Default
forStringNumber
#980 - Implement
Guard
forFn
- Fix impossible to specify both
name
andinput_name
#987
- Bump Actix-web from
4.0.1
to4.1.0
- Add a
prefer_single_line_descriptions
option onSDLExportOptions
#955 - Fixes #957
- Fixes #943
- Custom error type in axum request extractor #945
- Add nodes exposure on
ConectionType
so nesting through edges isn't always needed. #952 - Make email-validator optional #950
- Expose
Edge::node
to allow better testing. #933 - Integrate with the
bigdecimal
crate. #926 - Improve the examples in the book. #940
- Fixed #941
- Fixed #848
- Bump
darling
from0.13.0
to0.14.0
#939 - Fixed #9461
- Add
Schema::build_with_ignore_name_conflicts
method to specifies a list to ignore type conflict detection.
- Implement the
ConnectionNameType
andEdgeNameType
traits to specify GraphQL type names forConnection
andEdge
, which can be automatically generated usingDefaultConnectionName
andDefaultEdgeName
. - Add
#[non_exhaustive]
attribute to Request/Response types. - Introduce ability to pre-parse Request's query. #891
- Add
introspection-only
mode. #894 - Add
bson-uuid
feature to implementScalarType
forbson::Uuid
. #875 - Bump
regex
crate from1.4.5
to1.5.5
. #862 - Bump
chrono-tz
crate from0.5.3
to0.6.1
. #831 - Move the pest parser code generation step into a test. #901
- Update
log
to version0.4.16
. #903 - Added impl of
CursorType
for floats #897 - Implement
OutputType
fortokio::sync::RwLock
andtokio::sync::Mutex
. #896 - Bump
uuid
to1.0.0
. #907 - Add some options for exporting SDL. #877
- Cache parsed
ExecuteDocument
in APQ. #919 - Fixed
OneofObject
restriction on inner types being unique. #923
- 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_to
method. #881
- Panics when the same Rust type has the same name. #880
- Make
HashMap
more generics forInputOutput
andOutputType
. - Add support
group
attribute to Object/SimpleObject/ComplexObject/Subscription macros. #838 - Fixed recursive generic input objects failing to compile. #859
- Add
ErrorExtensionValues::get
method. #855
- Export
@oneOf
directive to SDL when Oneof type is defined. #766
- Add support for oneof field on object. #766
- Bump
Actix-web
from4.0.0-rc.3
to4.0.1
.
- Add
OneOfObject
macro to support for oneof input object. - Bump actix-web from
4.0.0-rc.2
to4.0.0-rc.3
.
- Implement
ScalarType
fortime::Date
. #822
- Pass context to resolvers with flatten attribute. #813
- Add support for using both
ComplexObject
andInputObject
. - Bump
Actix-web
from4.0.0-beta.19
to4.0.0-rc.2
.
- Implement
InputType
andOutputType
forBox<[T]>
andArc<[T]>
. #805
- Fix possible stack overflow in validator, thanks @quapka.
- Add
skip_input
attribute toInputObject
macro,skip_output
attribute toSimpleObject
macro.
- Fixed some integrations overwritten HTTP headers. #793
- Fixed variable type not checked when given a default value. #795
- Remove
'static
bound forimpl From<T> for Error
.
- Bump hashbrown from
0.11.2
to0.12.0
. - Implement
InputType
forBox<str>
andArc<str>
. #792 - Add scalars for the
time
crate's datetime types. #791 - Add
DataContext
trait. #786
- Add support
flatten
attribute forSimpleObject
,ComplexObject
andObject
macros. #533 - Actix integration: cbor response support + error handling improvements #784
- Add
Union
andInterface
support for trait objects. #780
- Bump
lru
to0.7.1
. #773 - Align
indexmap
version to1.6.2
. #776 - Bump actix-web from
4.0.0-beta.18
to4.0.0-beta.19
. - Fix the generic
SimpleObject
can't define the lifetimes. #774
- Add
InputType
/OutputType
support forhashbrown
crate. - Bump actix-web from
4.0.0-beta.14
to4.0.0-beta.18
. #768
- Federation's
_Entity
should 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.11
to4.0.0-beta.14
.
- [async-graphql-axum] bump axum from
0.3
to0.4
.
- No longer assumes that a subscription stream that failed to resolve has ended. #744
- Rework to implement
InputType
andOutputType
forHashMap
andBTreeMap
.
- 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_items
andmin_items
.- Implement
InputValue
/OutputValue
forserde_json::Value
. - Add support for
SmolStr
via a feature. #730
- Fix error extensions cause stack overflow. #719
- Custom directives. Book
- Remove skipped fields from the document before executing the query.
- Add
isRepeatable
field to__Directive
- [GraphQL - October 2021]
- Remove
OutputJson
becauseJson
can replace it. - Allowed use validators on wrapper types, for example:
Option<T>
,MaybeUnefined<T>
.
- [integrations] Make
GraphQLWebSocket::new
use generic stream. - [integrations] Add
GraphQLWebSocket::new_with_pair
method.
- Add
url
,regex
andip
validators.
- Remove the
ctx
parameter ofCustomValidator::check
. #710
- Change the signature of the
connection::query
function to allow the callback to use any type that implementsInto<Error>
. - Remove
ResolverError
and useError::new_with_source
instead. - Add
ErrorExtensionValues::unset
method. - Use the
SimpleObject
macro and theInputObject
macro 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
EmptyMutation
may cause when used inMergedObject
. #694 - If a GraphQL name conflict is detected when creating schema, it will cause panic. #499
- Add
chrono::Duration
custom 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::transpose
methods. - Made
MaybeUndefined::is_undefined
,MaybeUndefined::is_null
,MaybeUndefined::is_value
,MaybeUndefined::value
andMaybeUndefined::as_opt_ref
const. - Add
ResolverError
type. #671 - [async-graphql-axum] Bump axum from
0.2.5
to0.3
. - [async-graphql-poem] Export the HTTP headers in the
Context
.
- Use Rust
2021
edition. - Subscription typename - [GraphQL - October 2021] #681
- Allow directive on variable definition - [GraphQL - October 2021] #678
- Specified By - [GraphQL - October 2021] #677
- Add
specified_by_url
forTz
,DateTime<Tz>
,Url
,Uuid
andUpload
scalars. - 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.6
to1.0.7
.
- Implement
Default
for ID #659. - Implement
ScalarType
forbson::Bson
andbson::Document
. #661 - Add
CharsMinLength
andCharsMaxLength
validators. #656 - Fix the
Subscription
macro to work on Rust 2021. #665
- Add
visible
macro argument for union type. #655
- 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
list
attribute 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