Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.7 KB

File metadata and controls

40 lines (29 loc) · 1.7 KB

Example: Integration of Neo4j-GraphQL-Java into a Spring Boot application in combination with Netflix DGS

Overview

In the Neo4jConfiguration a DataFetchingInterceptor is created, which will be bound to all fields augmented by the neo4j-graphql-library. Its purpose is the execution of the cypher query and the transformation of the query result.

In the GraphQLConfiguration the type definitions of schema are loaded and augmented.

In this example some fields of the enhanced type (neo4j) are extended with custom data fetcher whose schema is separately defined.

With This in place you can

Run the example

  1. configure your neo4j db or use a public one

  2. run the spring boot application

  3. open http://localhost:8080/graphiql to run some graphql queries e.g. try:

query{
  other
  movies (options: {limit: 3}){
    title
    bar
    javaData {
      name
    }
  }
}

What’s next

Take a look into the Test-Case to see, how the generated POJOs of your augmented schema can be used to request data