Constant telescope::api::rcos::users::navbar_auth::authentication::QUERY[][src]

pub const QUERY: &str = "# Authentication to determine what tabs on the navbar the user should have access to.\nquery Authentication($user_id: uuid!, $now: date!) {\n    users_by_pk(id: $user_id) {\n        # If a semester ID is returned here they\'re a current coordinator.\n        is_current_coordinator: enrollments(\n            where: {\n                is_coordinator: {_eq: true},\n                semester: {start_date: {_lte: $now}, end_date: {_gte: $now}}\n            },\n            limit: 1\n        ) { semester_id }\n\n        # If a small group ID is returned here then they\'re a current mentor.\n        is_current_mentor: small_group_mentors(\n            where: {small_group: {semester: {start_date: {_lte: $now}, end_date: {_gte: $now}}}},\n            limit: 1\n        ) {\n            small_group_id\n        }\n\n        # Get their role too\n        role\n    }\n}\n";