Compare commits

...

2 Commits

Author SHA1 Message Date
Dean Wenstrand
f40c223dfc Add getUsageStats operation + hook
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 10:30:13 -07:00
Dean Wenstrand
4758c95149 Add getUsageStats admin query types
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 10:29:07 -07:00
3 changed files with 5400 additions and 14271 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,26 @@
query getUsageStats($days: Int! = 30) {
getUsageStats(days: $days) {
totalUsers
totalVideos
totalShots
totalRuns
windows {
label
newUsers
activeUsers
sessions
shots
}
daily {
day
newUsers
activeUsers
sessions
shots
}
processingLast24h {
status
count
}
}
}

View File

@@ -100,6 +100,7 @@ type Query {
countRespectsLimit: Boolean! = false countRespectsLimit: Boolean! = false
): [ShotGQL!]! ): [ShotGQL!]!
getShotsByIds(ids: [Int!]!): [ShotGQL!]! getShotsByIds(ids: [Int!]!): [ShotGQL!]!
getUsageStats(days: Int! = 30): UsageStatsGQL!
getUser(userId: Int!): UserGQL getUser(userId: Int!): UserGQL
doesUsernameExist(candidateUsername: String!): Boolean! doesUsernameExist(candidateUsername: String!): Boolean!
getLoggedInUser: UserGQL getLoggedInUser: UserGQL
@@ -1168,6 +1169,37 @@ input CreatedAfter @oneOf {
createdAt: DateTime createdAt: DateTime
} }
type UsageStatsGQL {
totalUsers: Int!
totalVideos: Int!
totalShots: Int!
totalRuns: Int!
windows: [UsageStatsWindowGQL!]!
daily: [UsageStatsDailyGQL!]!
processingLast24h: [ProcessingStatusCountGQL!]!
}
type UsageStatsWindowGQL {
label: String!
newUsers: Int!
activeUsers: Int!
sessions: Int!
shots: Int!
}
type UsageStatsDailyGQL {
day: Date!
newUsers: Int!
activeUsers: Int!
sessions: Int!
shots: Int!
}
type ProcessingStatusCountGQL {
status: String!
count: Int!
}
type UserRelationshipsResult { type UserRelationshipsResult {
inquiringUser: UserGQL! inquiringUser: UserGQL!
relationships: [UserRelationship!]! relationships: [UserRelationship!]!