Skip to content
New issue

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

Compiler: Flow Enums with Unknown Members instead of "%future added value" #3596

Open
Tracked by #3749
mrtnzlml opened this issue Sep 14, 2021 · 4 comments · May be fixed by #3800
Open
Tracked by #3749

Compiler: Flow Enums with Unknown Members instead of "%future added value" #3596

mrtnzlml opened this issue Sep 14, 2021 · 4 comments · May be fixed by #3800

Comments

@mrtnzlml
Copy link
Contributor

I've been reading through the new Flow Enums documentation and one thing that caught my attention was enums with unknown members. In short:

enum Status {
  Active,
  Paused,
  Off,
  ...
}

Specifically the last sentence:

One use case for this would be the JS output of GraphQL Enums: Flow Enums with unknown members could be used instead of the added '%future added value' member.

So my question/feature request is: are you considering this? Would you consider it?

Thanks! 😎

@mrtnzlml
Copy link
Contributor Author

Screen Shot 2021-09-14 at 9 42 30

@gkz I've noticed that you just forked Relay. Is it related by any chance? 😊

@gkz
Copy link
Member

gkz commented Dec 29, 2021

pub flow_enums: FnvIndexSet<StringKey>,

@mrtnzlml
Copy link
Contributor Author

@gkz Very cool! Does it work for OSS though? I am trying to use it but it seems like flow_enums is not being used anywhere in the OSS codebase. 🤔

Also: c3568ed

@mrtnzlml
Copy link
Contributor Author

@alunyov Is this a good candidate for #3749? Is it a bug or a possible improvement? It seems like flow_enums option exists but doesn't do anything in OSS. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants