This project is a starter for building a GRANDstack (GraphQL, React, Apollo, Neo4j Database) application. There are two components to the starter, the UI application (a React app) and the API app (GraphQL server).
To use docker-compose to quickly start please make the following changes
NEO4J_URI=bolt://neo4j:7687 NEO4J_USER=neo4j NEO4J_PASSWORD=letmein GRAPHQL_LISTEN_PORT=4000 GRAPHQL_URI=http://api:4000
Now you can quickly start via:
docker-compose up -d
If you want to load the example DB after the services have been started:
docker-compose run api npm run seedDb
For schemas using the
@cypher directive (as in this repo) via
neo4j-graphql-js, you need to have the APOC library installed, which should be automatic in Sandbox, Cloud and is a single click install in Neo4j Desktop. If when using the Sandbox / cloud you encounter an issue where an error similar to
Can not be converted to long: org.neo4j.kernel.impl.core.NodeProxy, Location: [object Object], Path: users appears in the console when running the React app, try installing and using Neo4j locally instead.
A good tutorial can be found here: https://www.youtube.com/watch?v=rPC71lUhK_I
- Download Neo4j Desktop
- Install and open Neo4j Desktop.
- Create a new DB by clicking "New Graph", and clicking "create local graph".
- Set password to "letmein" (as suggested by
api/.env), and click "Create".
- Make sure that the default credentials in
api/.envare used. Leave them as follows:
NEO4J_URI=bolt://localhost:7687 NEO4J_USER=neo4j NEO4J_PASSWORD=letmein
- Click "Manage".
- Click "Plugins".
- Find "APOC" and click "Install".
- Click the "play" button at the top of left the screen, which should start the server. (screenshot 2)
- Wait until it says "RUNNING".
- Proceed forward with the rest of the tutorial.
(cd ./ui && npm install) (cd ./api && npm install)
Start API server
cd ./api && npm start
This will start the GraphQL API in the foreground, so in another terminal session start the UI development server:
Start UI server
cd ./ui && npm start
See the project releases for the changelog.
This project is licensed under the Apache License v2. Copyright (c) 2018 Neo4j, Inc.