Finished auto role list #134
This commit is contained in:
@@ -14,4 +14,30 @@ export class Mutations {
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
static createAutoRole = `
|
||||
mutation updateAutoRole($serverId: ID, $channelId: String, $messageId: String) {
|
||||
autoRole {
|
||||
createAutoRole(input: { serverId: $serverId, channelId: $channelId, messageId: $messageId }) {
|
||||
id
|
||||
channelId
|
||||
channelName
|
||||
messageId
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
static deleteAutoRole = `
|
||||
mutation updateAutoRole($id: ID) {
|
||||
autoRole {
|
||||
deleteAutoRole(id: $id) {
|
||||
id
|
||||
channelId
|
||||
channelName
|
||||
messageId
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
@@ -166,6 +166,10 @@ export class Queries {
|
||||
messageId
|
||||
autoRoleRuleCount
|
||||
|
||||
server {
|
||||
id
|
||||
}
|
||||
|
||||
createdAt
|
||||
modifiedAt
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@ import { Server } from "../data/server.model";
|
||||
import { User } from "../data/user.model";
|
||||
import { AutoRole } from "../data/auto_role.model";
|
||||
import { Guild } from "../data/discord.model";
|
||||
import { Level } from "../data/level.model";
|
||||
|
||||
export interface Query {
|
||||
serverCount: number;
|
||||
@@ -19,7 +20,7 @@ export interface UserListQuery {
|
||||
|
||||
export interface LevelListQuery {
|
||||
levelCount: number;
|
||||
levels: User[];
|
||||
levels: Level[];
|
||||
}
|
||||
|
||||
export interface AutoRoleQuery {
|
||||
|
@@ -1,4 +1,10 @@
|
||||
import { User } from "../data/user.model";
|
||||
import { AutoRole } from "../data/auto_role.model";
|
||||
|
||||
export interface GraphQLResult {
|
||||
data: any;
|
||||
errors?: [];
|
||||
}
|
||||
|
||||
export interface QueryResult {
|
||||
data: any;
|
||||
@@ -9,3 +15,10 @@ export interface UpdateUserMutationResult {
|
||||
updateUser: User
|
||||
};
|
||||
}
|
||||
export interface AutoRoleMutationResult {
|
||||
autoRole: {
|
||||
createAutoRole?: AutoRole
|
||||
updateAutoRole?: AutoRole
|
||||
deleteAutoRole?: AutoRole
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user