Open sarfata opened 5 years ago
Graphqlgen does not seem to handle arrays of arrays properly. Instead, it treats them as 1 dimensional array.
yarn create graphqlgen my-app
Edit the schema.graphql file and add a field data inside the type Post:
data
Post
type Post { id: ID! title: String! content: String! published: Boolean! author: User! data: [[Float]!]! }
PostResolvers.type should define a data resolver that returns an array of array of number.
PostResolvers.type
Something like:
data: ( parent: Post, args: {}, ctx: Context, info: GraphQLResolveInfo ) => Array<Array<number | null>> | Promise<Array<Array<number | null>>>;
Instead this is what is generated:
data: ( parent: Post, args: {}, ctx: Context, info: GraphQLResolveInfo ) => Array<number | null> | Promise<Array<number | null>>;
Also tested with 0.6.0-rc9. Same behavior.
Any updates on this?
Description
Graphqlgen does not seem to handle arrays of arrays properly. Instead, it treats them as 1 dimensional array.
Steps to reproduce
Edit the schema.graphql file and add a field
data
inside the typePost
:Expected results
PostResolvers.type
should define a data resolver that returns an array of array of number.Something like:
Actual results
Instead this is what is generated:
Versions