Skip to content

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

License

Notifications You must be signed in to change notification settings

singulr-ai/neo4j-graphql-java-fork

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JVM Library to translate GraphQL queries and mutations to Neo4j’s Cypher

This is an early stage alpha implementation written in Kotlin.

The basic usage should be:

val schema =
        """
        type Person {
            name: String
            age: Int
        }
        type Query {
            person : [Person]
            personByName(name:String) : Person
        }"""

val query = """ { p:personByName(name:"Joe") { age } } """

val schema = SchemaBuilder.buildSchema(idl)
val (cypher, params) = Translator(schema).translate(query, params)

cypher == "MATCH (p:Person) WHERE p.name = 'Joe' RETURN p {.age}"

Features

  • parse SDL schema

  • resolve query fields via result types

  • handle arguments as equality comparisons for top level and nested fields

  • handle relationships via @relation directive on schema fields

  • handle first, offset arguments

  • argument types: string, int, float, array

  • parameter support

  • parametrization

  • aliases

  • inline and named fragments

  • sorting (top-level)

Next

  • @relationship types

  • filters

  • sorting (nested)

  • interfaces

  • input types

  • @cypher for fields

  • auto-generate queries

  • auto-generate mutations

  • unions

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Kotlin 98.3%
  • Other 1.7%