-
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
Fix issues in fetchSchema for OpenCypher #245
Conversation
a9a6ba1
to
898612c
Compare
packages/graph-explorer/src/connector/openCypher/queries/fetchSchema.ts
Outdated
Show resolved
Hide resolved
packages/graph-explorer/src/connector/openCypher/queries/fetchSchema.ts
Outdated
Show resolved
Hide resolved
packages/graph-explorer/src/connector/openCypher/queries/fetchSchema.test.ts
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #245 +/- ##
==========================================
+ Coverage 10.06% 11.02% +0.95%
==========================================
Files 409 408 -1
Lines 30156 30166 +10
Branches 660 706 +46
==========================================
+ Hits 3036 3325 +289
+ Misses 26785 26508 -277
+ Partials 335 333 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@alexey-temnikov I believe with my recent changes this is ready for another review pass. |
I believe I have covered all comments in this PR and it is ready for another look. |
1f7773b
to
50a2bd5
Compare
Some OpenCypher labels have no edges, but we were assuming they all did. This caused a null reference exception. I changed the assumption to allow for empty edges and added a guard check to skip empty labels.
Co-authored-by: Alexey Temnikov <alexey.temnikov@improving.com>
60c7ed6
to
0a54c4b
Compare
I brought in the latest from |
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.
LGTM
Description of changes: Fixes failure when retrieving schema of older Neptune DB with OpenCypher (moved to PR Fix issues in fetchSchema for OpenCypher #245) Fixes SPARQL keyword search by exact match Adds ID attribute for Gremlin and OpenCypher connections Adds test cases to keywordSearchTemplate for new ID functionality Adds missing test cases for SPARQL keywordSearchTemplate cases Changes default search attribute to ID for Gremlin and OpenCypher Changes default search attribute to rdfs:label for SPARQL Changes default search precision to Exact Changes behavior when node type selection changes to reset attribute and precision to the values above Changes OpenCypher search queries to execute concurrently when searching multiple vertices (i.e. "All") Includes formatting of only files that were modified
Issue #, if available: N/A
Description of changes:
string[]
orstring
.gitignore
to/packages/graph-explorer
to give VS Code the info it needs to search in the right foldersOn older versions of Neptune, where the summary API is not supported, there were some issues when fetching the schema for an OpenCypher connection.
In the case where OpenCypher returns an empty list for the edge properties, the entire
fetchSchema
stack would fail. Now it will simply move to the next edge.I also determined that OpenCypher was returning an empty list in my case because of an incorrect assumption around the edge labels. It was trying to extract the label name from an array of label names, but in reality it was not an array. So we ended up with just the first character of the label name. To fix this, I check the response to ensure it is an array. If it isn't, then assume it is a string.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.