Am i doing something wrong or the substitution of the variable is not accurate?
I get following error , my initialization below
"{\"errors\":[{\"message\":\"Variable \\\"$evar\\\" is never used.\",\"locations\":[{\"line\":1,\"column\":7}],\"extensions\":{\"code\":\"GRAPHQL_VALIDATION_FAILED\"}}],\"data\":null}"
var query struct {
GetBusinessUnits []struct {
Name graphql.String
} `graphql:getBusinessUnits(env:$evar)"`
}
var _ = gauge.Step("Send CLS to rum backend", func() {
client := graphql.NewClient("https://localhost:8080/query", nil)
variables := map[string]interface{}{
"evar": graphql.String("e2e"),
}
err := client.Query(context.Background(), &query, variables)
if err != nil {
fmt.Println(err)
}
fmt.Println(query.GetBusinessUnits[0].Name)
})
Am i doing something wrong or the substitution of the variable is not accurate? I get following error , my initialization below
"{\"errors\":[{\"message\":\"Variable \\\"$evar\\\" is never used.\",\"locations\":[{\"line\":1,\"column\":7}],\"extensions\":{\"code\":\"GRAPHQL_VALIDATION_FAILED\"}}],\"data\":null}"