Add small section about redacting data from input objects (#1013)

This commit is contained in:
Greg Pstrucha 2022-08-08 18:05:31 -07:00 committed by GitHub
parent 2451725188
commit 947c1946f0
1 changed files with 13 additions and 0 deletions

View File

@ -94,3 +94,16 @@ pub struct YetAnotherInput {
```
You can pass multiple generic types to `params()`, separated by a comma.
## Redacting sensitive data
If any part of your input is considered sensitive and you wish to redact it, you can mark it with `secret` directive. For example:
```rust
#[derive(InputObject)]
pub struct CredentialsInput {
username: String,
#[graphql(secret)]
password: String,
}
```