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
Enums are documented to act as strings.
I don't know if that's a good approach but at least the documentation is limited to enums that only use unit types.
We should extend enum support beyond the unit type and document its usage.
The text was updated successfully, but these errors were encountered:
@Braqzen
union
Sorry, something went wrong.
@Braqzen This one is tricky because it's a bit of a clash between Sway and GraphQL (feel bad for us 🥲) GraphQL enums are just flat references (or labels) While Sway enums can be flat references (labels) or actual complex types (like a struct-ish) We definitely need to document why we only support enums as flat labels It wouldn't be impossible for us to make enums just union types in GraphQL, and stop treating them as labels However this would just require some work that we unfortunately don't really have bandwidth for :(
This one is tricky because it's a bit of a clash between Sway and GraphQL (feel bad for us 🥲)
GraphQL enums are just flat references (or labels)
While Sway enums can be flat references (labels) or actual complex types (like a struct-ish)
We definitely need to document why we only support enums as flat labels
It wouldn't be impossible for us to make enums just union types in GraphQL, and stop treating them as labels
That's unfortunate because logging types like the Identity (an enum of struct variants) is a very common operation.
Identity
Having to parse the type out of the enum just to log that via a conditional is possible but no one will do that for a few reasons.
Instead of feeling bad for you I'll be sending you lots of love and support ❤️
log(Identity)
LogData
No branches or pull requests
Enums are documented to act as strings.
I don't know if that's a good approach but at least the documentation is limited to enums that only use unit types.
We should extend enum support beyond the unit type and document its usage.
The text was updated successfully, but these errors were encountered: