dotansimha / dotansimha/graphql-code-generator-community

TS/oclif plugin generates invalid `multiple` argument for boolean flags

Open
#144 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
137
Forks
195
Avg merge
6h 20m
Merged PRs (30d)
16

Description

As per [this line of templating code](https://github.com/dotansimha/graphql-code-generator/blob/6734c58055d283f051bf32f115f2308000e56431/packages/plugins/typescript/oclif/src/utils.ts#L17), all flags are generated with the `multiple` parameter. However, only "option" flags have this parameter (see [here](https://github.com/oclif/parser/blob/8e5a84e6e80d9c60def9e97fac0e2dd9f3618f65/src/flags.ts#L42)), while "boolean" flags do not (see [here](https://github.com/oclif/parser/blob/8e5a84e6e80d9c60def9e97fac0e2dd9f3618f65/src/flags.ts#L29)).

Currently, I manually remove this invalid parameter (for boolean flags) after generation. Is there a better way to avoid this?

Would a pull request to fix this be welcome?

Thank you for this great tool! :)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.