Closed
Description
In my code I use the following type to represent points in 2d
type Vec2 [2]float64
I realize that graphql does not have any explicit representation for fixed-size arrays so I'm happy to expose this in the api as simple a list of floats, ie
graphql.NewList(graphql.Float)
However, when I register this field, I get an error saying that my field is not iterable. If instead I return a slice from my resolver then I get the expected behavior. This is rather frustrating as I have to manually register a resolver everywhere that I return a Vec2
to turn the array into a slice.
I think this library should recognize fixed-size arrays as iterable.
Metadata
Assignees
Labels
No labels