Developer Hub
Relation ProtocolRelation ONE APIRelation Graph API
English
English
  • Overview
  • QUICK START
    • Deploy a Semantic SBT contract leveraging Relation Protocol
    • Deploying query services using Graph Indexer
  • KEY CONCEPTS
    • RDF
    • Semantic SBTs
    • Social Graph
  • Architecture
  • Schema Standard
    • Overview
    • How schemas limit smart contracts
    • Store schema
    • List of schemas
  • Contract Open Standard
    • Overview
    • Identity
      • Name Service
    • Relationship
      • Follow
      • Dao
    • Publication
      • Content
      • Privacy Content
  • Open Standard API
    • Introduction
    • EIP-6239
    • Business Interface
      • Identity
      • Relationship
      • Publication
  • Graph Indexer
    • Definition and usage
    • Listen to events
    • To parse RDF data
    • To build a social graph
  • Integrations
    • Quick start
    • Construct a social graph with Relation Protocol
    • List of resources
    • NameService contract guide
    • Follow contract guide
    • Dao contract guide
    • Content contract guide
    • PrivacyContent contract guide
  • Relation Name Service
    • Name Service Api
  • Use Case
  • APPENDIX
    • Deploy a contract using Hardhat
    • SemanticSBT Deployment tool
Powered by GitBook
On this page
  1. Graph Indexer

Definition and usage

Last updated 1 year ago

As a part of the Relation Protocol, the main function of the Graph Indexer is to construct a social graph:

are the atomic units in the Relation social graph. The general technical of the Relation Protocol defines three events:

  • CreateRDF: Triggered when a SBT containing RDF semantics is created.

  • UpdateRDF: Triggered when a SBT containing RDF semantics is updated.

  • RemoveRDF: Triggered when a SBT containing RDF semantics is removed.

The Graph Indexer parses these three events by listening to transactions on the blockchain. Users' social interactions are then stored in a graph database, thus constructing a social graph(see Figure: 7-1). This helps individual developers and companies to build a more meaningful user relationship in Dapps and other decentralized projects. It can foster a more user-friendly social network experience.

This chapter will show you how to construct a Graph Indexer:

: Listens to all events conforming to the specification on the blockchain.

: Parse the RDF from the event conforming to the and construct it into data structure in a graph.

: Store the data into the graph database.

Listen to events on the blockchain.
EIP6239
Parse RDF data
Schema specification
Build the social graph
Events
specification
Figure 7-1