diff --git a/clients/graphql/models.go b/clients/graphql/models.go index 7f1eba5..8d8bfd4 100644 --- a/clients/graphql/models.go +++ b/clients/graphql/models.go @@ -146,9 +146,6 @@ func (g *GetAlertResponseItem) ToAlertEvents() []*protocol.AlertEvent { return resp } -// defaultInputAlias is a shorthand for non-batched queries -var defaultInputAlias = idxToInputAlias(0) - // createGetAlertsQuery creates aliased graphql queries, using alerts${index} and input${index} as aliases. func createGetAlertsQuery(inputs []*AlertsInput) (string, map[string]interface{}) { variables := make(map[string]interface{}) @@ -175,7 +172,7 @@ func createGetAlertsQuery(inputs []*AlertsInput) (string, map[string]interface{} queryBuilder.WriteString("}") // Add the input to the variables map - variables[fmt.Sprintf("%s", idxToInputAlias(i))] = input + variables[idxToInputAlias(i)] = input } // End of the query diff --git a/feeds/combiner.go b/feeds/combiner.go index 5699c97..f2bb2ea 100644 --- a/feeds/combiner.go +++ b/feeds/combiner.go @@ -199,7 +199,7 @@ func (cf *combinerFeed) handleSubscriptions(alertHandlers []cfHandler, subscript // handle subscriptions in batches for subscriber, botSubscriptions := range subscriberBatchMap { - logger = log.WithFields( + logger = logger.WithFields( log.Fields{ "subscriberBotId": subscriber.BotID, "subscriberBotOwner": subscriber.BotOwner,