Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add ordering on new filtered methods. #106

Merged
merged 8 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
ajnavarro marked this conversation as resolved.
Show resolved Hide resolved
}

func (m *Storage) TxReverseIterator(
_,
_ uint64,
_,
_ uint32,
) (storage.Iterator[*types.TxResult], error) {
panic("not implemented") // TODO: Implement
ajnavarro marked this conversation as resolved.
Show resolved Hide resolved
}

// 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
Loading