Neo4j GraphQL Toolbox
This is the documentation of the GraphQL Library version 6. For the long-term support (LTS) version 5, refer to GraphQL Library version 5 LTS. |
The Neo4j GraphQL Toolbox is an onboarding, low-code tool that can be integrated to Neo4j. It was created for development and experimentation with Neo4j GraphQL APIs. With it, you can:
-
Connect to a Neo4j database with valid credentials.
-
Define (or introspect) the type definitions.
-
Build the Neo4j GraphQL schema.
-
Experiment, query, and play.
Connect to a Neo4j database
Before you start using the Toolbox, make sure you have followed all requirements to run a Neo4j database. You can use Neo4j Desktop or Neo4j AuraDB for that.
Set the type definitions
-
Set your type definitions directly in the Toolbox editor or introspect the Neo4j database you connected to.
If you followed the Getting started tutorial, you should see these type definitions in the GraphQL Toolbox:
type Actor @node { actedInMovies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) name: String! } type Movie @node { actorsActedIn: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) title: String! }
-
Click the button "Build schema" and then go to the Query editor tab.
-
Query the Neo4j database using the autogenerated GraphQL queries and mutations from the
@neo4j/graphql
library:{ actors { name } }
The query returns the name of the single actor in the database:
{ "data": { "actors": [{ "name": "Tom Hanks" }] } }