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 f00ce54
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 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 @@ -138,7 +141,7 @@ type Query {
}
```

We can write the following list of Schema Coordinates:
We can write the following schema coordinates:

- `Person` uniquely identifies the the "Person" type
- `Business` uniquely identifies the the "Business" type
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 f00ce54

Please sign in to comment.