I'm trying to query wikiJS Graphql API in go using this client and I have a little problem of type conversion (maybe because of my lack of skills in go and graphql).
I have this struct type :
var query struct{
Pages struct{
List struct{
id graphql.Int
}`graphql:"list(tags: $tags)"`
}
}
variables := map[string]interface{}{
"tags": graphql.String(tag),
}
where tag is a normal string and when I send the request i have the following error :
"GraphQLError: Variable "$tags" of type "String!" used in position expecting type "[String!]".",
So My question is, how to convert a String!
into a [String!]
?