@@ -214,8 +214,12 @@ type Droid : Character {
214
214
}
215
215
```
216
216
217
- We're missing one last piece: an entry point into the type system. So we'll
218
- define one more type that allows us to get to these objects:
217
+ We're missing one last piece: an entry point into the type system.
218
+
219
+ When we define a schema, we define an object type that is the basis for all
220
+ queries. The name of this type is ` Query ` by convention, and it describes
221
+ our public, top-level API. Our ` Query ` type for this example will look like
222
+ this:
219
223
220
224
```
221
225
type Query {
@@ -225,13 +229,18 @@ type Query {
225
229
}
226
230
```
227
231
228
- This type will be the entry point for the queries described below; it has
229
- two fields. ` hero ` returns the ` Character ` who is the hero of the
230
- Star Wars trilogy; it takes an optional parameter that allows us to fetch the
231
- hero of a specific episode instead. ` human ` has a new feature in the type
232
- system, a query argument. This field accepts a non-null string as a query
233
- argument, a human's ID, and returns the human with that ID; ` droid ` does the
234
- same for droids.
232
+ In this example, there are three top-level operations
233
+ that can be done on our schema:
234
+
235
+ - ` hero ` returns the ` Character ` who is the hero of the Star Wars trilogy; it
236
+ takes an optional argument that allows us to fetch the hero of a specific
237
+ episode instead.
238
+ - ` human ` accepts a non-null string as a query argument, a human's ID, and
239
+ returns the human with that ID.
240
+ - ` droid ` does the same for droids.
241
+
242
+ These fields demonstrate another feature of the type system, the ability
243
+ for a field to specify arguments that configure their behavior.
235
244
236
245
When we package the whole type system together, defining the ` Query ` type
237
246
above as our entry point for queries, this creates a GraphQL Schema.
0 commit comments