-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Incorrect ENUM decoding #201
Comments
thank you i will fix it soon. i knew that this part of code was not written properly. i found better way to validate |
old implementation decoded enums could not decode properly enums more then 3 constructors, now it will |
@horus thank you for finding this Bug ;) |
fixed |
@nalchevanidze |
GHC: 8.6.4
Stack: Version 2.1.3, Git revision 0fa51b9925decd937e4a993ad90cb686f88fa282 (7739 commits) x86_64 hpack-0.31.2
Built with: lts-13.19
morpheus-graphql commit: b40fd48
Summary of my problem: a simple enum type (possibly) being decoded incorrectly by the resolver. (Maybe it's just me :-)
The following code example could be used to demonstrate it:
Tested with Insomnia:
This, however, generated the correct document for
/schema.gql
:For now, I've came up with a workaround:
...which seemed to behave correctly. But it would require every
ENUM
to be an instance ofRead
, thus I think this is far from ideal.Would you please help me identify the cause? And thank you for your hard work making morpheus-graphql available!
P./S.
I know there's
Data.Morpheus.Resolve.Generics.EnumRep
, maybe we could take advantage of the metadata ofRep
?The text was updated successfully, but these errors were encountered: