Skip to content

alt text

CGraph - Corda & The Graph

CGraph is a simple connector library that allows you to pipe verified data from Corda into a GraphQL server and database, over HTTP.

This means you can transact across trust boundaries, with Corda for safe, secure and provable data but also, read via GraphQL for federation, flexibility, and more.

Do I need this?

  • Does your data model exhibit high levels of connectedness?
  • Do you seek a unified, flexible API for both reading and writing on and off-ledger data?
  • Do you wish to work with the latest graph tooling and methodologies? e.g GraphQL, GraphDBs.

Quick start

Include the cgraph-core module as a dependency inside your build.gradle. Create a GitHub personal access token with read repo access and put it in your gradle.properties file Add this to your Cordapp’s Gradle dependencies:

subprojects {
    repositories {
        ...
        maven {
            name = "GitHubPackages"
            url = uri("https://maven.pkg.github.com/mcevoyinit/cgraph")
            credentials {
                username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
                password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
            }
        }
    }
}
...
dependencies{
    // CorDapp dependencies
    cordapp "io.cgraph:cgraph-contracts:1.0.0"
    cordapp "io.cgraph:cgraph-core:1.0.0"
} 

See the Installation section for more details on setting up your graph and configuring the CGraph CorDapp.