Your Question
Model:
type Something {
name: String!
note: String
site: String
phase: String
}
type Query {
somethings: [Something]
}
In gqlgen.yml, I enabled all relevant properties:
omit_slice_element_pointers: true
struct_fields_always_pointers: false
resolvers_always_return_pointers: false
And yet it generates the following resolver (return type is an array of pointers):
func (r *queryResolver) Somethings(ctx context.Context) ([]*model.Something, error) {
panic(fmt.Errorf("not implemented: Somethings - somethings"))
}
Is there a way to force the generator to always return arrays of types ([]model.Something), not pointers ([]*model.Something)? I.e.
func (r *queryResolver) Somethings(ctx context.Context) ([]model.Something, error) {
panic(fmt.Errorf("not implemented: Somethings - somethings"))
}
The document you expected this should be explained
Expected answer
I would like a way to force the generator use arrays of types, not pointers
Comment From: aleybovich
I just realized that it's a wrong app to ask - I meant to ask gqlgen. Sorry about that