I'm using the Neo4j GraphQL library and I'm new at this. I successfully created a schema and some nodes of type event. The event nodes have a field called startTime which is defined as a DateTime in my schema:
type Event {
id: ID! @id
title: String!
startTime: DateTime!
When I run a mutation to create the events, they are successfully created. But when I query the events, it breaks, but only when the startTime is included in the response. With this query
The mutation I had previously used to create the node was like this:
mutation {
createEvents(input: [
{
title: "New Year's Eve Block Party at Hance Park2",
startTime: "2021-12-31T02:21:37.146Z",
...
It looks like there is something wrong with the format that I used to create the title string. I saw some docs about creating the date as an object, but that format was invalid as well. How do I create the DateTime correctly in the mutation?
I tried installing it, with no effect. The error says it is an internal server error so I figured there must be something wrong with the input.
I think extra field timezone should be added
Do you have an example of that? I couldn't find an example in the documentation where you create a DateTime on a node along with the timezone in a separate field. I thought the timezone wouldn't have to be in a separate field because it is encoded in the Javascript date string.