Introducing HoloPort UI

Holochain Dev Pulse 46

Summary

We’re proud to share the progress we’ve made with the first version of the HoloPort UI prototype for internal testing, which will be the first experience for a user after they have connected to their HoloPort. First and foremost, it will give you, the HoloPort owner, everything needed to successfully and easily set up, configure and maintain your HoloPort.

HoloPort

The hAppy team is pleased to share an update about HoloPort UI v0.1!

There are several services within the Holo and Holochain ecosystem that this front-end product pulls together. While most of these services are distributed and running on Holochain, we need a way to talk to them all in unison and to present a single data interface for our UI components (React). We’ve adapted and evolved a GraphQL client-side resolver pattern for this.

The value of GraphQL

GraphQL is a web-based query language for efficiently retrieving only the data that you want from a data set. It works particularly well with graph-based data models like the ones found in Holochain DHTs. It lets you define the types of data and their shapes (their “schema”), the ways clients can ask for data (“queries”), and things they can do to the data (“mutations”). This creates a common language for accessing your data while letting clients make their own decisions about the data they want.

Graph QL

In order to connect a GraphQL endpoint to a data set, you need to define how the underlying data store maps to the GraphQL schema. A resolver is a function that connects all the types and fields in a schema to the data store. This has worked quite well, and we’re now able to present our components with a sensible and unified API instead of multiple APIs broken up over many DNA. The result is a diverse set of distributed data sources, accessed through a single endpoint.