Pass the query parameters as string literals in a foreach loop

Hi all,

I am trying to loop trough a list and execute an http get based on the values from the list

Here is what works prior to going though the values in the validFuncs list. Any value inserted manually from the list to EmptyTable.getColumnAgg(“avg”)

will work fine (e.g: replacing avg with count… )

    def getColumnAgg(funcName:String): ChainBuilder = {
      exec(http("aggregate the columns")
        .get(Graphqlurl)
        .queryParam("q",s"""{table(id:1){columnAgg{column(fieldName:"field" ){$funcName}}}}""")
        .queryParam("slug", "123")
        .check(status.is(HttpStatus.Ok)))
    }

  }

In case anyone is interested, I resolved it with

def qraphqlSyntax: ScenarioBuilder = {
  scenario("graphql syntax").foreach(validFuncs,"funcName"){exec(EmptyTable.getColumnAgg)}
}