mirror of
https://github.com/cerc-io/watcher-ts
synced 2025-01-10 13:28:06 +00:00
nikugogoi
238ad21189
* Handle subgraph schema field with derivedFrom directive * Handle derivedFrom directive in eden-watcher * Fix 1 to N relation error by removing limit from query * Order by id for derivedFrom relations to match graph-node * Refactor example subgraph schema entities * Fix watcher queries to return correct relation field values * Fix hierarchical query for getting two entities at same block
30 lines
439 B
GraphQL
30 lines
439 B
GraphQL
enum BlogKind {
|
|
short
|
|
long
|
|
}
|
|
|
|
type Blog @entity {
|
|
id: ID!
|
|
kind: BlogKind!
|
|
isActive: Boolean!
|
|
reviews: [BigInt!]!
|
|
author: Author!
|
|
categories: [Category!]!
|
|
}
|
|
|
|
type Author @entity {
|
|
id: ID!
|
|
blogCount: BigInt!
|
|
name: String! # string
|
|
rating: BigDecimal!
|
|
paramInt: Int! # uint8
|
|
paramBytes: Bytes!
|
|
blogs: [Blog!]! @derivedFrom(field: "author")
|
|
}
|
|
|
|
type Category @entity {
|
|
id: ID!
|
|
name: String!
|
|
count: BigInt!
|
|
}
|