[FEATURE] Add RDF/SPARQL graph store with optional Neptune IAM authentication#405
Open
KilianTrunk wants to merge 3 commits into
Open
[FEATURE] Add RDF/SPARQL graph store with optional Neptune IAM authentication#405KilianTrunk wants to merge 3 commits into
KilianTrunk wants to merge 3 commits into
Conversation
Co-authored-by: Matic <[email protected]> Co-authored-by: Tom Soru <[email protected]>
Co-authored-by: Matic <[email protected]> Co-authored-by: Tom Soru <[email protected]>
Co-authored-by: Matic <[email protected]> Co-authored-by: Tom Soru <[email protected]>
charlesivie
reviewed
Jul 17, 2026
|
|
||
| Supported schemes are: | ||
|
|
||
| | Scheme | Endpoint transport | |
There was a problem hiding this comment.
Are all these bespoke scheme extensions really nessecary? It measn that developers will have to do some string concatination any time they want to pass in a SPARQL endpoint. I would prefer we found another way to specify specific headers for authentication.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a new
lexical-graph-contrib/sparqlpackage for storing and retrieving the lexical graph through SPARQL 1.1 query and update endpoints.The package uses RDFLib and supports generic HTTP endpoints. It also provides optional IAM authentication for the Amazon Neptune SPARQL endpoint.
Lexical graph builders and retrievers now pass a
GraphOperationvalue together with the existing graph query. The SPARQL graph store uses this value to select its native SPARQL implementation. Existing graph stores continue to execute their existing queries.Changes
graphrag-toolkit-lexical-graph-sparqlcontributor package.sparql,sparql+http,sparql+https, andsparql+neptuneconnection schemes.neptune-dbservice.GraphOperationthrough retries, batched writes, query trees, and multi-tenant graph stores.local-devtographrag-toolkit-rdf-dev.root, applyfix-permissionsto the Conda and notebook-user directories, and then return to thejovyanuser.Problem
The toolkit did not provide a
GraphStoreimplementation for SPARQL query and update endpoints.Because of this, the lexical graph storage interface could not be used with an RDF store through SPARQL. The toolkit also did not provide an IAM-signed transport for requests to the Amazon Neptune SPARQL endpoint.
This PR adds the missing SPARQL graph store as a contributor package while keeping the current graph stores and query execution paths.
Related issue (if any): N/A
Testing
pytest)Test results:
pytest lexical-graph-contrib/sparql/tests: 108 passedpytest lexical-graph/tests: 1,756 passed and 1 skippedgit diff --check upstream/main...HEAD: no errorsEndpoint behavior was tested manually against RDFox, GraphDB, and Amazon Neptune.
Checklist
The new
GraphOperationargument is optional. Graph stores without an operation-specific implementation continue to execute their existing query.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.