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

Compare underlying enum types using getDisplayString #63

Merged
merged 2 commits into from Mar 9, 2021
Merged

Compare underlying enum types using getDisplayString #63

merged 2 commits into from Mar 9, 2021

Conversation

johnpryan
Copy link
Contributor

I'm not sure if this is correct, so I added some TODOs. This is a problem if somehow the display strings are the same, e.g. if two symbols of the same name come from different libraries.

This fixes the case where an enum is nullable but has a defaultsTo value, where the default value is the non-nullable enum but the field is nullable.

I'm not sure if this is correct, so I added some TODOs.
This is a problem if somehow the display strings are the same, e.g.
if two symbols of the same name come from different libraries.

This fixes the case where an enum is nullable but has a defaultsTo
value, where the default value is the non-nullable enum but the
field is nullable.
@kevmoo
Copy link
Owner

kevmoo commented Mar 9, 2021

Are you hitting this somewhere?

@johnpryan
Copy link
Contributor Author

Yeah, if you use defaultsTo on a nullable enum you will see this error.

@johnpryan
Copy link
Contributor Author

I'm not really sure if we should just improve the warning, we could tell the user to use a non-nullable enum when they use defaultsTo

@kevmoo
Copy link
Owner

kevmoo commented Mar 9, 2021 via email

@johnpryan johnpryan marked this pull request as ready for review March 9, 2021 19:01
@kevmoo kevmoo merged commit f719266 into kevmoo:master Mar 9, 2021
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 this pull request may close these issues.

None yet

2 participants