question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Server returns deprecated format of 'createdAt' timestamps

See original GitHub issue

Playground somehow displays another representation of the timestamps then expected.

With this query: query { message(id: "1") { text createdAt } }

I get this as result: { "data": { "message": { "text": "Published the Road to learn React", "createdAt": "1539693730039" } } }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
Ragyalcommented, Oct 18, 2018

It´s called graphql-iso-date you can install it with

npm install --save graphql-iso-date or yarn add graphql-iso-date

and here is a link to their repository.

2reactions
Ragyalcommented, Oct 17, 2018

Replacing [Sequelize.Op.lt]: cursor, by [Sequelize.Op.lt]: new Date(Number(cursor)).toISOString(), hotfixes the issue for testing with playground.

For a real fix I would prefer a custom date scalar (there are already packages for that) since dates are something very common to deal with when handling data.

Read more comments on GitHub >

github_iconTop Results From Across the Web

php8.1 - Deprecated Functionality: DateTime()
We use the following code that worked perfectly on php7.4, but we get a deprecated error on php8.
Read more >
12.7 Date and Time Functions
TIMESTAMP (), With a single argument, this function returns the date or ... Time zones are specified as described in Section 5.1.13, “MySQL...
Read more >
The Definitive Guide to DateTime Manipulation
If you don't pass anything to the Date constructor, the date object returned contains the current date and time. You can then format...
Read more >
Date - JavaScript - MDN Web Docs - Mozilla
Chrome Edge Date Full support. Chrome1. Toggle history Full support. Edge12. Toggle hist... @@toPrimitive Full support. Chrome47. Toggle history Full support. Edge15. Toggle hist... Date() constructor...
Read more >
Timestamp | JavaScript SDK | Firebase JavaScript API reference
Reference for Timestamp. ... isEqual. isEqual ( other : Timestamp ) : boolean. Returns true if this Timestamp is equal to the provided...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found