Hello all, I have a question about GRANDstack:
I have a type in my GraphQL schema like this:
type SAVEDNODE {
id: ID!
date: LocalDateTime
}
I would like to add a property to a node that will be created in Neo4j thanks to a mutation with GraphQL.
I tried this to have the current time created in nodes when a mutation is called:
type mutation {
MergeSAVEDQUERY(id:ID!, date:_Neo4jDateTimeInput): SAVEDNODE @cypher(statement:
"""Merge (q:SAVEDQUERY {id:$id})
ON MATCH SET q.date=$date
WITH EXISTS($k) AS key
ON CREATE SET q.date=$date
RETURN q
""")
}
In a node created I have the property date created with the current date but have this:
"date": "2021-04-06T00:00:00Z"
I have this as a result:
{
"identity": 185110,
"labels": [
"SAVEDNODE"
],
"properties": {
"date": "2021-04-07T00:00:00",
"id": "Test"
}
}
I don't understand why I only have zeros after 06.
How can I do to have the current exact time when I do the mutation request ?