Khan / Khan/genqlient

Make it possible to ask for a *[]T

Open
#16 0 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted needs use cases
Dominant language
Go
Stars
1.3k
Forks
143
Avg merge
4h 50m
Merged PRs (30d)
1

Description

If you put `pointer: true` on a list-field, you get `[]*T` (or `[][]*T`, or...) which is probably what you wanted (so you can represent an required list of optional items, for example, but not the only option. If anyone finds a reason to want `*[]T`, or for that matter `*[][]*[]T`, we can figure out a syntax for it; it's easy enough to do technically. (Although it won't be totally trivial if `T` is an interface.)

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by locating the generator logic that maps list fields and pointer: true to Go types, then define and test syntax for nested pointer/list combinations, including interface element types.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, graphql
Domain
api, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.