Cayley does not enforce schema currently. We assume that client's code will enforce it on validation. But we have a full support for typed values and fields. Depending on your use case, you can either write data using some data format or use our Go ORM lib to write entire data structures to graph. For data format I would recommend JSON-LD, since it follows tree-like structure and looks like ordinary JSON object with some type annotations.

Excellent. I care more about declaring types to ensure efficient storage ( i.e., ints stored as ints and not strings) and less so about validation, at the moment.

Right now my benchmarks show that Cayley is 8-10x bigger on-disk that Dgraph for the same graph data. I presume it's mostly because I can tell Dgraph the types of data (many fields are ints)...and I presume Cayley has stored everything as strings ( I used the NQUAD format).

Can you point me to the right place to get started for writing GO queries against Cayley ? I'll rerun my benchmarks and post the results here.

Regarding loading, the package you need is called schema, and the function for loading objects recursively is called schema.LoadTo. There are few examples in tests and an example of a full program. So it should be pretty straightforward to modify example app and replace type definition with any tree-like structure to get fist results. Please keep in mind that it does not support loops in graph. Regarding nodes comparison, you can use a low-level function called QuadIterator which is avail…

Also, try using bolt2 backed if you currently using bolt. It's more storage-efficient and much faster.