Zenode
In order to run this you first need to install aquadoggo
RUST_LOG=aquadoggo=info
Proof of concept
Inside main.rs
The Operator struct is the main wrapper around the p2panda library and the graphql layer.
To create a new Operator use Operator::default() or Operator::new().
Operator::default() reads the ENDPOINT env variable, if unset it uses http://localhost:2020/graphql as default endpoint
Once aquadoggo is running. Run the following to test Zenode:
- Create schemas
- Crate fields
- Crate instance
- Update instance
- Delete instance
- Read endpoint from env
- Better field to json
- Save schema_id
- Link schema name with schema_id
- Serializable query string
Quick start
// create an Operator
let op = default;
let mut fields = vec!;
let id = op.create_schema.await?;
// generate schema_id
let schema_id = format!;
// create an instance
let mut fields = vec!;
let instance_id = op.create_instance.await?;
// update instance
let mut fields = vec!;
let update_id = op.update_instanceawait?;
// finally delete instance
let _delete_id = op.delete_instance.await?;