[WIP] Switched from rest to GraphQL #162-2

This commit is contained in:
2023-02-09 16:09:34 +01:00
parent 4266db7e35
commit 6aca981fd1
7 changed files with 59 additions and 25 deletions

View File

@@ -0,0 +1,13 @@
export class Queries {
static serverInfoQuery = `
query {
serverCount
servers {
id
name
iconURL
userCount
}
}
`;
}

View File

@@ -0,0 +1,6 @@
import { Server } from "../data/server.model";
export interface Query {
serverCount: number;
servers: Server[];
}

View File

@@ -0,0 +1,5 @@
import { Query } from "./query.model";
export interface QueryResult {
data: any;
}