diff --git a/server/schema/schema.js b/server/schema/schema.js index 4590c227b..6947120a6 100644 --- a/server/schema/schema.js +++ b/server/schema/schema.js @@ -65,10 +65,17 @@ const RootQuery = new GraphQLObjectType({ args: {id: {type: GraphQLID}}, resolve(parent,args) { // Code to get data from data source. - return User.findById(args.id); } }, + userByAuthId: { + type: UserType, + args: {authId: {type: GraphQLString}}, + resolve(parent,args) { + // Code to get data from data source. + return User.findOne({authId: args.authId}); + } + }, role: { type: RoleType, args: {id: {type: GraphQLID}},