Skip to content
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

feat: Neo4j passthrough queries #8

Open
cvauclair opened this issue Jan 8, 2025 · 0 comments
Open

feat: Neo4j passthrough queries #8

cvauclair opened this issue Jan 8, 2025 · 0 comments

Comments

@cvauclair
Copy link
Contributor

cvauclair commented Jan 8, 2025

Description

Add an additional endpoint to the API to forward queries to the Neo4j database.

Motivation

Although the GRC20 indexer stack now uses a GraphQL API to serve KG data, there are still uses cases that would benefit from direct access to the underlying Neo4j database (e.g.: GraphRag).

Implementation

Add an additional route POST /neo4j which expects the request bodies of the following form:

{
  "query": "MATCH (n) WHERE n.foo = $foo RETURN n",
  "params": {
    "foo": "bar"
  }
}

where "query" is the cypher query to execute and "params" are optional query parameters.

The response body would contain the data returned by Neo4j serialized to JSON without any transformations.

Alternatives

An alternative would be to add this "passthrough" route to the GraphQL API, however it's unclear what the return type would be (i.e.: how the Neo4j data could be converted to GraphQL entities)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant