Skip to content

Commit f00ce54

Browse files
committed
add directive example
1 parent 078bcfc commit f00ce54

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

rfcs/SchemaCoordinates.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,11 @@ References the named argument of the named directive.
124124
For example, consider the following schema:
125125

126126
```graphql
127+
directive @private(scope: String!) on FIELD
128+
127129
type Person {
128130
name: String
131+
email: String @private(scope: "loggedIn")
129132
}
130133

131134
type Business {
@@ -138,7 +141,7 @@ type Query {
138141
}
139142
```
140143

141-
We can write the following list of Schema Coordinates:
144+
We can write the following schema coordinates:
142145

143146
- `Person` uniquely identifies the the "Person" type
144147
- `Business` uniquely identifies the the "Business" type
@@ -150,8 +153,9 @@ We can write the following list of Schema Coordinates:
150153
the "Query" type
151154
- `Query.searchBusinesses(name:)` uniquely identifies the "name" argument on the
152155
"searchBusinesses" field on the "Query" type
153-
154-
This RFC standardizes how we write coordinates GraphQL Schema members as above.
156+
- `@private` uniquely identifies the "private" directive
157+
- `@private(scope:)` uniquely identifies the "scope" argument on the "private"
158+
directive
155159

156160
## 🎨 Prior art
157161

0 commit comments

Comments
 (0)