Skip to content

Commit 4466fc1

Browse files
Zhenya750dikov.e
andauthored
Generate slices containing all enum values (#350)
It would be useful to generate slices containing all enum values for each enum type. Then there will be no need to maintain such kind of slices manually. Co-authored-by: dikov.e <dikov.e@ct-sg.ru>
1 parent 7a9d84f commit 4466fc1

17 files changed

Lines changed: 83 additions & 0 deletions

‎docs/CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ When releasing a new version:
3030
- genqlient now supports subscriptions; the websocket protocol is by default `graphql-transport-ws` but can be set to another value.
3131
See the [documentation](FAQ.md) for how to `subscribe to an API 'subscription' endpoint`.
3232
- genqlient now supports double-star globs for schema and query files; see [`genqlient.yaml` docs](genqlient.yaml) for more.
33+
- genqlient now generates slices containing all enum values for each enum type.
3334

3435
### Bug fixes:
3536

‎generate/testdata/snapshots/TestGenerate-InputEnum.graphql-InputEnum.graphql.go‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎generate/testdata/snapshots/TestGenerate-InputObject.graphql-InputObject.graphql.go‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎generate/testdata/snapshots/TestGenerate-MultipleDirectives.graphql-MultipleDirectives.graphql.go‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎generate/testdata/snapshots/TestGenerate-Omitempty.graphql-Omitempty.graphql.go‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎generate/testdata/snapshots/TestGenerate-Pointers.graphql-Pointers.graphql.go‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎generate/testdata/snapshots/TestGenerate-PointersInline.graphql-PointersInline.graphql.go‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎generate/testdata/snapshots/TestGenerate-QueryWithEnums.graphql-QueryWithEnums.graphql.go‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎generate/testdata/snapshots/TestGenerate-StructOption.graphql-StructOption.graphql.go‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎generate/testdata/snapshots/TestGenerate-UsesEnumTwice.graphql-UsesEnumTwice.graphql.go‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)