non-fungible-apps/subgraph/schema.graphql

110 lines
2.5 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 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
owner: 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!]!
booleanValue: Boolean
byAddress: Bytes!
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!
accessPoints: [AccessPoint!] @derivedFrom(field: "token")
}
# Owner entity for collection, access points, and tokens
type Owner @entity {
id: Bytes! # address
tokens: [Token!] @derivedFrom(field: "owner")
accessPoints: [AccessPoint!] @derivedFrom(field: "owner")
collection: Boolean!
}
# Controller entity for tokens
type Controller @entity {
id: Bytes! # address
tokens: [Token!] @derivedFrom(field: "controllers")
}
type GitRepository @entity {
id: String! # transaction hash of the first transaction this repository appeared in
tokens: [Token!] @derivedFrom(field: "gitRepository")
}
type AccessPoint @entity {
id: String! # AP Name
token: Token!
score: BigInt!
contentVerified: Boolean!
nameVerified: Boolean!
owner: Owner!
creationStatus: String!
}