Updated book for master ***NO_CI***
This commit is contained in:
parent
149edaff1a
commit
328e4da9b8
4 changed files with 18 additions and 2 deletions
|
@ -554,6 +554,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() { }
|
||||
</code></pre></pre>
|
||||
<p>While this is a bit more verbose, it lets you write any kind of function in the
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -160,6 +160,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() { }
|
||||
</code></pre></pre>
|
||||
<p>While this is a bit more verbose, it lets you write any kind of function in the
|
||||
|
|
Loading…
Reference in a new issue