SnowconeDAO
ResourcesMediaDocs
  • Introduction
  • Create
    • Make Your Snowcone Project
      • Project Details
      • Funding
      • Token
      • Rules
    • Governance Resources
      • Snapshot
      • Gnosis Safe
    • Community Resources
      • Make a Discord Server
  • Learn
    • Overview
    • Architecture
    • Administration
    • Risk
    • Glossary
      • Ballot
      • Data Source
      • Delegate
      • Discount Rate
      • Funding cycle
      • NFT rewards
      • Operator
      • Overflow
      • Payment terminal
      • Project
      • Redemption rate
      • Reserved tokens
      • Split allocator
      • Splits
      • Tokens
    • Tokenomics
  • Build
    • Getting Started
    • Basics
    • Project NFT
    • Programmable treasury
    • Treasury extensions
      • Ballot
      • Data Source
      • Pay delegate
      • Redemption Delegate
      • Split Allocator
    • Utilities
      • Project payer
      • Splits Payer
  • API
    • Data Structures
      • SNOW721PricingParams
      • SNOW721Tier
      • SNOW721TierParams
      • SNOWBitmapWord
      • SNOWDeployTiered721DelegateData
      • SNOWDidPayData
    • Contracts
      • SNWProjects
        • Event
          • Create
          • SetMetadata
          • SetTokenUriResolver
        • Properties
          • Count
          • metadataContentOf
          • tokenUriResolver
        • Read
          • supportsInterface
          • tokenURI
        • Write
          • createFor
          • setMetadataOf
          • setTokenUriResolver
  • Subgraph
    • Subgraph Entities
    • Sample Queries
Powered by GitBook

SnowconeDAO

On this page

Was this helpful?

Export as PDF
  1. Subgraph

Sample Queries

Last updated 2 years ago

Was this helpful?

Below are some sample queries you can use to gather information from the Snowcone contracts.

You can build your own queries using a —enter your endpoint to limit your queries to the exact data desired.

Get Project Metrics By Owner

Get Project ID.

query ProjectByOwner(
  $Owner: String! = "0xaf28bcb48c40dbc86f52d459a6562f658fc94b1e"
) {
  projects(where: { owner: $Owner }, first: 10) {
    createdAt
    id
    owner
    projectId
    totalPaid
    totalRedeemed
    metadataUri
    handle
    terminal
    currentBalance
    cv
  }
}

Project Metrics

Get the latest metrics for your project.

query ProjectMetrics($Project: String! = "1-1") {
  projects(where: { id: $Project }) {
    createdAt
    id
    owner
    projectId
    totalPaid
    totalRedeemed
    metadataUri
    handle
    terminal
    currentBalance
    cv
  }
}

Project Payments

Get the 20 latest payments into your project.

query ProjectPayments($ProjectId: String! = "2-1") {
  projects(where: { id: $ProjectId }, first: 10) {
    handle
    payEvents(first: 20, orderBy: timestamp, orderDirection: desc) {
      amount
      caller
      note
      timestamp
      txHash
    }
  }
}
GraphQL Explorer