Skip to content

Commit 1fcea6a

Browse files
authored
Merge pull request #4 from RuntimeRacer/hotfix-kajitool-handler
Hotfix V2. Strict typing...
2 parents e8eeffd + 6aceb94 commit 1fcea6a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

graphql.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ func (c *Client) do(ctx context.Context, op operationType, v interface{}, variab
191191
//
192192
// Specification: https://facebook.github.io/graphql/#sec-Errors.
193193
type errors []struct {
194-
Message []string
194+
Message []interface{}
195195
Locations []struct {
196196
Line int
197197
Column int
@@ -200,7 +200,11 @@ type errors []struct {
200200

201201
// Error implements error interface.
202202
func (e errors) Error() string {
203-
return strings.Join(e[0].Message, ";")
203+
var stringOutput = make([]string, 0)
204+
for i := range e[0].Message {
205+
stringOutput[i] = fmt.Sprintf("%v", e[0].Message[i])
206+
}
207+
return strings.Join(stringOutput, ";")
204208
}
205209

206210
type operationType uint8

0 commit comments

Comments
 (0)