- Make sure there is a
configuration.json
file at the root level. The file should look like this:
{
"neo4j_url": "neo4j://localhost:7687/neo4j",
"neo4j_user": "",
"neo4j_pass": ""
}
The config property is optional and if not configured, the server will introspect the Neo4j DB in order to create the GraphQL operations.
To control the design of the GraphQL operations, the config
property can be specified. An example can be found in the __tests__/data/configuration.json
file.
-
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