Skip to main content
Version: V2

Subgraph

The Graph is a protocol for indexing networks like Ethereum and IPFS. Site owners publish subgraphs that expose site data for anyone to query. Semaphore's subgraph allows you to retrieve data from the Semaphore.sol smart contract.

tip

The Graph protocol uses the GraphQL query lanaguage. If you don't know GraphQL, you can query Semaphore with the Graph Explorer Playground. For examples, see the GraphQL API documentation.

Endpoints

Kovan

Goerli

Schema

Group

  • id: unique identifier among all group entities,
  • depth: Merkle tree depth,
  • zeroValue: Merkle tree zero value,
  • root: Merkle tree root,
  • size: number of active members (or non-zero tree leaves),
  • numberOfLeaves: total number of tree leaves,
  • admin: admin of the group,
  • members: list of group members.

Member

  • id: unique identifier among all member entities,
  • identityCommitment: Semaphore identity commitment,
  • index: index of the tree leaf,
  • group: link to the Group entity.