Constant telescope::api::rcos::landing_page_stats::landing_page_statistics::QUERY[][src]

pub const QUERY: &str = "query LandingPageStatistics($now: date!) {\n    # Count of students in ongoing semesters.\n    current_students: enrollments_aggregate(\n        where: {\n            semester: {\n                end_date: {_gte: $now}\n                start_date: {_lte: $now}\n            }\n        },\n        distinct_on: [user_id]\n    ) {\n        aggregate {\n            count\n        }\n    }\n\n    # Count of projects associated with a small group of an ongoing semester\n    current_projects: projects_aggregate(\n        where: {small_group_projects: {small_group: {semester: {\n            start_date: {_lte: $now}\n            end_date: {_gte: $now}\n        }}}}\n    ) {\n        aggregate {\n            count\n        }\n    }\n\n    total_students: users_aggregate {\n        aggregate {\n            count\n        }\n    }\n\n    total_projects: projects_aggregate {\n        aggregate {\n            count\n        }\n    }\n}\n";