From 5c05889779f471dd3f4a03416c5c75975be9d6e3 Mon Sep 17 00:00:00 2001 From: a-alle Date: Mon, 24 Jun 2024 17:46:11 +0100 Subject: [PATCH] Updates to packaging --- .changeset/strong-days-roll.md | 5 +++++ README.md | 21 ++++++++++---------- connector-definition/connector-metadata.yaml | 8 ++++++-- 3 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 .changeset/strong-days-roll.md diff --git a/.changeset/strong-days-roll.md b/.changeset/strong-days-roll.md new file mode 100644 index 0000000..480b57d --- /dev/null +++ b/.changeset/strong-days-roll.md @@ -0,0 +1,5 @@ +--- +"hasura-ndc-neo4j": patch +--- + +Updates to connector packaging diff --git a/README.md b/README.md index b57152d..1795c24 100644 --- a/README.md +++ b/README.md @@ -2,18 +2,17 @@ ### To start the server: -1. Make sure there is a `configuration.json` file at the root level. The file should look like this: - -```json -{ - "neo4j_url": "neo4j://localhost:7687/neo4j", - "neo4j_user": "", - "neo4j_pass": "" -} -``` +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. + +#### Prerequisite: Set-up configuration file -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. +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. 2. Run `npm install` diff --git a/connector-definition/connector-metadata.yaml b/connector-definition/connector-metadata.yaml index 346429e..b0dc68c 100644 --- a/connector-definition/connector-metadata.yaml +++ b/connector-definition/connector-metadata.yaml @@ -1,6 +1,6 @@ packagingDefinition: type: PrebuiltDockerImage - dockerImage: ghcr.io/neo4j/ndc-connector-image:v0.0.1 + dockerImage: ghcr.io/neo4j/hasura-ndc-neo4j:v0.0.6 supportedEnvironmentVariables: - name: NEO4J_URL description: The url for the Neo4j Database @@ -9,7 +9,11 @@ supportedEnvironmentVariables: - name: NEO4J_PASS description: The password for the Neo4j Database commands: - update: docker run --rm -e NEO4J_URL="$NEO4J_URL" -e NEO4J_USER="$NEO4J_USER" -e NEO4J_PASS="$NEO4J_PASS" -v "$HASURA_CONFIGURATION_DIRECTORY":/etc/connector ghcr.io/neo4j/ndc-connector-image:v0.0.1 update + update: + type: Dockerized + dockerImage: ghcr.io/neo4j/hasura-ndc-neo4j:v0.0.6 + commandArgs: + - update dockerComposeWatch: - path: ./ target: /etc/connector