Khan / Khan/genqlient

Be less strict about selection-set ordering

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

Description

For both the `bindings` option, and the soon-to-be-added `typename` option, we validate that two selection sets are equal. Right now we demand that they even have the fields in the same order; ideally we'd allow any equivalent selections. That's surprisingly much work, although it's quite well separated from the rest of the codebase (just modify `selectionsMatch` in `generate/validation.go`).

Contributor guide

Open the contributing guide

Research direction

Start in generate/validation.go at selectionsMatch, then trace how it is used for the bindings option and the planned typename option. Run the existing validation tests before changing behavior. Done means equivalent selection sets are accepted even when their fields appear in different orders.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.