Compare commits

..
2 Commits
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -18,7 +18,11 @@ func (qe *QueryExecutor) executeQuery() ([]byte, error) {
}
for key, value := range qe.Headers {
httpRequest.Header.Set(key, value.(string))
strValue, ok := value.(string)
if !ok {
strValue = fmt.Sprintf("%v", value)
}
httpRequest.Header.Set(key, strValue)
}
var retries_max int
+1 -1
View File
@@ -11,7 +11,7 @@ import (
func NewConnection() (b *BaseClient) {
b = &BaseClient{
endpoint: envutil.Getenv("GRAPHQL_ENDPOINT", "https://api.github.com/graphql"),
responseType: envutil.Getenv("GRAPHQL_RESPONSE_TYPE", "string"),
responseType: envutil.Getenv("GRAPHQL_OUTPUT", "string"),
Logger: logging.NewLogger(),
cache: cache.New(time.Duration(envutil.GetInt("GRAPHQL_CACHE_TTL", 5)) * time.Second),
cache_global: envutil.GetBool("GRAPHQL_CACHE_ENABLED", false),