-
Notifications
You must be signed in to change notification settings - Fork 147
Filtering _Neo4jDateTime within AND, OR condition resulting in "Neo4jError: No such field: formatted" #495
Comments
Also, I'd like to clarify...this issue does not have to do with |
one final note, if anyone is affected by this, my temporarily work-around is to use stop using function temporaryPatchForNeo4jGraphQLBug(isoString) {
const date = new Date(isoString);
// return an obj neo4j understands
return {
year: date.getUTCFullYear(),
month: date.getUTCMonth() + 1,
day: date.getUTCDate(),
hour: date.getUTCHours(),
minute: date.getUTCMinutes(),
second: date.getUTCSeconds(),
millisecond: date.getUTCMilliseconds(),
timezone: 'Z'
};
} |
* makes test script more specific * exports some filter argument builders * experimental support for where / data mutation arguments * Update node.js * experimental support for where / data mutation arguments * experimental support for where / data mutation arguments * experimental support for where / data mutation arguments * exports schema comparison helpers now used by both the normal and experimental augmentation tests * adds test for experimental augmented schema * adds typeDefs for experimental augmentation test * Update augmentSchemaTest.test.js * augmentation test for experimental schema * adds tests for experimental node and relationship mutation arguments * removes unused arguments and branches on array emptiness * fixed temporal ordering and filtering #524: unified the translation of nested orderBy arguments for relationship fields into translateNestedOrderingArgument, fixed schemaType argument to be innerSchemaType, for call in relationFieldOnNodeType #495: uses parentIsListArgument to buildNeo4jTypeTranslation, to appropriately translate temporal filters used within OR / AND list filters * adds tests for fixing #495 and #524 * blocks empty string "" from passing this results in letting the cypher error pass through, caused by datetime(""), if an empty string is provided for a .formatted argument * removed now unused function argument * Update input-values.js
@johnymontana please reopen, as it stills an open issue apparently on Thank you 🙏 |
@johnymontana I have this on |
@NawarA I reckon this is something wrong with the graphql client we are using. I am using Apollo Boost When I try this with GraphQL playground, everything goes well and { formatted: <ISO_DATE_STRING> } works but fails when I send from apollo-boost. My suspicion is that the client library to talk to GraphQL is unable to introspect |
We're using Screenshot from the apollo site. I believe you're correct. The open issue allows developers to save DateTime using PS: happy thanksgiving :) |
Happy Thanks giving mate, Yes I just made changes to move to apollo client. The issue is with APOC not this library though from what I found from my neo4j logs |
Hi to all! Also having this issue. |
@igokul1973 |
Assignment(filter: { AND: [ { OR: [ {AND: {start_lt: {formatted:$end}, start_gt: {formatted:$start}}}, {AND: {end_lt: {formatted:$end}, end_gt: {formatted:$start}}}, {AND: {start_lt: {formatted:$start}, end_gt: {formatted:$end}}}, ]}, {timeline: {name: $timelineName}} ]}) { id }
This causes an error:
"Neo4jError: No such field: formatted"
Where as:
Assignment(filter: {start_lt: {formatted:$end}, start_gt: {formatted:$start}}) { id }
does not.
assignments( filter: { AND: [ { OR: [ { AND: { start_lt: { year: 2021 }, start_gt: { year: 2020 } } } { AND: { end_lt: { year: 2021 }, end_gt: { year: 2020 } } } { AND: { start_lt: { year: 2020 }, end_gt: { year: 2021 } } } ] } { timeline: { name: $timelineName } } ] } )
Is also a valid working query, so it seems just an issue with using {formatted: ""} inside of AND and OR conditions.
The text was updated successfully, but these errors were encountered: