Content Subgraph

The Content Subgraph contains indexed information about content contracts, the assets, and users.

Contents Optimistic Kovan GraphiQL

Schemas

Entities

Content Contract
type Content @entity {
  id: ID!
  factory: ContentFactory!
  manager: ContentManager!
  contractAddress: Bytes!
  contractUri: String!
  assets: [Asset!]!
  assetsCount: BigInt!
  royaltyReceiver: Account!
  royaltyRate: Int!
  minters: [Minter!]
  mintersCount: Int!
  name: String
  game: String
  creator: String
  creatorAddress: String
  owner: Account!
  tags: [Tag!]!
  tagsCount: Int!
}
Asset
type Asset @entity{
  id: ID!
  tokenId: BigInt!
  parentContract: Content!
  currentSupply: BigInt!
  maxSupply: BigInt!
  balances: [AssetBalance!]
  ownersCount: BigInt!
  royaltyReceiver: Account
  royaltyRate: Int!
  latestHiddenUriVersion: BigInt!
  latestPublicUriVersion: BigInt!
  latestPublicUri: String
  transactions: [Transaction!]!
  transactionsCount: BigInt!
  mintCount: BigInt!
  burnCount: BigInt!
  name: String
  type: String
  subtype: String
  tags: [Tag!]!
  tagsCount: Int!
  imageUri: String
}
Asset Balance
type AssetBalance @entity {
  id: ID!
  asset: Asset!
  owner: Account!
  amount: BigInt!
  parentContract: Content!
  type: String
  subtype: String
}
Tag
type Tag @entity {
  id: ID!
  contents: [Content!]
  assets: [Asset!]
}
Account
type Account @entity {
  id: ID!
  address: Bytes!
  assetBalances: [AssetBalance!]!
  transactions: [Transaction!]!
  transactionsCount: BigInt!
  transactionsAsOperator: [Transaction!]!
  transactionsAsOperatorCount: BigInt!
  mintCount: BigInt!
  burnCount: BigInt!
  uniqueAssetCount: BigInt!
  approvals: [Approval!]
  minters: [Minter!] 
  contentManagers: [ContentManager!]
  contents: [Content!]
}
Transaction
type Transaction @entity {
  id: ID!
  operator: Account!
  user: Account!
  transactionType: TransactionType!
  assets: [Asset!]! 
  assetAmounts: [TransactionAssetAmount!]!
  blockNumber: BigInt!
  timestamp: BigInt!
  gasUsed: BigInt!
  gasPrice: BigInt!
}
Transaction Asset Amount
type TransactionAssetAmount @entity {
  id: ID!
  asset: Asset!
  amount: BigInt!
}
Approval
type Approval @entity {
  id: ID!
  content: Content!
  operator: Account!
  user: Account!
}
Minter
type Minter @entity {
  id: ID!
  content: Content!
  operator: Account!
}

Enums

Transaction Type
enum TransactionType {
  Mint
  Burn
}

Last updated