Skip to content
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

Error when filtering by relation #107

Closed
sajsanghvi opened this issue May 24, 2018 · 3 comments
Closed

Error when filtering by relation #107

sajsanghvi opened this issue May 24, 2018 · 3 comments

Comments

@sajsanghvi
Copy link

sajsanghvi commented May 24, 2018

query{
  User(username:"Saj"){
    likes(filter:{user:{followers_some:{username:"Saj"}}}){
        user{
          username
        }
      }
  }
}

gives this error message

"Exception while fetching data (/User) : 

Invalid input 'Y': expected 'd/D' (line 4, column 147 (offset: 244))\n\"

[ (`User`)-[:`LIKES`]->(`User_likes`:`Like`) WHERE ( ALL(x IN [(`User_likes`)<-[:`LIKES`]-(`User_likes_User`) | ( `User_likes_User`.`followers` ANY {username:\"Saj\"})] WHERE x)) | `User_likes` {`_labels` : graphql.labels(`User_likes`), `user` : head([ (`User_likes`)<-[:`LIKES`]-(`User_likes_user`:`User`)  | `User_likes_user` {`_labels` : graphql.labels(`User_likes_user`), .`username`}])}] AS `likes`\"\n  
@sajsanghvi
Copy link
Author

sajsanghvi commented May 25, 2018

This is a problem that occurs whenever you filter by a relation within a relation in this example its Followers within a User within a Like

here is my Schema

type Like @model {
   user: User @relation (name:"LIKES", direction:IN)
   createdAt:Float
}
type User @model{
   followers: [User] @relation (name:"FOLLOWS", direction: IN)
   following: [User] @relation (name:"FOLLOWS", direction: OUT)
   username: String!
   createdAt:Float
   likes: [Like] @relation (name:"LIKES", direction: OUT)
}

jexp added a commit to neo4j-contrib/neo4j-graphql that referenced this issue Jun 28, 2018
jexp added a commit to neo4j-contrib/neo4j-graphql that referenced this issue Jun 28, 2018
@jexp
Copy link
Contributor

jexp commented Jun 28, 2018

Should be fixed in 3.3.0.3 and 3.4.0.1 please check and let me know.

@sajsanghvi
Copy link
Author

You are a god!

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

No branches or pull requests

2 participants