I have the following query:
const {
data: { testTime }
} = await client.query(q.Get(userRef));
last time I checked, testTime
should be an object with @ts
in it, something like:
testTime: {
'@ts': 'time here'
}
then I can do new date(testTime['@ts'])
and it should give me a valid date, but just now, when I tried to do that, it returned with Invalid Date
, then I tried to console.log
testTime
and it logged with Time("2020-10-10T09:15:00.428020Z")
, and logging @ts
says undefined
.
faunadb@3.0.1
What I remember I did (not sure if relevant)
Weeks ago, I remember it was working (when I was implementing another feature related to time, that’s how I know it has @ts
property in it), then recently I added a new field on the data of the collection, also a time field, then I populated it using the EDIT button on the faunadb UI (I simply clicked on the pencil icon), then I just pasted this value Time("2020-10-10T09:15:00.428020Z")
there (I could have used the shell, but this was a lot faster)… I wasn’t expecting it to break anything really.