graphql-scalars icon indicating copy to clipboard operation
graphql-scalars copied to clipboard

Date parsing fails

Open wzrdtales opened this issue 3 years ago • 2 comments

Date cannot represent an invalid date-string 1993-02-12T00:00:00.000Z.

This error gets thrown if a date comes back from a database. This is weird and probably a bug since the scalar itself delivers a javascript date object which is represented exactly this way and it stops complaining if it gets passed in new Date() first.

wzrdtales avatar Nov 13 '22 22:11 wzrdtales

so it is enough to serialize the date object produced by this scalar and pass it back to a resolver with the same scalar to cause this issue. I don't think this is a wanted behavior.

wzrdtales avatar Nov 13 '22 22:11 wzrdtales

https://github.com/Urigo/graphql-scalars/pull/1641

falkenhawk avatar Dec 03 '22 14:12 falkenhawk