Comments (2)
MATCH (d:Entity {name:$name})
OPTIONAL MATCH (d)-[:HAS_PROPOSAL]->(:Proposal)<-[:VOTED]-(sm:Wallet)
WITH d, COUNT(DISTINCT sm) as snapshot_members
OPTIONAL MATCH (d)<-[:IS_MEMBER]-(dm:Member)
WITH d, snapshot_members, COUNT(DISTINCT dm) as DAOHaus_members
RETURN snapshot_members, DAOHaus_members, d.forum as forum, d.discord as discord, d.documentation as documentation, d.twitter as twitter, d.opensea as OpenSea, d.blog as blog
This query assumes some properties that are not currently present in the type definitions for Entities. Here's the properties of Entity
(as is currently in develop
)
chainverse-frontend/src/services/Apollo/typedefs.ts
Lines 12 to 27 in cf064b8
I know @musubipapi is expanding these by creating unions of different Entity
types (is there a Pull Request open for this change?); for example, Entity:Snapshot
properties will be different than Entity:DAOhaus
properties.
@Azharo For the properties you list here above: opensea
, documentation
, etc - how do you envision these aligning to specific Entity
types as laid out in the GraphQL API type definitions?
from chainverse-frontend.
These properties will eventually just get taken out as separate nodes attached to each :Entity which hasn't been done yet. That'll remove any problems with the union since right now the Union is only really going to have name property.
This way we can connect different Entities as the same entity if they reference the same descriptor such as they have the same twitter handle or medium.
I'll add to issue that we need to expand these out as nodes and not keep as properties
Change current code snippet above to the following so it works even with our GraphQL types so at least we have it working in the UX while we make the right changes on the backend:
MATCH (d:Entity {name:$name})
OPTIONAL MATCH (d)-[:HAS_PROPOSAL]->(:Proposal)<-[:VOTED]-(sm:Wallet)
WITH d, COUNT(DISTINCT sm) as snapshot_members
OPTIONAL MATCH (d)<-[:IS_MEMBER]-(dm:Member)
WITH d, snapshot_members, COUNT(DISTINCT dm) as DAOHaus_members
OPTIONAL MATCH (dao:DaoHaus:Dao {name:$name})
RETURN snapshot_members, DAOHaus_members, dao.forum as forum, dao.discord as discord, dao.documentation as documentation, dao.twitter as twitter, dao.opensea as OpenSea, dao.blog as blog
from chainverse-frontend.
Related Issues (20)
- [Enhancement] - autocomplete when user is trying to create a new entity with an `Entity` block
- Users having issues editing blocks HOT 2
- Workspaces are not loading
- Use brackets to define new entity in `Note` and `Partnership` blocks instead of `@` HOT 3
- `Entity` nodes being created / referenced by different `Block` inputs should merge nodes instead of create duplicates
- Create trust edges
- User can create a Canvas
- User can view their previously created canvasses
- Add metadata to canvas
- Write markdown in canvas
- Create a new note block inside of their Canvas
- User can link Chainverse Entities HOT 1
- User can save their canvas
- User can choose to publish their Canvas to a Neo4J instance
- User can choose to publish their Canvas to IPFS
- Citations added by users are stored on Arweave
- User auths into Canvas with their wallet
- User can edit their canvas and its constituent blocks
- User can link tags to Canvas.
- Entity create flow
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chainverse-frontend.