-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added compatibility with Neptune Analytics #241
Changes from all commits
76f73dd
bffd837
b463e33
58efcf2
4863c90
3bacb01
553675d
3813e1d
811721a
fea0ebc
d3b203f
51e25b2
cc3676d
f80e5b2
572ae4b
45486ab
d69e2bc
4dc9e69
200a1a9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
**/node_modules/ | ||
**/coverage/ | ||
**/.DS_Store | ||
**/.vs/ | ||
**/.idea/ | ||
**/.vs/ |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -49,6 +49,7 @@ You can create and manage connections to graph databases using this feature. Con | |||||
- **Using proxy server:** Check this box if using a proxy endpoint. | ||||||
- **Graph connection URL:** Provide the endpoint for the graph database | ||||||
- **AWS IAM Auth Enabled:** Check this box if connecting to Amazon Neptune using IAM Auth and SigV4 signed requests | ||||||
- **Service Type:** Choose the service type | ||||||
- **AWS Region:** Specify the AWS region where the Neptune cluster is hosted (e.g., us-east-1) | ||||||
- **Fetch Timeout:** Specify the timeout for the fetch request | ||||||
|
||||||
|
@@ -122,6 +123,7 @@ To provide a default connection such that initial loads of the graph explorer al | |||||
- `GRAPH_CONNECTION_URL` - `None` - See [Add a New Connection](#connections-ui) | ||||||
- Required if `USING_PROXY_SERVER=True` and `IAM=True` | ||||||
- `AWS_REGION` - `None` - See [Add a New Connection](#connections-ui) | ||||||
- `SERVICE_TYPE` - `neptune-db`, Set this as `neptune-db` for Neptune database or `neptune-graph` for Neptune Analytics. | ||||||
alexey-temnikov marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
#### JSON Configuration Approach | ||||||
|
||||||
|
@@ -133,6 +135,7 @@ First, create a `config.json` file containing values for the connection attribut | |||||
"GRAPH_CONNECTION_URL": "https://cluster-cqmizgqgrsbf.us-west-2.neptune.amazonaws.com:8182", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
"USING_PROXY_SERVER": true, (Can be string or boolean) | ||||||
"IAM": true, (Can be string or boolean) | ||||||
"SERVICE_TYPE": "neptune-db", | ||||||
"AWS_REGION": "us-west-2", | ||||||
"GRAPH_TYPE": "gremlin" (Possible Values: "gremlin", "sparql", "opencypher"), | ||||||
"GRAPH_EXP_HTTPS_CONNECTION": true (Can be string or boolean), | ||||||
|
@@ -160,6 +163,7 @@ docker run -p 80:80 -p 443:443 \ | |||||
--env IAM=false \ | ||||||
--env GRAPH_CONNECTION_URL=https://cluster-cqmizgqgrsbf.us-west-2.neptune.amazonaws.com:8182 \ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Exact endpoints should not be used in the documentation. |
||||||
--env AWS_REGION=us-west-2 \ | ||||||
--env SERVICE_TYPE=neptune-db \ | ||||||
--env PROXY_SERVER_HTTPS_CONNECTION=true \ | ||||||
--env GRAPH_EXP_FETCH_REQUEST_TIMEOUT=240000 \ | ||||||
graph-explorer | ||||||
|
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -79,6 +79,7 @@ const fetchVerticesAttributes = async ( | |||||||||
const response = await openCypherFetch<RawVerticesSchemaResponse>(verticesTemplate); | ||||||||||
|
||||||||||
const vertex = response.results[0]?.object as OCVertex; | ||||||||||
if (!vertex) return; | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: avoid adding a return statement, and wrap
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's return early pattern There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with @vkagamlyk in this case. Returning early when checking assertions is good practice. The only nit I would have is to not use inline if (!vertex) {
return;
} |
||||||||||
const label = vertex["~labels"][0] as string; | ||||||||||
const properties = vertex["~properties"]; | ||||||||||
vertices.push({ | ||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's explain inline (so it is easier for folks to understand) - choose service time
neptune-db
for Neptune database,neptune-graph
for Neptune Analytics or empty when not using IAM authentication. ?