File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -236,8 +236,8 @@ var UserType = new GraphQLObjectType({
236236 args: {
237237 first: { type: GraphQLInt }
238238 },
239- type: new GraphQLList (UserType)
240- resolve (user, { first }) => queryLoader .load ([
239+ type: new GraphQLList (UserType),
240+ resolve : (user , { first }) => queryLoader .load ([
241241 ' SELECT toID FROM friends WHERE fromID=? LIMIT ?' , user .id , first
242242 ]).then (rows => rows .map (row => userLoader .load (row .toID )))
243243 }
@@ -301,7 +301,7 @@ var redisLoader = new DataLoader(keys => new Promise((resolve, reject) => {
301301 result !== null ? result : new Error (` No key: ${ keys[index]} ` )
302302 ));
303303 });
304- });
304+ })) ;
305305```
306306
307307
@@ -359,9 +359,7 @@ var userLoader = new DataLoader(ids => {
359359 var query = ` SELECT * FROM users WHERE id IN (${ params} )` ;
360360 return queryLoader .load ([query, ids]).then (
361361 rows => ids .map (
362- id => rows .find (
363- row => row .id === id) || new Error (` Row not found: ${ id} `
364- )
362+ id => rows .find (row => row .id === id) || new Error (` Row not found: ${ id} ` )
365363 )
366364 );
367365});
You can’t perform that action at this time.
0 commit comments