GrapQL idl date time schema

(Lanlay Mks) #1

How do I write grapql schema for created datetime property and make it assign a current datetime for my selected timezone with @cypher directive?

I'm asking for graphql idl to use with GraphQL plugin of neo4j.


(Michael Hunger) #2

Great question, I still have to add support for datatime and spatial for the plugin and also across the other APIs.

Do you by chance have an example of other graphql apis that support those so that we can be consistent with them? I guess we'd have to go with something more complex than a simple scalar, i.e. an input/object-type to represent (local)date(time) and spatial correctly.


(Lanlay Mks) #3

Hi micheal, other graphql workflows handle this use case with default-value usually in ORM layer not in graphql schema itself but in our case GraphqlQl plugin need to handle the task of ORM used with other types of databases for their graphql api.

Maybe implementing @default directive for this issue would cover more use cases down the line i guess.
Just my 2cents. Thanks for the quick reply.