Skip to content

Commit

Permalink
add directive example
Browse files Browse the repository at this point in the history
  • Loading branch information
magicmark committed Nov 21, 2020
1 parent 078bcfc commit 1bda354
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions rfcs/SchemaCoordinates.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,11 @@ References the named argument of the named directive.
For example, consider the following schema:

```graphql
directive @private(scope: String!) on FIELD

type Person {
name: String
email: String @private(scope: "loggedIn")
}

type Business {
Expand All @@ -150,8 +153,9 @@ We can write the following list of Schema Coordinates:
the "Query" type
- `Query.searchBusinesses(name:)` uniquely identifies the "name" argument on the
"searchBusinesses" field on the "Query" type

This RFC standardizes how we write coordinates GraphQL Schema members as above.
- `@private` uniquely identifies the "private" directive
- `@private(scope:)` uniquely identifies the "scope" argument on the "private"
directive

## 🎨 Prior art

Expand Down

0 comments on commit 1bda354

Please sign in to comment.