triangle-exclamation
Under Construction This DApp is in development

Subgraph and Data Indexing

OmniSocial uses The Graph to index and query on-chain data in real time.

This allows the frontend and external tools to retrieve rich, filterable data such as wallet personas, proposals, tips, and DAO governance activity.

🧱 Core Entities

The subgraph defines the following key entities:

Entity
Description

Wallet

A user’s smart wallet with fields like address, .omni alias, and personas

Persona

Represents a user's persona NFT, including metadata and reputation values

DAO

A decentralized community created via the DAOFactory

Proposal

A governance proposal with state (active, passed, executed), metadata

Vote

A vote cast by a persona with support (yes/no/abstain) and reputation used

Tip

A tipping event, including sender, receiver, amount, and optional content

🔍 Example GraphQL Queries

🔹 Fetch all proposals in a DAO

{
  proposals(where: { dao: "0xDAO_ADDRESS" }) {
    id
    title
    description
    state
    createdAt
  }
}

🔹 Get a wallet by .omni alias

🔹 Show all tips received by a user

🛠 Deploying the Subgraph

📍 Localhost (for dev)

From the subgraph/ folder:

  1. Start the local Graph node (Docker)

  1. Generate code

  1. Build the subgraph

  1. Create & deploy

✅ Local queries: http://localhost:8000/subgraphs/name/omnisocial

☁️ Hosted Service (The Graph Hosted or Subgraph Studio)

1. Set up Graph account and auth:

2. Deploy:

🌐 You can then query the hosted subgraph from your Graph Explorer dashboard.

🧩 Schema Overview (Partial)

🔁 Common Use Cases

Use Case
Query Example

Show all proposals in DAO

proposals(where: { dao })

Resolve .omni alias

wallets(where: { alias })

List tips a user has received

tips(where: { receiver })

Fetch votes on a proposal

votes(where: { proposal })

List all DAOs a user interacts with

Cross-reference via votes or proposals

Last updated

Was this helpful?