Skip to content

Commit ed4c4d8

Browse files
authored
Merge pull request #240 from agoalofalife/patch-1
possible fix
2 parents 105a6c2 + 0985cef commit ed4c4d8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

testutil/testutil.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,11 @@ func init() {
300300
},
301301
},
302302
Resolve: func(p graphql.ResolveParams) (interface{}, error) {
303-
return GetHuman(p.Args["id"].(int)), nil
303+
id, err := strconv.Atoi(p.Args["id"].(string))
304+
if err != nil {
305+
return nil, err
306+
}
307+
return GetHuman(id), nil
304308
},
305309
},
306310
"droid": &graphql.Field{

0 commit comments

Comments
 (0)