Constant telescope::api::rcos::meetings::creation::host_selection::host_selection::__QUERY_WORKAROUND[][src]

const __QUERY_WORKAROUND: &str = "fragment HostInfo on users {\n    id\n    first_name\n    last_name\n\n    rcs_id: user_accounts(where: {type: {_eq: \"rpi\"}}) {\n        account_id\n    }\n}\n\n# GraphQL query for host selection.\nquery HostSelection($search: String!, $now: date!) {\n    # If search is empty, we default to suggestions -- this should include\n    # faculty advisors, current coordinators, and current mentors.\n    suggested_users: users(\n        # Limit to top 10 suggestions.\n        limit: 10,\n        where: {\n            _or: [\n                # Faculty advisors\n                {role: {_eq: \"faculty_advisor\"}, enrollments: {semester: {end_date: {_gte: $now}}}},\n                # Current coordinators\n                {enrollments: {is_coordinator: {_eq: true}, semester: {end_date: {_gte: $now}}}}\n                # Current mentors\n                {small_group_mentors: {small_group: {semester: {end_date: {_gte: $now}}}}}\n            ],\n            enrollments: {semester: {end_date: {_gte: $now}}}\n        },\n        order_by: [\n            {first_name: asc},\n            {last_name: asc}\n        ]\n    ) { ... HostInfo }\n\n    users(\n        # 50 users max. This should be more than enough.\n        limit: 50,\n        order_by: [\n            {first_name: asc},\n            {last_name: asc},\n        ],\n        where: {\n            _or: [\n                {first_name: {_ilike: $search}},\n                {last_name: {_ilike: $search}},\n                {user_accounts: {account_id: {_ilike: $search}, type: {_eq: \"rpi\"}}}\n            ],\n            # Only enrolled users can host meetings in a given semester.\n            enrollments: {semester: {end_date: {_gte: $now}}}\n        }\n    ) { ... HostInfo }\n}\n";