Skip to content

swsglobal/BuildingGraph-Server

 
 

Repository files navigation

Building Graph API Starter

This project is a starter for building API based on a GRANDstack (GraphQL, React, Apollo, Neo4j Database) application. Source

Quickstart: Start a Building Graph server

git clone https://github.com/willhl/BuildingGraph-Server.git
cd BuildingGraph-Server
docker-compose up

Neo4j

You need a Neo4j instance, e.g. a Neo4j Sandbox, a local instance via Neo4j Desktop, Docker or a Neo4j instance on AWS, Azure or GCP or Neo4j Cloud

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.

Local Development Setup

  1. Download Neo4j Desktop
  2. Install and open Neo4j Desktop.
  3. Create a new DB by clicking "New Graph", and clicking "create local graph".
  4. Set password to "letmein" (as suggested by api/.env), and click "Create".
  5. Make sure that the default credentials in api/.env are used. Leave them as follows: NEO4J_URI=bolt://localhost:7687 NEO4J_USER=neo4j NEO4J_PASSWORD=letmein
  6. Click "Manage".
  7. Click "Plugins".
  8. Find "APOC" and click "Install".
  9. Click the "play" button at the top of left the screen, which should start the server. (screenshot 2)
  10. Wait until it says "RUNNING".
  11. Proceed forward with the rest of the tutorial.

Install dependencies

(cd ./ui && npm install)
(cd ./api && npm install)

Start API server

cd ./api && npm start

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.3%
  • Dockerfile 1.7%