So far we've seen how to use the Linera client treating it as a binary in your terminal. However, the client also acts as a node which:
- Executes blocks
- Exposes an GraphQL API and IDE for dynamically interacting with applications and the system
- Listens for notifications from validators and automatically updates local chains.
To interact with the node service, run
This will run the node service on port 8080 by default (this can be overridden
Linera uses GraphQL as the query language for interfacing with different parts of the system. GraphQL enables clients to craft queries such that they receive exactly what they want and nothing more.
GraphQL is used extensively during application development, especially to query the state of an application from a front-end for example.
To learn more about GraphQL check out the official docs.
Conveniently, the node service exposes a GraphQL IDE called GraphiQL. To use
GraphiQL start the node service and navigate to
Using the schema explorer on the left of the GraphiQL IDE you can dynamically explore the state of the system and your applications.
The node service also exposes a GraphQL API which corresponds to the set of
system operations. You can explore the full set of operations by clicking on
To interact with an application, we run the Linera client in service mode. It
exposes a GraphQL API for every application running on any owned chain at
Navigating there with your browser will open a GraphiQL interface which enables you to graphically explore the state of your application.