This commit is contained in:
sunli 2020-03-26 17:14:49 +08:00
parent 56d8967d3b
commit f8c284d9d4
5 changed files with 17 additions and 17 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "async-graphql"
version = "1.6.0"
version = "1.6.1"
authors = ["sunli <scott_s829@163.com>"]
edition = "2018"
description = "The GraphQL server library implemented by rust"
@ -18,7 +18,7 @@ default = ["bson", "uuid", "url", "validators"]
validators = ["regex", "once_cell"]
[dependencies]
async-graphql-derive = { path = "async-graphql-derive", version = "1.6.0" }
async-graphql-derive = { path = "async-graphql-derive", version = "1.6.1" }
graphql-parser = "0.2.3"
anyhow = "1.0.26"
thiserror = "1.0.11"

View File

@ -1,6 +1,6 @@
[package]
name = "async-graphql-actix-web"
version = "0.6.3"
version = "0.6.4"
authors = ["sunli <scott_s829@163.com>"]
edition = "2018"
description = "async-graphql for actix-web"
@ -13,7 +13,7 @@ keywords = ["futures", "async", "graphql"]
categories = ["network-programming", "asynchronous"]
[dependencies]
async-graphql = { path = "..", version = "1.6.0" }
async-graphql = { path = "..", version = "1.6.1" }
actix-web = "2.0.0"
actix-multipart = "0.2.0"
actix-web-actors = "2.0.0"

View File

@ -1,6 +1,6 @@
[package]
name = "async-graphql-derive"
version = "1.6.0"
version = "1.6.1"
authors = ["sunli <scott_s829@163.com>"]
edition = "2018"
description = "Macros for async-graphql"

View File

@ -59,12 +59,12 @@ pub fn generate(interface_args: &args::Interface, input: &DeriveInput) -> Result
possible_types.insert(<#p as #crate_name::Type>::type_name().to_string());
});
collect_inline_fields.push(quote! {
// if name == <#p as #crate_name::Type>::type_name() {
// if let #ident::#enum_name(obj) = self {
// return &obj;
// }
// unreachable!()
// }
if name == <#p as #crate_name::Type>::type_name() {
if let #ident::#enum_name(obj) = self {
return #crate_name::collect_fields(ctx, obj, futures);
}
unreachable!()
}
});
} else {
return Err(Error::new_spanned(field, "Invalid type"));

View File

@ -55,12 +55,12 @@ pub fn generate(interface_args: &args::Interface, input: &DeriveInput) -> Result
possible_types.insert(<#p as #crate_name::Type>::type_name().to_string());
});
collect_inline_fields.push(quote! {
// if name == <#p as #crate_name::Type>::type_name() {
// if let #ident::#enum_name(obj) = self {
// return &obj;
// }
// unreachable!()
// }
if name == <#p as #crate_name::Type>::type_name() {
if let #ident::#enum_name(obj) = self {
return #crate_name::collect_fields(ctx, obj, futures);
}
unreachable!()
}
});
} else {
return Err(Error::new_spanned(field, "Invalid type"));