graphql-filter-java icon indicating copy to clipboard operation
graphql-filter-java copied to clipboard

Fix LocalDateTime bug

Open pinheirosam opened this issue 2 years ago • 1 comments

1. Issue Link: https://github.com/intuit/graphql-filter-java/issues/29

2. Brief explanation of a change: Removing LocalDateTime from the parser as it converts to a Date format that will not work with SQL or JPA expressions

3. Will it break existing clients and code in production? No.

pinheirosam avatar Feb 08 '23 17:02 pinheirosam

I have a similar situation:

  1. a graphql field endDate: DateTime
  2. a filter I would like to add as an input:
input BookFilter {
    endDate: DateTimeExpression
}
input input DateTimeExpression {
    between: [DateTime!]
}
  1. a database field end_date datetime null,
  2. the Java object has a field
    @Column(name = "end_date")
    private LocalDateTime endDate;

The query filter translation current changes the input DateTime to a format which SQL (MySQL) cannot use.

m-laff avatar Feb 08 '23 17:02 m-laff