@@ 219,14 219,21 @@ func (s *Service) Dashboard(c echo.Context) error {
} `json:"getAdminBillingStats"`
}
var billingStatsResult GraphQLBillingStatsResponse
+ // XXX Review this in the future. We shouldn't have to set an interval here.
+ // This broke after a gqlgen update from 0.17.29 to 0.17.49. May be related
+ // to new omittable field feature. Could also just be our query was wrong all
+ // along :)
op = gqlclient.NewOperation(
- `query GetAdminBillingStats() {
- getAdminBillingStats(input: {}) {
+ `query GetAdminBillingStats($interval: Int) {
+ getAdminBillingStats(input: {
+ interval: $interval
+ }) {
activeSubscriptions
pendingCancelSubscriptions
canceledSubscription
}
}`)
+ op.Var("interval", links.FilterLast30Days)
err = links.Execute(c.Request().Context(), op, &billingStatsResult)
if err != nil {
return err