non-fungible-apps/subgraph/schema.graphql

149 lines
3.2 KiB
GraphQL

type Approval @entity(immutable: true) {
id: Bytes!
owner: Bytes! # address
approved: Bytes! # address
tokenId: BigInt! # uint256
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}
type ApprovalForAll @entity(immutable: true) {
id: Bytes!
owner: Bytes! # address
operator: Bytes! # address
approved: Boolean! # bool
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}
type CollectionRoleGranted @entity(immutable: true) {
id: Bytes!
role: Int! # uint8
toAddress: Bytes! # address
byAddress: Bytes! # address
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}
type CollectionRoleRevoked @entity(immutable: true) {
id: Bytes!
role: Int! # uint8
toAddress: Bytes! # address
byAddress: Bytes! # address
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}
type NewMint @entity(immutable: true) {
id: Bytes!
tokenId: BigInt! # uint256
name: String!
description: String!
externalURL: String!
ENS: String!
commitHash: String! # string
gitRepository: String! # string
logo: String!
color: Int!
accessPointAutoApproval: Boolean!
triggeredBy: Bytes! # address
tokenOwner: Owner! # address
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}
type MetadataUpdate @entity(immutable: true) {
id: Bytes!
tokenId: BigInt!
key: String!
stringValue: String
uint24Value: Int
doubleStringValue: [String!]!
byAddress: Bytes!
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}
type TokenRoleGranted @entity(immutable: true) {
id: Bytes!
tokenId: BigInt! # uint256
role: Int! # uint8
toAddress: Bytes! # address
byAddress: Bytes! # address
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}
type TokenRoleRevoked @entity(immutable: true) {
id: Bytes!
tokenId: BigInt! # uint256
role: Int! # uint8
toAddress: Bytes! # address
byAddress: Bytes! # address
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}
type Transfer @entity(immutable: true) {
id: Bytes!
from: Bytes! # address
to: Bytes! # address
tokenId: BigInt! # uint256
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}
type Token @entity {
id: Bytes! # Token ID
mintTransaction: NewMint!
tokenId: BigInt! # uint256
name: String!
description: String!
externalURL: String!
ENS: String!
logo: String!
color: Int!
accessPointAutoApproval: Boolean!
owner: Owner!
mintedBy: Bytes!
controllers: [Controller!]
gitRepository: GitRepository!
commitHash: String!
}
type Owner @entity {
id: Bytes! # address
tokens: [Token!] @derivedFrom(field: "owner")
}
type Controller @entity {
id: Bytes! # address
tokens: [Token!] @derivedFrom(field: "controllers")
}
type Collection @entity {
id: Bytes! #address
deployer: Bytes! #address
transactionHash: Bytes! #transaction hash
owners: [CollectionOwner!]
}
type CollectionOwner @entity {
id: Bytes! # address
accessGrantedBy: Bytes! #address
transactionHash: Bytes!
}
type GitRepository @entity {
id: String! # transaction hash of the first transaction this repository appeared in
tokens: [Token!] @derivedFrom(field: "gitRepository")
}