Open dOrgJelli opened 5 years ago
sound like a good direction. can we use the "gateway" / Apollo Federation without support/update of the graph-node ? any experience using the "gateway" ?
i agree that we need to split up of the subgraph in "modules" along the lines of what you propose.
My worries are about the federation/gateway solution.
According to the Graph team, it is not yet possible to integrate with Apollo Federation. I'm not sure what's the Gateway
This is a possible approach but I have another viewpoint I think might be good. So currently, the subgraph is basically an "Alchemy subgraph", it is very suited to the needs of Alchemy, but maybe not as much for other dapps. I think we should plan it as a Graph Node per dapp. What I mean by that is that we will have a basic subgraph which serves more like a library to be used by other subgraph implementations. So, for example, we will have an "Alchemy Subgraph" which uses a "DAOstack Subgraph" as a library and inherit from it. We will run this Alchemy subgraph on a graph node and manage it as needed. Other teams with different dapps will do basically the same. I think the benefit of this is that it's more secure and consistent to have a graph per UI, and let the UI operator manage it.
Goals
Required Reading
Apollo Federations
Gateways
Proposed Plan
a. base-subgraph stores all entities that are universal to all DAOs. These would all have to come from predefined addresses (universal contracts).
b. dao-subgraph stores all entities that are DAO specific. This project would take the form of a subgraph template, where the deployer would need to provide contract addresses for the contracts that should be watched (Avatar, Reputation, DAOToken, Controller, etc).
c. Ideally base-subgraph & dao-subgraph have no overlapping contract addresses they're watching. Doing this would help satisfy Goal # 4. This will require refactoring the schema to further decouple things.
a. use https://github.com/nautilus/gateway ?
b. 3rd parties could ask to be added to DAOstack's gateway, or they could create their own.