-
Notifications
You must be signed in to change notification settings - Fork 11
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
Consume ISO Strings as well #2
Comments
|
I'm not sure if you understand me. I wish to forward serialized string formatted as ISO date string. Not Date instance. I need that I'm only read your code, not try, but it is clear from test that your module doesn't work this way. I'm using this implementation now: https://gist.github.com/langpavel/b30f3d507a47713b0c6e89016e4e9eb7 Question now is if you want to support this behavior, because it's not clean and it's use case specific :-) |
I understand now. You want to support various date formats (not serialized). Hmm, my first thought is to export the different formats as different types. The more the strict the type the more likely it will catch errors in your code. What do you think? |
You are correct. The more the strict the type the more likely it will catch errors in your code... I'm observing with native GraphQL types that they are returning I think exporting more types is bad idea, because it is exactly one domain type. Some kind of flag or singleton factory should be better..? I don't know ATM. I suggest let this issue open and I suggest to others, act if you need this behavior. There is 👍 voting :-) You have 116 downloads per month, not much but not bad as well :-) Thank you for your quick responses. I'm too early with my use case as well so I have no clear idea on this.. |
Cool, will do. Thanks for bringing this up |
Good to know, I will watch this issue, let me know then. 😄 |
Hi, do you plan to support passing ISO serialized date as well? This means this test will be successful.
Reason: I'm using REST API which serves me dates serialized as string. I wish to pass result as is to express-graphql endpoint and don't care of format.
It can be also useful to pass Numbers as UNIX timestamps, but this is problematic because of much API varies between milliseconds and seconds.
The text was updated successfully, but these errors were encountered: