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

Option to add future-proof "redundant" Other(value) in enum? #69

Open
sgrove opened this issue Jan 25, 2019 · 1 comment
Open

Option to add future-proof "redundant" Other(value) in enum? #69

sgrove opened this issue Jan 25, 2019 · 1 comment

Comments

@sgrove
Copy link

sgrove commented Jan 25, 2019

GraphQL considers adding an enum to be a non-breaking change, because most type systems it seems aren't sound and so the developer always has to include a catch-all. In this world, adding a value to an enum means the old application should (mostly?) keep working, even when it encounters a value it doesn't understand.

Right now, we can't really do that for clients with graphql_ppx. It might be nice to have some option (or even required) to have a catch-all `Other(stringValue) to make apps much safer in the face of GraphQL's "non-breaking" [😄] changes.

@baransu
Copy link
Contributor

baransu commented Apr 3, 2019

I think its really good idea. Would be easy to implement. Maybe should be turned on by default with ability to turn off by some flag.

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

No branches or pull requests

2 participants