Neo4j-graphql-java features and config

Hello, I have started to play with neo4j-graphql-java (since we are a java shop). Before that I made a POC with Grandstack and neo4j-graph-js.
It worked great but now I am trying to move schema.graphql to my spring boot app that is using neo4j-graphql-java and graphql-kotlin-spring-server.

schema.graphql doesn't work out of the box, so I am trying to understand the differences, learn the motivation behind them and possible workarounds :slight_smile:

In Grandstack I had Date and Point implicitly defined. Here I have to declare them as scalars:

scalar Date
scalar Point

Since I would like to use the same schema across both projects, is there a config where I could specify this implicit import?

Then in Grandstack my types are generated as queries by preserving the original names. In java lib (I guess this has been done by kotlin graphql schema generator) , the query types are decapitalized, e,g type Movie is generated as query movie.

I found the config in the docs GitHub - neo4j-graphql/neo4j-graphql-java: Pure JVM translation for GraphQL queries and mutations to Neo4j's Cypher that says:

  • configure capitalization of top level generated fields
    but where should I put this?

And finally I would like to ask:

  • What are the short and long term plans with this library (neo4j-graphql-java). Will it follow the development of neo4j-graphql (to be officially supported js lib, now in beta), since it is currently trying to be on par with neo4j-graphql-js?
  • Are there any load tests performed against neo4j-graphql-java? I am mostly interested how it compares with grandstack / neo4j-graphql-js

Thanks in advance,
Milan

I think we chatted about this in Discord, but I will post here as well for others:

For configuring the generated schema, SchemaBuilder.buildSchema takes a configuration object as the second argument. You can see some examples of using this configuration in the augmentation tests here and specifically for capitalized queries here.

There are not currently plans to make neo4j-graphql-java an official project. Andreas Berger has been looking at ways to align neo4j-graphql-java with the official Neo4j GraphQL library outlined in these issues.

1 Like