Constant telescope::api::rcos::meetings::edit::edit_host_selection::__QUERY_WORKAROUND[][src]

const __QUERY_WORKAROUND: &str = "fragment HostInfo on users {\n    id\n    first_name\n    last_name\n\n    # User\'s RPI email\n    rcs_id: user_accounts(where: {type: {_eq: \"rpi\"}}) {\n        account_id\n    }\n}\n\n# Host selection for the edit page.\nquery EditHostSelection($meeting_id: Int!) {\n    # Limit to enrolled students in the semester the meeting is already\n    meetings_by_pk(meeting_id: $meeting_id) {\n        meeting_id\n\n        semester {\n            title\n\n            # Coordinators sorted alphabetically\n            coordinators: enrollments(\n                where: {is_coordinator: {_eq: true}},\n                order_by: [{user: {first_name: asc}}, {user: {last_name: asc}}]\n            ) {\n                user { ...HostInfo }\n            }\n\n            # Mentors by small group and then alphabetically\n            small_groups(\n                order_by: [{title: asc}],\n                # This where clause requires the small group to have at least one mentor.\n                where: {small_group_mentors: {}}\n            ) {\n                title\n\n                # Adding an extra order-by argument here causes hasura to error\n                # internally.\n                #\n                # See\n                # - https://github.com/rcos/Telescope/issues/141\n                # - https://github.com/hasura/graphql-engine/issues/3796\n                small_group_mentors(order_by: [{user: {first_name: asc}}]) {\n                    user { ... HostInfo }\n                }\n            }\n\n            # Everyone else alphabetically\n            enrollments(order_by: [{user: {first_name: asc}}, {user: {last_name: asc}}]) {\n                user { ... HostInfo }\n            }\n        }\n    }\n}\n";