Skip to content

Filter with Datetime (Temporal) not working #93

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

Closed
Techyoga1990 opened this issue Jul 10, 2020 · 3 comments · Fixed by #235
Closed

Filter with Datetime (Temporal) not working #93

Techyoga1990 opened this issue Jul 10, 2020 · 3 comments · Fixed by #235
Assignees

Comments

@Techyoga1990
Copy link

Techyoga1990 commented Jul 10, 2020

I am trying to filter data using date time but Neo4J translator is not creating correct query, i am not sure if this is bug or feature is missing.

I have schema like below :-

type Person{
name: String
born: _Neo4jDateTime
} 

i am using below query using filter :-

{
person(filter: {born: {year_gt: 2010} }){
name
born{
formatted
}
}
}

below Cyper is getting created :-

MATCH(person:Person) where person.born > $filterPersonBorn_GT
RETURN ....

year is not getting considered in query.

Can you please help me right query for date time filter or if there any workaround for this issue.

@Andy2003
Copy link
Collaborator

This type of filtering for temporal types is not yet implemented and there is currently no workaround to get it working.
I will have a look at this issue.

@jexp
Copy link
Contributor

jexp commented Nov 11, 2020

could we implement this by using the accessory like born.year > $x

@Andy2003
Copy link
Collaborator

as pointed out in #229 (comment), the way to filter dates / times should be refactored to macht the logic of the js version.

This means, we remove the date-/time-related types and use scalars (iso strings) instead

rbramley added a commit to rbramley/neo4j-graphql-java that referenced this issue May 26, 2021
Andy2003 added a commit that referenced this issue Jun 11, 2021
With these changes a new configuration param `useTemporalScalars` was introduced. With this configuration enabled, neo4js' temporales like `Date`, `Time`, `LocalTime`, `DateTime` and `LocalDateTime` are used as scalars (strings).

resolves #223, #109, #108, #93
Andy2003 added a commit that referenced this issue Jun 12, 2021
With these changes a new configuration param `useTemporalScalars` was introduced. With this configuration enabled, neo4js' temporales like `Date`, `Time`, `LocalTime`, `DateTime` and `LocalDateTime` are used as scalars (strings).

resolves #223
resolves #109
resolves #108
resolves #93
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

Successfully merging a pull request may close this issue.

3 participants