Skip to content

DateTime Scalar returns Date as opposed to String #1617

Answered by ardatan
antho1jp asked this question in Q&A
Discussion options

You must be logged in to vote

You can see DateTime scalar's Result Coercion section for the behavior. Due to the JSON serialization, Date instances are converted to JSON string so the client should receive string not Date objects. If you see this does opposite, please share a failing test or a reproduction so we can help you better :)

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@falkenhawk
Comment options

@falkenhawk
Comment options

@ardatan
Comment options

@falkenhawk
Comment options

@falkenhawk
Comment options

Answer selected by antho1jp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants