Skip to content

Commit 5b1c5c6

Browse files
IcanDivideBy0LegNeato
authored andcommitted
Add note on complex fields impl block in doc (#483)
1 parent d4c75f0 commit 5b1c5c6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/book/content/types/objects/complex_fields.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ impl Person {
2525
}
2626
}
2727

28+
// Note that this syntax generates an implementation of the GraphQLType trait,
29+
// the base impl of your struct can still be written like usual:
30+
impl Person {
31+
pub fn hidden_from_graphql(&self) {
32+
// [...]
33+
}
34+
}
35+
2836
# fn main() { }
2937
```
3038

0 commit comments

Comments
 (0)