Query data
Inside Desmos it is possible to query data in 4 different ways:
- With the
CLI
directly from terminal. - With the
REST
endpoint directly from a full node. - With the
gRPC
endpoint directly from a full node. - With
GraphQL
.
CLI
To query data using CLI
, you can check the following commands of each module:
- Profiles CLI commands;
- Relationships CLI commands;
- Subspaces CLI commands;
- Posts CLI commands;
- Reports CLI commands;
- Reactions CLI commands;
- Supply CLI commands;
- Fees CLI commands.
To be able to perform the above queries, you need to have the desmos daemon installed. Check the full node setup section to know how.
gRPC
To query data using the gRPC
endpoint, you can use the following endpoints:
The above endpoints can be combined with the following endpoints to get the desired data:
- Profiles gRPC endpoints;
- Relationships gRPC endpoints;
- Subspaces gRPC endpoints;
- Posts gRPC endpoints;
- Reports gRPC endpoints;
- Reactions gRPC endpoints;
- Supply gRPC endpoints;
- Fees gRPC endpoints.
REST
TO query data using the REST
endpoint, you can use the following endpoints:
The above endpoints can be used with the following endpoints to get the desired data:
- Profiles REST endpoints;
- Relationships REST endpoints;
- Subspaces REST endpoints;
- Posts REST endpoints;
- Reports REST endpoints;
- Reactions REST endpoints;
- Supply REST endpoints;
- Fees REST endpoints.
GQL
Another way to query the Desmos data is GQL. GQL is different from the above methods because it offers high possibilities of customisation for developers based on their needs. It is possible to interact with GQL endpoints in the client you are building by using one of the many libraries available for this kind of interaction. You can check what suites your needs here: GraphQL resources.
The GQL endpoints for Desmos chains are the following: