MCPcopy
hub / github.com/mattkrick/meatier / resolve

Function resolve

src/server/graphql/models/User/userQuery.js:19–26  ·  view source on GitHub ↗
(source, args, {authToken})

Source from the content-addressed store, hash-verified

17 id: {type: new GraphQLNonNull(GraphQLID)}
18 },
19 async resolve(source, args, {authToken}) {
20 isAdminOrSelf(authToken, args);
21 const user = await r.table('users').get(args.id);
22 if (!user) {
23 throw errorObj({_error: 'User not found'});
24 }
25 return user;
26 }
27 },
28 login: {
29 type: UserWithAuthToken,

Callers 4

loginUserFunction · 0.50
signupUserFunction · 0.50
emailPasswordResetFunction · 0.50
resetPasswordFunction · 0.50

Calls 5

isAdminOrSelfFunction · 0.90
errorObjFunction · 0.90
getUserByEmailFunction · 0.90
getAltLoginMessageFunction · 0.90
signJwtFunction · 0.90

Tested by

no test coverage detected