All commands will require some environment variables to connect to your Neo4j instance, for example: NEO4J_URL=neo4j://localhost:7687/neo4j NEO4J_USER= NEO4J_PASS=
Remember to provide them when running the following commands.
Use the included CLI tool by running npm run update:config
.
This will introspect your database and create the corresponding configuration file in the root directory, named configuration.json
. The connector will use this file in running mode.
-
Run
npm install
-
Run
npm start
-
Make sure the server is started by following the instructions above.
-
Run
cargo run --bin ndc-test -- test --endpoint http://localhost:8100
from thendc-spec
. More info can be found here.
-
Make sure the server is started in test mode. For this, follow the instructions above but run the
npm run start:test
command as the last step. -
Run
npm run test
-
Any new tests you want to run should be inside the
__tests__/requests
folder and should follow the schema described in the__tests__/data/configuration.json
file
Prerequisite: Steps 1-3 from https://hasura.io/docs/3.0/local-dev/#step-1-prerequisites
-
Start server locally
-
Make sure the connector URL is your local server URL
definition:
name: neo4j_connector
url:
singleUrl:
value: http://localhost:<PORT>
-
Start server locally
-
Use Hasura extension to refresh connector, track collections, track relationships
- only track Array relationships
- rename relationships if necessary
-
Start Hasura daemon:
hasura3 daemon start
-
Get Tunnel Endpoint
- check if exists:
hasura3 tunnel list
- or create one:
hasura3 tunnel create localhost:<PORT>
-
Change connector URL to Tunnel Endpoint
-
Deploy connector:
hasura3 build create
-
Run queries in Hasura Console using the latest build: https://console.hasura.io/project/grown-pegasus-6631