Merge pull request #395 from leebenson/leebenson/default_with
Book fix for `default_with`
This commit is contained in:
commit
28577d80a9
@ -36,7 +36,7 @@ use async_graphql::*;
|
||||
#[graphql(
|
||||
field(name = "test1", arg(name = "value", default)),
|
||||
field(name = "test2", arg(name = "value", default = 10)),
|
||||
field(name = "test3", arg(name = "value", default = "my_default()")),
|
||||
field(name = "test3", arg(name = "value", default_with = "my_default()")),
|
||||
)]
|
||||
enum MyInterface {
|
||||
MyObj(MyObj),
|
||||
@ -56,7 +56,7 @@ struct MyInputObject {
|
||||
#[graphql(default = 10)]
|
||||
value2: i32,
|
||||
|
||||
#[graphql(default = "my_default()")]
|
||||
#[graphql(default_with = "my_default()")]
|
||||
value3: i32,
|
||||
}
|
||||
```
|
||||
|
@ -35,7 +35,7 @@ use async_graphql::*;
|
||||
#[graphql(
|
||||
field(name = "test1", arg(name = "value", default)),
|
||||
field(name = "test2", arg(name = "value", default = 10)),
|
||||
field(name = "test3", arg(name = "value", default = "my_default()")),
|
||||
field(name = "test3", arg(name = "value", default_with = "my_default()")),
|
||||
)]
|
||||
enum MyInterface {
|
||||
MyObj(MyObj),
|
||||
@ -55,7 +55,7 @@ struct MyInputObject {
|
||||
#[graphql(default = 10)]
|
||||
value2: i32,
|
||||
|
||||
#[graphql(default = "my_default()")]
|
||||
#[graphql(default_with = "my_default()")]
|
||||
value3: i32,
|
||||
}
|
||||
```
|
Loading…
Reference in New Issue
Block a user