From 89a5dc2fb92d84c344a1be4b36f151b282dd91c5 Mon Sep 17 00:00:00 2001 From: Samuel Hurel Date: Sat, 14 Dec 2019 09:29:19 +0100 Subject: [PATCH] Add note on complex fields impl block in doc (#483) --- docs/book/content/types/objects/complex_fields.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/book/content/types/objects/complex_fields.md b/docs/book/content/types/objects/complex_fields.md index 902b442e..7ee14453 100644 --- a/docs/book/content/types/objects/complex_fields.md +++ b/docs/book/content/types/objects/complex_fields.md @@ -25,6 +25,14 @@ impl Person { } } +// Note that this syntax generates an implementation of the GraphQLType trait, +// the base impl of your struct can still be written like usual: +impl Person { + pub fn hidden_from_graphql(&self) { + // [...] + } +} + # fn main() { } ```