Skip to content

Commit

Permalink
✨ Updated docs for an example of optionals
Browse files Browse the repository at this point in the history
  • Loading branch information
nwrenger committed Aug 17, 2024
1 parent 276231c commit f6b0806
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,14 @@ struct Book {
// Sometimes you don't have access to certain data types,
// so you can override them using `#[meta(into = Type)]`
// or skip them entirely via `#[meta(skip)]`
// or set them to be optional via `#[meta(optional)]`
// (-> an interface field with a `?`)
#[meta(into = String)]
user: User,
#[meta(skip)]
borrower: User,
#[meta(optional)]
reservation: String,
}

// Everything you want to use, even if it's just a
Expand Down

0 comments on commit f6b0806

Please sign in to comment.