Added mutations and queries for DaiailyStats and TotalStats. Updated Schema. Added scalar package.
This commit is contained in:
@@ -1,16 +1,41 @@
|
||||
import { BigIntTypeDefinition } from "graphql-scalars";
|
||||
|
||||
const typeDefs = /* GraphQL */ `
|
||||
${BigIntTypeDefinition}
|
||||
scalar Date
|
||||
|
||||
type Query {
|
||||
getTotalGroups: Int!
|
||||
getTodayStats: DailyStats!
|
||||
getStatsRange(startDate: Date, endDate: Date): [DailyStats]
|
||||
getTotalStats: TotalStats!
|
||||
}
|
||||
type Mutation {
|
||||
addGroup(groupID: Int, groupName: String): Group!
|
||||
init: String!
|
||||
cronJob: TotalStats!
|
||||
addGroup(groupID: Int, groupName: String): Groups!
|
||||
increment(link: Boolean, command: Boolean, trigger: Boolean): DailyStats!
|
||||
}
|
||||
type Group {
|
||||
|
||||
type Groups {
|
||||
telegramID: Int
|
||||
name: String
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
}
|
||||
scalar Date
|
||||
type TotalStats {
|
||||
createdAt: String
|
||||
updatedAt: Date
|
||||
linksDeleted: BigInt
|
||||
commandResponses: BigInt
|
||||
timesTriggered: BigInt
|
||||
}
|
||||
type DailyStats {
|
||||
createdAt: String
|
||||
updatedAt: Date
|
||||
linksDeleted: Int
|
||||
commandResponses: Int
|
||||
timesTriggered: Int
|
||||
}
|
||||
`;
|
||||
export default typeDefs;
|
||||
|
||||
Reference in New Issue
Block a user