diff --git a/kdb-bot/src/bot_graphql/model/autoRole.gql b/kdb-bot/src/bot_graphql/model/autoRole.gql index 2680e264..0b523583 100644 --- a/kdb-bot/src/bot_graphql/model/autoRole.gql +++ b/kdb-bot/src/bot_graphql/model/autoRole.gql @@ -28,8 +28,8 @@ type AutoRoleMutation { } input AutoRoleInput { - id: ID! - channelId: String! - messageId: String! - serverId: ID! + id: ID + channelId: String + messageId: String + serverId: ID } \ No newline at end of file diff --git a/kdb-bot/src/bot_graphql/model/autoRoleRule.gql b/kdb-bot/src/bot_graphql/model/autoRoleRule.gql index 31e87177..2484c8bd 100644 --- a/kdb-bot/src/bot_graphql/model/autoRoleRule.gql +++ b/kdb-bot/src/bot_graphql/model/autoRoleRule.gql @@ -25,8 +25,8 @@ type AutoRoleRuleMutation { } input AutoRoleRuleInput { - id: ID! - emojiName: String! - roleId: String! - autoRoleId: ID! + id: ID + emojiName: String + roleId: String + autoRoleId: ID } \ No newline at end of file diff --git a/kdb-bot/src/bot_graphql/model/level.gql b/kdb-bot/src/bot_graphql/model/level.gql index 93081b7f..2ef07540 100644 --- a/kdb-bot/src/bot_graphql/model/level.gql +++ b/kdb-bot/src/bot_graphql/model/level.gql @@ -25,9 +25,9 @@ type LevelMutation { input LevelInput { id: ID - name: String! - color: String! - minXp: Int! - permissions: String! - serverId: ID! + name: String + color: String + minXp: Int + permissions: String + serverId: ID } \ No newline at end of file diff --git a/kdb-bot/src/bot_graphql/model/user.gql b/kdb-bot/src/bot_graphql/model/user.gql index 6d0ad93a..07f7acc4 100644 --- a/kdb-bot/src/bot_graphql/model/user.gql +++ b/kdb-bot/src/bot_graphql/model/user.gql @@ -33,6 +33,6 @@ type UserMutation { } input UserInput { - id: ID! - xp: Int! + id: ID + xp: Int } \ No newline at end of file diff --git a/kdb-bot/src/bot_graphql/mutations/auto_role_mutation.py b/kdb-bot/src/bot_graphql/mutations/auto_role_mutation.py index b5a0cc40..283b6105 100644 --- a/kdb-bot/src/bot_graphql/mutations/auto_role_mutation.py +++ b/kdb-bot/src/bot_graphql/mutations/auto_role_mutation.py @@ -35,7 +35,7 @@ class AutoRoleMutation(QueryABC): and x.discord_message_id == input["messageId"] ) - return self._auto_roles.get_auto_roles_by_server_id(auto_role.server.server_id).where(get_new) + return self._auto_roles.get_auto_roles_by_server_id(auto_role.server.server_id).where(get_new).last() def resolve_update_auto_role(self, *_, input: dict): auto_role = self._auto_roles.get_auto_role_by_id(input["id"]) diff --git a/kdb-bot/src/bot_graphql/mutations/auto_role_rule_mutation.py b/kdb-bot/src/bot_graphql/mutations/auto_role_rule_mutation.py index 89ed0669..34935bbf 100644 --- a/kdb-bot/src/bot_graphql/mutations/auto_role_rule_mutation.py +++ b/kdb-bot/src/bot_graphql/mutations/auto_role_rule_mutation.py @@ -37,8 +37,10 @@ class AutoRoleRuleMutation(QueryABC): and x.role_id == input["roleId"] ) - return self._auto_roles.get_auto_role_rules_by_auto_role_id(auto_role_rule.auto_role.auto_role_id).where( - get_new + return ( + self._auto_roles.get_auto_role_rules_by_auto_role_id(auto_role_rule.auto_role.auto_role_id) + .where(get_new) + .last() ) def resolve_update_auto_role_rule(self, *_, input: dict): diff --git a/kdb-bot/src/bot_graphql/mutations/level_mutation.py b/kdb-bot/src/bot_graphql/mutations/level_mutation.py index 15940a4f..0557c968 100644 --- a/kdb-bot/src/bot_graphql/mutations/level_mutation.py +++ b/kdb-bot/src/bot_graphql/mutations/level_mutation.py @@ -42,7 +42,7 @@ class LevelMutation(QueryABC): and l.permissions == level.permissions ) - return self._levels.get_levels_by_server_id(level.server.server_id).where(get_new_level) + return self._levels.get_levels_by_server_id(level.server.server_id).where(get_new_level).last() def resolve_update_level(self, *_, input: dict): level = self._levels.get_level_by_id(input["id"])