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

Incorrect query translation for @property(name:"testIds.uuid") #160

Closed
mdiadia-rft opened this issue Nov 23, 2020 · 1 comment
Closed

Incorrect query translation for @property(name:"testIds.uuid") #160

mdiadia-rft opened this issue Nov 23, 2020 · 1 comment

Comments

@mdiadia-rft
Copy link

Hello

Given type:

type User {
    userId: ID!
    uuid: String @property(name:"testIds.uuid")
}

And GraphQL query:

{
  user(filter: {uuid:"test-uuid"}) {
    userId
    uuid
  }
}

Method translate generates wrong filter condition(WHERE section), using method translate into class Translator.kt:

MATCH (user:User) 
WHERE user.uuid= 'test-uuid'
RETURN user { .userId, uuid:user.`testIds.uuid`} AS user

But query should be:

MATCH (user:User) 
WHERE user.`testIds.uuid`= 'test-uuid'
RETURN user { .userId, uuid:user.`testIds.uuid`} AS user

Actual result: empty object is returned.

Possible places to fix:
Predicates.kt#toExpression line 120
Predicates.kt#resolvePredicate line 33(be aware about dots in filter placeholders)

Thanks

mdiadia-rft added a commit to mdiadia-rft/neo4j-graphql-java that referenced this issue Nov 25, 2020
@Andy2003
Copy link
Collaborator

Resolved by #171

Andy2003 pushed a commit that referenced this issue Apr 14, 2021
Andy2003 added a commit that referenced this issue Apr 14, 2021
Andy2003 added a commit that referenced this issue Apr 14, 2021
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