This app was built to test integrating Holochain with the Juniper GraphQL server library for Rust. Conclusion: It works great! No obvious performance loss or excessive memory consumption, even though that would have to be investigated more in detail. Juniper adds only ca 150 K to the final size of compiled DNA. Client development becomes really straightforward when Holochain can be acessed as a GraphQL endpoint.
The DNA accepts queries on a single endpoint: graphql
. See file schema.graphql for available queries/mutations.
The client is built on React / Material UI and uses Apollo Client / Holochain Conductor API to communicate with Holochain.
- Having run through holochain RSM installation.
- Run all the steps described in this README.md inside the
nix-shell
of theholochain
core repository. - Have
holochain-run-dna
installed globally, and thelair-keystore
described in its README as well.
To generate the Zome API docs:
cd dna
cargo doc --open
cd dna
sh build.sh
After having built the DNA:
cd dna/tests
npm install
npm test
After having built the DNA:
cd dna
sh run.sh
Now holochain
will be listening at port 8888
;
Restart the command if it fails (flaky holochain start).
cd client
yarn
yarn start
Yes, please! Raise an issue or post a pull request.
MIT