From d536114e0dccff1d0d35803885273836aaba4597 Mon Sep 17 00:00:00 2001 From: Peter Sanchez Date: Wed, 4 Sep 2024 13:46:47 -0600 Subject: [PATCH] Fixing empty query to getAdminBillingStats --- admin/routes.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/admin/routes.go b/admin/routes.go index 061b47f..913417d 100644 --- a/admin/routes.go +++ b/admin/routes.go @@ -219,21 +219,14 @@ 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($interval: Int) { - getAdminBillingStats(input: { - interval: $interval - }) { + `query GetAdminBillingStats { + getAdminBillingStats { activeSubscriptions pendingCancelSubscriptions canceledSubscription } }`) - op.Var("interval", links.FilterLast30Days) err = links.Execute(c.Request().Context(), op, &billingStatsResult) if err != nil { return err -- 2.45.2