Skip to content

Commit

Permalink
feat: Add ordering on new filtered methods. (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnavarro authored Nov 28, 2024
1 parent aceadf4 commit dbea8f5
Show file tree
Hide file tree
Showing 11 changed files with 468 additions and 56 deletions.
13 changes: 13 additions & 0 deletions internal/mock/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,19 @@ func (m *Storage) TxIterator(
panic("not implemented") // TODO: Implement
}

func (m *Storage) BlockReverseIterator(_, _ uint64) (storage.Iterator[*types.Block], error) {
panic("not implemented") // TODO: Implement
}

func (m *Storage) TxReverseIterator(
_,
_ uint64,
_,
_ uint32,
) (storage.Iterator[*types.TxResult], error) {
panic("not implemented") // TODO: Implement
}

// WriteBatch provides a batch intended to do a write action that
// can be cancelled or committed all at the same time
func (m *Storage) WriteBatch() storage.Batch {
Expand Down
60 changes: 44 additions & 16 deletions serve/graph/all.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions serve/graph/gen/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ type Query {
Incomplete results due to errors return both the partial Blocks and
the associated errors.
"""
getBlocks(where: FilterBlock!): [Block!]
getBlocks(where: FilterBlock!, order: BlockOrder): [Block!]
"""
EXPERIMENTAL: Retrieves a list of Transactions that match the given
where criteria. If the result is incomplete due to errors, both partial
results and errors are returned.
"""
getTransactions(where: FilterTransaction!): [Transaction!]
getTransactions(where: FilterTransaction!, order: TransactionOrder): [Transaction!]
}
type Subscription {
Expand Down
Loading

0 comments on commit dbea8f5

Please sign in to comment.