pub const QUERY: &str = "# Profile query -- gets info about the target user and the viewer.\nquery Profile($target: uuid!, $viewer: [uuid!]!, $now: date!) {\n # The owner of the profile.\n target: users_by_pk(id: $target) {\n id\n first_name\n last_name\n role\n created_at\n cohort\n\n enrollments(order_by: [{semester: {start_date: desc}}]) {\n semester {\n title\n\n # Small groups for this semester that the target user mentors\n small_groups(where: {small_group_mentors: {user_id: {_eq: $target}}}) {\n title\n }\n }\n\n project {\n title\n }\n\n is_coordinator\n credits\n is_for_pay\n is_project_lead\n }\n\n # The user\'s discord, if it exists\n discord: user_accounts(where: {type: {_eq: \"discord\"}}, limit: 1) {\n account_id\n }\n\n # The user\'s github, if it exists.\n github: user_accounts(where: {type: {_eq: \"github\"}}, limit: 1) {\n account_id\n }\n\n # The user\'s RCS ID if they have linkled RPI CAS.\n rcs_id: user_accounts(where: {type: {_eq: \"rpi\"}}, limit: 1) {\n account_id\n }\n\n # What semesters was this user a small group mentor?\n mentoring: small_group_mentors(\n order_by: {small_group: {semester_id: desc}}\n ) {\n small_group {\n small_group_id\n\n semester {\n title\n }\n }\n }\n\n # The number of public meetings hosted\n public_meetings_hosted: meetings_aggregate(where: {is_draft: {_eq: false}}) {\n aggregate {\n count\n }\n }\n\n # Meetings this user has hosted\n hosting: meetings(\n order_by: {is_draft: desc, start_date_time: desc},\n ) {\n semester {\n title\n }\n\n meeting_id\n title\n type\n start_date_time\n end_date_time\n description\n location\n is_remote\n meeting_url\n external_presentation_url\n recording_url\n is_draft\n }\n }\n\n # Viewer info\n viewer: users(\n limit: 1,\n where: {id: {_in: $viewer}}\n ) {\n id\n role\n\n # Is the viewer a coordinator?\n is_current_coordinator: enrollments(\n limit: 1,\n where: {\n is_coordinator: {_eq: true},\n semester: {start_date: {_lte: $now}, end_date: {_gte: $now}},\n }\n ) {\n is_coordinator\n }\n\n # Are they a mentor for a current small group the target is in?\n mentors_target: small_group_mentors (\n where: {\n small_group: {\n semester: {start_date: {_lte: $now}, end_date: {_gte: $now}},\n small_group_projects: {project: {enrollments: {user_id: {_eq: $target}}}}\n }\n }\n ) {\n small_group {\n small_group_id\n title\n }\n }\n }\n}\n";