File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ is what will be generated:
9
9
10
10
```rust
11
11
# #[macro_use] extern crate juniper;
12
-
12
+ #
13
13
graphql_input_object!(
14
14
description: "Coordinates for the user"
15
15
@@ -29,6 +29,21 @@ and arguments.
29
29
If you want to expose the struct under a different name than the Rust
30
30
type, you can write `struct Coordinates as "MyCoordinates" { ...`.
31
31
32
+ You can specify *default values* for input object fields; the syntax
33
+ is similar to argument default values:
34
+
35
+ ```rust
36
+ # #[macro_use] extern crate juniper;
37
+ #
38
+ graphql_input_object!(
39
+ struct SampleObject {
40
+ foo = 123: i64 as "A sample field, defaults to 123 if omitted"
41
+ }
42
+ );
43
+
44
+ # fn main() { }
45
+ ```
46
+
32
47
*/
33
48
#[ macro_export]
34
49
macro_rules! graphql_input_object {
You can’t perform that action at this time.
0 commit comments