You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.
I'm using the GRANDstack and when attempting to access a formatted Neo4j datetime on a relationship type I am running into this TypeError:
[
TypeError: Cannot read property 'value' of undefined
at getRelationTypeDirective (/Users/matthewlarson/Projects/carebear_backend/node_modules/neo4j-graphql-js/dist/utils.js:709:7)
at buildCypherSelection (/Users/matthewlarson/Projects/carebear_backend/node_modules/neo4j-graphql-js/dist/selections.js:309:68)
at recurse (/Users/matthewlarson/Projects/carebear_backend/node_modules/neo4j-graphql-js/dist/selections.js:97:33)
at buildCypherSelection (/Users/matthewlarson/Projects/carebear_backend/node_modules/neo4j-graphql-js/dist/selections.js:545:17)
at recurse (/Users/matthewlarson/Projects/carebear_backend/node_modules/neo4j-graphql-js/dist/selections.js:97:33)
at buildCypherSelection (/Users/matthewlarson/Projects/carebear_backend/node_modules/neo4j-graphql-js/dist/selections.js:545:17)
at customQuery (/Users/matthewlarson/Projects/carebear_backend/node_modules/neo4j-graphql-js/dist/translate.js:993:68)
at translateQuery (/Users/matthewlarson/Projects/carebear_backend/node_modules/neo4j-graphql-js/dist/translate.js:828:24)
at cypherQuery (/Users/matthewlarson/Projects/carebear_backend/node_modules/neo4j-graphql-js/dist/index.js:277:40)
at _callee3$ (/Users/matthewlarson/Projects/carebear_backend/node_modules/neo4j-graphql-js/dist/index.js:105:31) {
message: "Cannot read property 'value' of undefined",
locations: [ [Object] ],
path: [ 'GetNotificationsByUser' ]
}
]
type Notification @relation(name: "NOTIFIES") {
to: User
body: String!
notificationType: NotificationType!
createdAt: DateTime!
updatedAt: DateTime!
}
The userId I am querying with has one "notification" and this is what rel returns in Neo4j:
{
"identity": 636,
"start": 249,
"end": 1,
"type": "NOTIFIES",
"properties": {
"createdAt": "2020-12-22T19:57:48.433000000Z",
"notificationType": "POST_MENTION",
"body": "og mentioned you in a thread",
"updatedAt": "2020-12-22T19:57:48.433000000Z"
}
}
The createdAt property looks the same as any other NeojDateTime and GetNotificationsByUser returns just fine when leaving off createdAt. Example GraphQL query:
Are you sure your createdAt date is a datetime object and not a string ? Asking because you didn't share your mutation, although you probably meant that with The createdAt property looks the same as any other NeojDateTime
When visualizing on neo4j desktop, a datetime object would be highlighted in gray.
@AdrienLemaire - It's definitely a datetime object. @danionescu2007 - Sadly I opted to create the Notification as a node rather than a relationship to avoid this issue. That works fine, I'm now just creating one extra unnecessary relationship.
I'm using the GRANDstack and when attempting to access a formatted Neo4j datetime on a relationship type I am running into this TypeError:
Here is
GetNotificationsByUser
:and the Notification relationship type:
The userId I am querying with has one "notification" and this is what
rel
returns in Neo4j:The
createdAt
property looks the same as any other NeojDateTime andGetNotificationsByUser
returns just fine when leaving offcreatedAt
. Example GraphQL query:The text was updated successfully, but these errors were encountered: