GraphQL Neo4J query that filters by date doesn’t return any data when it should

GraphQL Neo4J query that filters by date doesn’t return any data when it should


0

I’ve been trying to get my head around this issue for a couple of days but I seem to be unable to find a solution.

I’m working on a GraphQL backend that uses Apollo and Neo4j. I’ve got a type similar to this one:

type Data {
  ID: ID! @id(autogenerate: true, unique: true)
  data: String!
  createdAt: DateTime! @timestamp(operations: [CREATE])
}

The schema is being generated with:

const neo4jGraphQL = new Neo4jGraphQL({
  typeDefs, // Loaded from a file with the defs, this works fine as most queries are working as expected
  ...restOfConfig
});

If I query Data (even with a where, as my real type definition has more fields than the ones above) it correctly returns a list of Data. If I copy the createdAt value from any entry and make this query then no entries are retrieved:

query Data($where: DataWhere) {
  data(where: $where) {
    ID
    data
    createdAt
  }
}

// Variables (JSON):

{
  "where": {
    "createdAt": "2012-04-03T10:63:10Z"
  }
}

Any idea on why could this be? There are other date filtering where conditions available such as createdAt_gt but none related to dates seem to work (every time I run a query the list of Data retrieved is empty), any filtering by other fields (for example ID) seems to work perfectly.

Thanks in advance!


Load 3 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *