Merge branch 'master' into justin/operation-registry-permanence

This commit is contained in:
Danielle Man
2019-05-27 17:21:35 -07:00
committed by GitHub

View File

@@ -254,6 +254,14 @@ Mission: {
},
```
_src/schema.js_
```js
type Mutation {
# ... with rest of schema
missionPatch(mission: String, size: PatchSize): PatchSize
}
```
The first argument passed into our resolver is the parent, which refers to the mission object. The second argument is the size we pass to our `missionPatch` field, which we use to determine which property on the mission object we want our field to resolve to.
Now that we know how to add resolvers on types other than `Query` and `Mutation`, let's add some more resolvers to the `Launch` and `User` types. Copy this code into your resolver map: