Skip to content
Snippets Groups Projects

[feat] gva: blocks: add inputs interval and step & add negative paging

Merged Éloïs requested to merge elois/gva into dev
10 files
+ 651
59
Compare changes
  • Side-by-side
  • Inline

Files

@@ -8,7 +8,7 @@ type Query {
@@ -8,7 +8,7 @@ type Query {
node: Node! @juniper(ownership: "owned")
node: Node! @juniper(ownership: "owned")
current: Block @juniper(ownership: "owned")
current: Block @juniper(ownership: "owned")
block(number: Int!): Block @juniper(ownership: "owned")
block(number: Int!): Block @juniper(ownership: "owned")
blocks(paging: Paging): [Block!]! @juniper(ownership: "owned")
blocks(interval: BlockInterval, paging: Paging, step: Int = 1): [Block!]! @juniper(ownership: "owned")
}
}
type Mutation {
type Mutation {
@@ -19,12 +19,15 @@ type Mutation {
@@ -19,12 +19,15 @@ type Mutation {
# Inputs
# Inputs
#################################
#################################
 
input BlockInterval {
 
from: Int # default value: 0
 
# If toBlock is null, current block number is used
 
to: Int
 
}
 
input Paging {
input Paging {
pageNumber: Int # default value: 0
pageNumber: Int # default value: 0
pageSize: Int # default value: 50
pageSize: Int # default value: 50
fromBlock: Int # default value: 0
# If toBlock is null, current block number is used
toBlock: Int
}
}
#################################
#################################
Loading