This commit is contained in:
Sunli 2020-10-14 10:25:41 +08:00
parent 062bb10765
commit 715d39b50c
13 changed files with 25 additions and 23 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "async-graphql"
version = "2.0.0"
version = "2.0.1"
authors = ["sunli <scott_s829@163.com>", "Koxiaet"]
edition = "2018"
description = "A GraphQL server library implemented in Rust"
@ -24,9 +24,9 @@ string_number = ["num-traits"]
nightly = []
[dependencies]
async-graphql-derive = { path = "derive", version = "2.0.0" }
async-graphql-value = { path = "value", version = "2.0.0" }
async-graphql-parser = { path = "parser", version = "2.0.0" }
async-graphql-derive = { path = "derive", version = "2.0.1" }
async-graphql-value = { path = "value", version = "2.0.1" }
async-graphql-parser = { path = "parser", version = "2.0.1" }
async-stream = "0.3"
async-trait = "0.1.30"

View File

@ -1,6 +1,6 @@
[package]
name = "graphql-benchmark"
version = "2.0.0"
version = "2.0.1"
authors = ["sunli <scott_s829@163.com>", "Koxiaet"]
edition = "2018"

View File

@ -1,6 +1,6 @@
[package]
name = "chat"
version = "2.0.0"
version = "2.0.1"
authors = ["Ivan Plesskih <terma95@gmail.com>"]
edition = "2018"

View File

@ -1,6 +1,6 @@
[package]
name = "simple"
version = "2.0.0"
version = "2.0.1"
authors = ["Ivan Plesskih <terma95@gmail.com>"]
edition = "2018"

View File

@ -1,6 +1,6 @@
[package]
name = "async-graphql-derive"
version = "2.0.0"
version = "2.0.1"
authors = ["sunli <scott_s829@163.com>", "Koxiaet"]
edition = "2018"
description = "Macros for async-graphql"
@ -16,7 +16,7 @@ categories = ["network-programming", "asynchronous"]
proc-macro = true
[dependencies]
async-graphql-parser = { path = "../parser", version = "2.0.0" }
async-graphql-parser = { path = "../parser", version = "2.0.1" }
proc-macro2 = "1.0.6"
syn = { version = "1.0.20", features = ["full", "extra-traits"] }
quote = "1.0.3"

View File

@ -10,7 +10,9 @@ pub enum OutputType<'a> {
impl<'a> OutputType<'a> {
pub fn parse(input: &'a Type) -> Result<Self> {
let ty = if let Type::Path(p) = input {
if p.path.segments.last().unwrap().ident == "Result" {
if p.path.segments.last().unwrap().ident == "Result"
|| p.path.segments.last().unwrap().ident == "FieldResult"
{
if let PathArguments::AngleBracketed(args) =
&p.path.segments.last().unwrap().arguments
{

View File

@ -1,6 +1,6 @@
[package]
name = "async-graphql-actix-web"
version = "2.0.0"
version = "2.0.1"
authors = ["sunli <scott_s829@163.com>", "Koxiaet"]
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 = "2.0.0" }
async-graphql = { path = "../..", version = "2.0.1" }
actix-web = { version = "3.0.2", default-features = false }
actix-web-actors = "3.0.0"
actix-http = "2.0.0"

View File

@ -1,6 +1,6 @@
[package]
name = "async-graphql-rocket"
version = "2.0.0"
version = "2.0.1"
authors = ["Daniel Wiesenberg <daniel@simplificAR.io>"]
edition = "2018"
description = "async-graphql for Rocket.rs"
@ -14,7 +14,7 @@ keywords = ["futures", "async", "graphql", "rocket"]
categories = ["network-programming", "asynchronous"]
[dependencies]
async-graphql = { path = "../..", version = "2.0.0" }
async-graphql = { path = "../..", version = "2.0.1" }
rocket = { git = "https://github.com/SergioBenitez/Rocket/", rev = "dc2c6ec", default-features = false } #TODO: Change to Cargo crate, when Rocket 0.5.0 is released
log = "0.4.11"
yansi = "0.5.0"

View File

@ -1,6 +1,6 @@
[package]
name = "async-graphql-tide"
version = "2.0.0"
version = "2.0.1"
authors = ["vkill <vkill.net@gmail.com>"]
edition = "2018"
description = "async-graphql for tide"
@ -13,7 +13,7 @@ keywords = ["futures", "async", "graphql"]
categories = ["network-programming", "asynchronous"]
[dependencies]
async-graphql = { path = "../..", version = "2.0.0" }
async-graphql = { path = "../..", version = "2.0.1" }
tide = { version = "0.13.0", default-features = false, features = ["h1-server"] }
async-trait = "0.1.36"
serde_json = "1.0.56"

View File

@ -1,6 +1,6 @@
[package]
name = "async-graphql-warp"
version = "2.0.0"
version = "2.0.1"
authors = ["sunli <scott_s829@163.com>", "Koxiaet"]
edition = "2018"
description = "async-graphql for warp"
@ -13,7 +13,7 @@ keywords = ["futures", "async", "graphql"]
categories = ["network-programming", "asynchronous"]
[dependencies]
async-graphql = { path = "../..", version = "2.0.0" }
async-graphql = { path = "../..", version = "2.0.1" }
warp = { version = "0.2", default-features = false, features = ["websocket"] }
futures = "0.3.0"
bytes = "0.5.4"

View File

@ -1,6 +1,6 @@
[package]
name = "async-graphql-parser"
version = "2.0.0"
version = "2.0.1"
authors = ["sunli <scott_s829@163.com>", "Koxiaet"]
edition = "2018"
description = "GraphQL query parser for async-graphql"
@ -13,7 +13,7 @@ keywords = ["futures", "async", "graphql"]
categories = ["network-programming", "asynchronous"]
[dependencies]
async-graphql-value = { path = "../value", version = "2.0.0" }
async-graphql-value = { path = "../value", version = "2.0.1" }
pest = "2.1.3"
pest_derive = "2.1.0"
serde_json = "1.0.57"

View File

@ -244,13 +244,13 @@ pub async fn test_interface_field_result() {
#[Object]
impl MyObj {
async fn value(&self) -> Result<i32> {
async fn value(&self) -> FieldResult<i32> {
Ok(10)
}
}
#[derive(Interface)]
#[graphql(field(name = "value", type = "Result<i32>"))]
#[graphql(field(name = "value", type = "i32"))]
enum Node {
MyObj(MyObj),
}

View File

@ -1,6 +1,6 @@
[package]
name = "async-graphql-value"
version = "2.0.0"
version = "2.0.1"
authors = ["sunli <scott_s829@163.com>", "Koxiaet"]
edition = "2018"
description = "GraphQL value for async-graphql"