Skip to content
Snippets Groups Projects

Elois/gva sort

Merged Éloïs requested to merge elois/gva-sort into dev
15 files
+ 552
182
Compare changes
  • Side-by-side
  • Inline

Files

@@ -9,7 +9,12 @@ type Query {
node: Node! @juniper(ownership: "owned")
current: Block @juniper(ownership: "owned")
block(number: Int!): Block @juniper(ownership: "owned")
blocks(interval: BlockInterval, paging: Paging, step: Int = 1): [Block!]! @juniper(ownership: "owned")
blocks(
interval: BlockInterval,
paging: Paging,
step: Int = 1,
sortOrder: SortOrder = ASC
): BlocksPage! @juniper(ownership: "owned")
}
type Mutation {
@@ -17,7 +22,7 @@ type Mutation {
}
#################################
# Inputs
# Interval inputs
#################################
input BlockInterval {
@@ -26,11 +31,24 @@ input BlockInterval {
to: Int
}
#################################
# Pagination inputs
#################################
input Paging {
pageNumber: Int # default value: 0
pageSize: Int # default value: 50
}
#################################
# Sort inputs
#################################
enum SortOrder {
ASC
DESC
}
#################################
# NODE types
#################################
@@ -46,17 +64,31 @@ type Node {
}
#################################
# Block type
# Blocks types
#################################
scalar DateTimeUtc @juniper(with_time_zone: false)
type BlocksPage {
blocks: [Block!]!
currentPageNumber: Int!
intervalFrom: Int!,
intervalTo: Int!,
lastPageNumber: Int!,
totalBlocksCount: Int!,
}
type Block {
version: Int!
currency: String!
issuer: String!
issuerName: String,
number: Int!
hash: String!,
commonTime: DateTimeUtc!
powMin: Int!
}
#################################
# Custom scalars
#################################
scalar DateTimeUtc @juniper(with_time_zone: false)
Loading