Holo-REA GraphQL schema binding
Work in progress!
Binds Holochain DNA resolvers for Holo-REA to the ValueFlows protocol spec, thus creating a pluggable VF implementation on Holochain.
This module provides a raw GraphQL schema object and can be used in a variety of ways. However, it is expected that you will most often use it module in a React / Apollo application. In this case, your app initialisation logic will probably include something like this:
const client =link: schemacache:
There are other use-cases and examples provided in the
example folder at the root of this repository.
types.tscontains implementations for the GraphQL scalar types defined in the VF spec. Any system connecting to a VF-compatible schema requires these handlers to be present.
connection.tsis the Holochain conductor websocket connection handling logic.
Other files implement the query bindings between the linked Holo-REA app DNAs and GraphQL entity relationships:
queries/*.tsimplement the root-level queries exposed by the API.
mutations/*.tsimplement write operations for interacting with the app DNAs.
resolvers/*.tscontains the logic for resolving links between different records.
Publishing to NPM
- You will need to be given access to the VF NPM org in order to update the module on the registry. You can request access in https://gitter.im/valueflows/welcome
- Bump the version in
package.json& commit to the repository
npm run buildfrom this directory or
npm run build:graphql-adapterfrom the root of the Holo-REA repository
- Change to
./buildunder this directory, where the new generated files are
npm publish --access publicfrom the
- Tag the current release in git and push the tag to