Fix for default_with
Signed-off-by: Lee Benson <lee@leebenson.com>
This commit is contained in:
parent
bce55dec08
commit
2d59fbed4a
|
@ -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