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

Default values for sorting and paging on fields should be respected

Andy2003 opened this issue · comments

Given Schema

type Movie {
  actors(first: Int = 3, offset: Int = 0, name: String): [Actor] @relation(name: "ACTED_IN", direction:IN)
}
type Actor {
  name: String
}

and quuery

----
{
  Movie {
    actors {
      name
    }
  }
}

should result in a query like:

MATCH (movie:Movie)
RETURN movie {
	.title,
	actors: [(movie)<-[:ACTED_IN]-(movieActors:Actor) | movieActors {
		.name
	}][0..3]
} AS Movie

But currently all actors are returned:

MATCH (movie:Movie)
RETURN movie {
	actors: [(movie)<-[:ACTED_IN]-(movieActors:Actor) | movieActors {
		.name
	}]
} AS Movie