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

Separate sorting and paging into own input type

Andy2003 opened this issue · comments

For the following input:

input NodeInput {
    id: ID
}

this code should be generated

enum SortDirection {
  """Sort by field values in ascending order."""
  ASC
  """Sort by field values in descending order."""
  DESC
}

input MovieCreateInput {
  id: ID
}

input MovieOptions {
  """Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array."""
sort: [MovieSort]
  limit: Int
  skip: Int
}

"""Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object."""
input MovieSort {
  id: SortDirection
}

type Query {
  movies(id: ID, options: MovieOptions): [Movie]!
}

//... all the rest