Organizations
This is the main connector of the Aragon Connect library. It is responsible for parsing the organization’s data.
Currently, a single flavor of this connector is available and comes built into the core library, connecting to a Subgraph (The Graph) data source. It might be expended to other flavors, like an Ethereum connector that reduces the state directly from an Ethereum node’s JSON-RPC API, or a SQL connector that fetches data from a database, etc.
Connector Interface
An organization connector must implement the IOrganizationConnector interface to be compatible with Aragon Connect.
The Graph Connector
This connector was built using The Graph and uses GraphQL as a query language for fetching data.
GraphQLWrapper
The Graph connector exports the GraphQLWrapper
object. The wrapper is useful when you want to create low-level requests and talk to the Subgraph directly.
To create a wrapper instance you need to provide the Subgraph URL endpoint:
Once you have a wrapper instance you can use the following API to create custom queries.
API
GraphQLWrapper#performQuery(query, args)
Perform a GraphQL query.
GraphQLWrapper#performQueryWithParser(query, args, parser)
Perform a GraphQL query and parse the result.
GraphQLWrapper#subscribeToQuery(query, args, callback)
Create a GraphQL subscription.
GraphQLWrapper#subscribeToQueryWithParser(query, args, callback, parser)
Create a GraphQL subscription and parse the emitted results.
Subgraph Schema
The Subgraph schema defines all of the available entities and attributes. It may be useful to gain a fuller, clearer picture of the information you can request.
Last updated