Added position query #378

This commit is contained in:
Sven Heidemann 2023-09-28 10:44:09 +02:00
parent 9783424066
commit 4a763e4e03
2 changed files with 3 additions and 0 deletions

View File

@ -39,6 +39,7 @@ type Query {
shortRoleNameCount: Int shortRoleNameCount: Int
shortRoleNames(filter: ShortRoleNameFilter, page: Page, sort: Sort): [ShortRoleName] shortRoleNames(filter: ShortRoleNameFilter, page: Page, sort: Sort): [ShortRoleName]
shortRoleNamePositions: [String]
technicianConfig: TechnicianConfig technicianConfig: TechnicianConfig
possibleFeatureFlags: [String] possibleFeatureFlags: [String]

View File

@ -15,6 +15,7 @@ from bot_data.abc.user_joined_game_server_repository_abc import UserJoinedGameSe
from bot_data.abc.user_joined_server_repository_abc import UserJoinedServerRepositoryABC from bot_data.abc.user_joined_server_repository_abc import UserJoinedServerRepositoryABC
from bot_data.abc.user_joined_voice_channel_repository_abc import UserJoinedVoiceChannelRepositoryABC from bot_data.abc.user_joined_voice_channel_repository_abc import UserJoinedVoiceChannelRepositoryABC
from bot_data.abc.user_repository_abc import UserRepositoryABC from bot_data.abc.user_repository_abc import UserRepositoryABC
from bot_data.model.short_role_name_position_enum import ShortRoleNamePositionEnum
from bot_graphql.abc.query_abc import QueryABC from bot_graphql.abc.query_abc import QueryABC
from bot_graphql.filter.achievement_filter import AchievementFilter from bot_graphql.filter.achievement_filter import AchievementFilter
from bot_graphql.filter.auto_role_filter import AutoRoleFilter from bot_graphql.filter.auto_role_filter import AutoRoleFilter
@ -80,5 +81,6 @@ class Query(QueryABC):
self.set_field("achievementAttributes", lambda *_: achievement_service.get_attributes()) self.set_field("achievementAttributes", lambda *_: achievement_service.get_attributes())
self.set_field("achievementOperators", lambda *_: achievement_service.get_operators()) self.set_field("achievementOperators", lambda *_: achievement_service.get_operators())
self.set_field("shortRoleNamePositions", lambda *_: [x.value for x in ShortRoleNamePositionEnum])
self.set_field("possibleFeatureFlags", lambda *_: [e.value for e in FeatureFlagsEnum]) self.set_field("possibleFeatureFlags", lambda *_: [e.value for e in FeatureFlagsEnum])
self.set_field("discord", lambda *_: Discord(bot.guilds, List(any).extend(bot.users))) self.set_field("discord", lambda *_: Discord(bot.guilds, List(any).extend(bot.users)))