Edward Kung 73170ba8a2
Territory analytics (#1926)
* add territory to analytics selectors

* implement territory analytics, revert user satistics header

* fix linting errors

* disallow some territory names

* fix linting error

* minor adjustments to header

* escape input

* 404 on non-existant sub

* exclude unused queries depending on sub select

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: k00b <k00b@stacker.news>
2025-02-28 19:15:18 -06:00

25 lines
817 B
JavaScript

import { gql } from 'graphql-tag'
export default gql`
type NameValue {
name: String!
value: Float!
}
extend type Query {
registrationGrowth(when: String, from: String, to: String): [TimeData!]!
itemGrowth(when: String, from: String, to: String): [TimeData!]!
spendingGrowth(when: String, from: String, to: String): [TimeData!]!
spenderGrowth(when: String, from: String, to: String): [TimeData!]!
stackingGrowth(when: String, from: String, to: String): [TimeData!]!
stackerGrowth(when: String, from: String, to: String): [TimeData!]!
itemGrowthSubs(when: String, from: String, to: String, sub: String): [TimeData!]!
revenueGrowthSubs(when: String, from: String, to: String, sub: String): [TimeData!]!
}
type TimeData {
time: Date!
data: [NameValue!]!
}
`