This commit is contained in:
sunli 2020-04-05 16:14:22 +08:00
parent 185e1fb8e6
commit 79f46843aa
7 changed files with 10 additions and 10 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "async-graphql"
version = "1.7.3"
version = "1.7.4"
authors = ["sunli <scott_s829@163.com>"]
edition = "2018"
description = "The GraphQL server library implemented by rust"
@ -18,7 +18,7 @@ default = ["bson", "uuid", "url", "chrono-tz", "validators"]
validators = ["regex"]
[dependencies]
async-graphql-derive = { path = "async-graphql-derive", version = "1.7.3" }
async-graphql-derive = { path = "async-graphql-derive", version = "1.7.4" }
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.7.3"
version = "0.7.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.7.3" }
async-graphql = { path = "..", version = "1.7.4" }
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.7.3"
version = "1.7.4"
authors = ["sunli <scott_s829@163.com>"]
edition = "2018"
description = "Macros for async-graphql"

View File

@ -67,7 +67,7 @@ impl<'a> TypeName<'a> {
pub fn unwrap_non_null(&self) -> Self {
match self {
TypeName::NonNull(ty) => TypeName::create(ty),
_ => self.clone(),
_ => *self,
}
}

View File

@ -125,7 +125,7 @@ impl<'a> Visitor<'a> for VariableInAllowedPosition<'a> {
self.variable_usages
.entry(scope.clone())
.or_insert_with(Vec::new)
.push((name.as_str(), pos, expected_type.clone()));
.push((name.as_str(), pos, *expected_type));
}
}
}

View File

@ -166,10 +166,10 @@ pub fn is_valid_input_value(
}
}
for name in input_names {
if let Some(name) = input_names.iter().next() {
return Some(valid_error(
&path_node,
format!("unknown field \"{}\" of type \"{}\"", name, ty.name(),),
format!("unknown field \"{}\" of type \"{}\"", name, ty.name()),
));
}

View File

@ -633,7 +633,7 @@ fn visit_directives<'a, V: Visitor<'a>>(
v.enter_argument(ctx, d.position, name, value);
let expected_ty = schema_directive
.and_then(|schema_directive| schema_directive.args.get(name.as_str()))
.and_then(|input_ty| Some(TypeName::create(&input_ty.ty)));
.map(|input_ty| TypeName::create(&input_ty.ty));
ctx.with_input_type(expected_ty, |ctx| {
visit_input_value(v, ctx, d.position, expected_ty, value)
});