We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We often use enums as dropdown options e.g.
type Severity = Low | Medium | High
Needs to a list of [Lost, Medium, High] so we can create a dropdown for the user. Elm doesn't allow iterating over union types.
[Lost, Medium, High]
But maybe this lib could fix this. What about if the package also generated enums as a list:
list = [Lost, Medium, High]
In this way if we add a new enum variant in the BE, it will show in the FE dropdown without us having to add it to a list manually.
The text was updated successfully, but these errors were encountered:
Great idea, thanks for the suggestion! Should be a super easy change, and there's a good payoff. I'll work on this when I get some time 👍
Sorry, something went wrong.
Done! This is now released in NPM version 1.0.6. Thanks for the great suggestion!
Here's an example: https://github.com/dillonkearns/elm-graphql/blob/master/examples/src/Swapi/Enum/Episode.elm#L23-L25.
No branches or pull requests
We often use enums as dropdown options e.g.
Needs to a list of
[Lost, Medium, High]
so we can create a dropdown for the user. Elm doesn't allow iterating over union types.But maybe this lib could fix this. What about if the package also generated enums as a list:
In this way if we add a new enum variant in the BE, it will show in the FE dropdown without us having to add it to a list manually.
The text was updated successfully, but these errors were encountered: