Skip to content

Commit ea53d6b

Browse files
unicodeveloperpeggyrayzis
authored andcommitted
Replace all occurrences of root with _
1 parent 744d771 commit ea53d6b

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

docs/source/tutorial/resolvers.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ _src/resolvers.js_
3434
```js
3535
module.exports = {
3636
Query: {
37-
launches: async (root, __, { dataSources }) =>
37+
launches: async (_, __, { dataSources }) =>
3838
dataSources.launchAPI.getAllLaunches(),
39-
launch: (root, { id }, { dataSources }) =>
39+
launch: (_, { id }, { dataSources }) =>
4040
dataSources.launchAPI.getLaunchById({ launchId: id }),
4141
me: async (_, __, { dataSources }) =>
4242
dataSources.userAPI.findOrCreateUser(),
@@ -65,11 +65,11 @@ _src/resolvers.js_
6565
```js
6666
...
6767
Mutation: {
68-
bookTrip: async (root, { launchId }, { dataSources }) =>
68+
bookTrip: async (_, { launchId }, { dataSources }) =>
6969
dataSources.userAPI.bookTrip({ launchId }),
70-
cancelTrip: async (root, { launchId }, { dataSources }) =>
70+
cancelTrip: async (_, { launchId }, { dataSources }) =>
7171
dataSources.userAPI.cancelTrip({ launchId }),
72-
login: async (root, { email }, { dataSources }) => {
72+
login: async (_, { email }, { dataSources }) => {
7373
const user = await dataSources.userAPI.findOrCreateUser({ email });
7474
if (user) return new Buffer(email).toString('base64');
7575
return false;
@@ -240,7 +240,7 @@ _src/resolvers.js_
240240
```js
241241
...
242242
Query: {
243-
launches: async (root, { pageSize = 20, after }, { dataSources }) => {
243+
launches: async (_, { pageSize = 20, after }, { dataSources }) => {
244244
const allLaunches = await dataSources.launchAPI.getAllLaunches();
245245
const launches = paginateResults({
246246
after,
@@ -315,7 +315,7 @@ _src/resolvers.js_
315315
...
316316
Mutation: {
317317
...
318-
login: async (root, { email }, { dataSources }) => {
318+
login: async (_, { email }, { dataSources }) => {
319319
const user = await dataSources.userAPI.findOrCreateUser({ email });
320320
if (user) return new Buffer(email).toString('base64');
321321
return false;

0 commit comments

Comments
 (0)