Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporal date format error #175

Open
gchokeen opened this issue Apr 17, 2019 · 6 comments
Open

Temporal date format error #175

gchokeen opened this issue Apr 17, 2019 · 6 comments
Assignees

Comments

@gchokeen
Copy link

Hi,

I'm getting 500 error on the graphql endpoint once I added the temporal date in the node property.

Example : MATCH (n:Project) set n.createAt = datetime()

Once run the above try to get the graphql schema as like this

call graphql.schema()

Error

Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke procedure graphql.schema: Caused by: java.lang.IllegalArgumentException: Invalid type java.time.ZonedDateTime

Thanks

@jexp
Copy link
Contributor

jexp commented Apr 17, 2019

Hi,

I'm sorry temporal properties are not yet supported by the plugin.
We plan to alleviate that when we switch the transpiler to https://github.com/neo4j-graphql/neo4j-graphql-java

Until then you'd either have to use epoch timestamps or strings, or convert your datetime values into those using an @cypher directive.

@jexp
Copy link
Contributor

jexp commented Apr 17, 2019

What does your tech-stack look like?

@gchokeen
Copy link
Author

Hi @jexp,

Thats really bad news for me!

Do you have any road map plan when this plugin going to support temporal properties?

We're importing the data from csv using import tool, If we want to use the epoch timestamps, do you know how to import that? for temporal we use propery:datetime , We're using this dates for filtering purpose.

We directly consuming graphql response in our client app. Do you know how to use @cypher directive

Our tech stack is frontend technologies!

@jexp
Copy link
Contributor

jexp commented Apr 17, 2019

If you are using frontend technologies (i.e. javascript/typescript) on the server side too, did you check out grandstack.io and neo4j-graphql-js ? Both of which already support the temporal types.

For the plugin it will take some time, as we want to redo it using the transpiler.

For @cypher directive:

type Project {
   createAt: Int @cypher(statement, "RETURN this.createeAt.epochSeconds as value")
}

for import you could just have a field with the epoch seconds.

@jexp jexp assigned jexp and conker84 and unassigned jexp Apr 17, 2019
@jexp
Copy link
Contributor

jexp commented Apr 17, 2019

@conker84 this is about finishing the work to add temporal types in neo4j-graphql-java in the same way they are done in neo4j-graphql-js @johnymontana or @michaeldgraham can certainly help.

I already started it with the typesystem, needs to be finished to be integrated in the transpiler.

@jexp
Copy link
Contributor

jexp commented Jun 19, 2019

You will be able to use the new functionality using the /graphql/experimental endpoint until we switch over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants