Open DidierBoivin opened 4 years ago
Juniper-from-schema always uses chrono when generating code for dates. So if you want to use some other date type you need to accept the chrono value in your 'field_*' methods and manually convert it.
I recommend you give the docs a read since there is more details and examples there https://docs.rs/juniper-from-schema/0.5.2/juniper_from_schema/#special-case-scalars
Please do you have any example to use it
This one shows a field that returns Date
and DateTimeUtc
https://github.com/davidpdrsn/juniper-from-schema/blob/master/juniper-from-schema/tests/compile_pass/dates_and_times.rs
Did that example help?
Hi, The problem I have with Date is my appolo client in my React font end is unable to render a Date correctly so I convert the string I receive from React appolo client in juniper to a DateTime struct The graphclient web interface is working fine with DateTime and juniper but not the Appolo client in React, I am currently investigate
Best Regards
Didier Boivin
Le 28 oct. 2020 à 18:15, David Pedersen notifications@github.com a écrit :
Juniper-from-schema always uses chrono when generating code for dates. So if you want to use some other date type you need to accept the chrono value in your 'field_*' methods and manually convert it.
I recommend you give the docs a read since there is more details and examples there https://docs.rs/juniper-from-schema/0.5.2/juniper_from_schema/#special-case-scalars https://docs.rs/juniper-from-schema/0.5.2/juniper_from_schema/#special-case-scalars — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/davidpdrsn/juniper-eager-loading/issues/61#issuecomment-718082710, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALOEWJKNUTAAEUI7MJ2A4FDSNBGSTANCNFSM4TCFONCA.
Hi, How can I use DateTime in this example The compiler says expected struct
file::DateTime
, found structchrono::DateTime
file is the name of my module
Thanks