diff --git a/src/resolvers/profileResolver.ts b/src/resolvers/profileResolver.ts index b4c5bdc9..2860567d 100644 --- a/src/resolvers/profileResolver.ts +++ b/src/resolvers/profileResolver.ts @@ -47,22 +47,24 @@ const profileResolvers: any = { RoleOfUser.TTL, ], }, - }).populate({ - path: 'team', - strictPopulate: false, - populate: { - path: 'cohort', + }) + .select('id email role status createdAt updatedAt') + .populate({ + path: 'team', strictPopulate: false, populate: { - path: 'program', + path: 'cohort', strictPopulate: false, populate: { - path: 'organization', + path: 'program', strictPopulate: false, + populate: { + path: 'organization', + strictPopulate: false, + }, }, }, - }, - }) + }) return users }, async getAllRoles() { diff --git a/src/schema/index.ts b/src/schema/index.ts index 448e04f1..be7dab2c 100644 --- a/src/schema/index.ts +++ b/src/schema/index.ts @@ -82,6 +82,8 @@ const Schema = gql` ratings: [Rating] twoFactorAuth: Boolean! TwoWayVerificationToken: String + createdAt: String + updatedAt: String } input RegisterInput { email: String!