@graphprotocol/graph-cli
Version:
CLI for building for and deploying to The Graph
123 lines (104 loc) • 2.03 kB
Plain Text
# Each referenced type's in any of the types below must be listed
# here either as `scalar` or `type` for the validation code to work
# properly.
#
# That's why `String` is listed as a scalar even though it's built-in
# GraphQL basic types.
scalar String
scalar File
scalar BigInt
scalar Boolean
scalar JSON
union StringOrBigInt = String | BigInt
type SubgraphManifest {
specVersion: String!
features: [String!]
schema: Schema!
description: String
repository: String
graft: Graft
dataSources: [DataSource!]!
templates: [DataSourceTemplate!]
indexerHints: IndexerHints
}
type Schema {
file: File!
}
type IndexerHints {
prune: StringOrBigInt
}
type DataSource {
kind: String!
name: String!
network: String
context: JSON
source: ContractSource!
mapping: ContractMapping!
}
type ContractSource {
address: String
abi: String!
startBlock: BigInt
endBlock: BigInt
}
type ContractMapping {
kind: String
apiVersion: String!
language: String!
file: File!
entities: [String!]!
abis: [ContractAbi!]!
blockHandlers: [BlockHandler!]
callHandlers: [CallHandler!]
eventHandlers: [ContractEventHandler!]
}
type ContractAbi {
name: String!
file: File!
}
enum BlockFilterKind {
polling
once
call
}
type BlockFilter {
kind: BlockFilterKind!
}
type PollingBlockFilter {
kind: BlockFilterKind!
every: BigInt!
}
union BlockFilterType = BlockFilter | PollingBlockFilter
type BlockHandler {
handler: String!
filter: BlockFilterType
}
type CallHandler {
function: String!
handler: String!
}
type ContractEventHandler {
event: String!
topic0: String
topic1: [String]
topic2: [String]
topic3: [String]
handler: String!
receipt: Boolean
# This should really be just a Map<String, String>
calls: JSON
}
type Graft {
base: String!
block: BigInt!
}
type DataSourceTemplate {
kind: String!
name: String!
network: String
source: ContractSourceTemplate!
mapping: ContractMapping!
}
type ContractSourceTemplate {
abi: String!
}