modelsfolder: objects compatible with the
@aragon/connectAPI. This is what the consumers of your app connector are going to interact with.
thegraphfolder: a connector implementation for The Graph which uses
@aragon/connect-thegraphto perform GraphQL queries, parse them and present the result in the form of models objects. This part is only used internally, and
connector.tscontains the methods responsible to fetch the app data from The Graph.
index.tsto pick which models and objects are exposed to other packages.
thegraph/connector.ts(assuming your connector is using The Graph), add functions that the models of your connector will use. For example, the
@aragon/connect-votingwill call its
castsForVote(...): Promise<Cast>function. These functions all follow the same structure of (1) performing a query, (2) parsing the results of a query, and (3) wrapping and returning the results in the appropriate model.
subgraphfolder, you’ll find a separate project which defines the Subgraph which the connector implementation uses as its data source.
createAppConnector(), which takes care of doing some necessary checks as well as passing contextual information to the callback.
connectVotinggot returned by
createAppConnector(), called by app authors. It takes these parameters: