watcher-ts/packages/address-watcher/src/schema.ts
Ashwin Phatak a7ec3d8da8
Add APGL license and copyright notices (#212)
* Add license & copyright declarations for add-watcher.

* Add copyright declarations for cache.

* Add copyright declarations for erc20-watcher.

* Add copyright declarations for ipld-eth-client.

* Add copyright declarations for tracing-client.

* Add copyright declarations for uni-watcher.

* Add copyright declarations for solidity-mapper.

* Add copyright declarations for uni-info-watcher.

* Add copyright declarations for util.

* Add copyright declarations for lighthouse-watcher.

* Change license identifier in .sol files.

Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2021-08-12 15:28:13 +05:30

80 lines
1.1 KiB
TypeScript

//
// Copyright 2021 Vulcanize, Inc.
//
import { gql } from '@apollo/client/core';
export default gql`
# Types
type TxTrace {
txHash: String!
blockNumber: Int!
blockHash: String!
trace: String!
}
# Watched address event, include additional context over and above the event data.
type WatchedAddressEvent {
address: String!
txTrace: TxTrace!
}
type BlockProgressEvent {
blockNumber: Int!
blockHash: String!
numTx: Int!
numTracedTx: Int!
isComplete: Boolean!
}
#
# Queries
#
type Query {
#
# Developer API methods
#
appearances(
address: String!
fromBlockNumber: Int!
toBlockNumber: Int!
): [TxTrace!]
#
# Low level utility methods
#
traceTx(
txHash: String!
): TxTrace
}
#
# Subscriptions
#
type Subscription {
# Watch for address events (at head of chain).
onAddressEvent(address: String!): WatchedAddressEvent!
# Watch for block progress events from filler process.
onBlockProgressEvent: BlockProgressEvent!
}
#
# Mutations
#
type Mutation {
# Actively watch and index data for the address.
watchAddress(
address: String!
startingBlock: Int
): Boolean!
}
`;