neo4j-graphql / neo4j-graphql-java

Neo4j Labs Project: Pure JVM translation for GraphQL queries and mutations to Neo4j's Cypher

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

orderBy a field with underscores in the name generates bad cypher

michael-forman opened this issue · comments

commented

With a schema:

type Foo {
  uuid: ID!
  some_field: String!
}

then a query:

query {
    foo(orderBy:some_field_asc) { uuid some_field }
}

generates cypher:

MATCH (foo:Foo)
RETURN foo { .uuid, .some_field } AS foo ORDER BY foo.some FIELD

that does not execute for me:

Could not process data through Data Port [graphql].
! org.neo4j.driver.exceptions.ClientException: Invalid input 'I': expected 'r/R' or 'o/O' (line 2, column 61 (offset: 76))
! "RETURN foo { .uuid, .some_field } AS foo ORDER BY foo.some FIELD"

Cheers,

Michael

This bug will be fixed with #3 as soon when PR #103 is merged

commented

great, thanks @Andy2003