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

fix: Rollback backward incompatible change #91

Merged
merged 2 commits into from
Sep 13, 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ A GraphQL playground is available at `/graphql`. There you have all the document
```graphql
{
transactions(
filter: { messages: {vm_param: {add_package: {}}}}
filter: { message: {vm_param: {add_package: {}}}}
) {
index
hash
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/gnolang/tx-indexer

go 1.22
go 1.22.7

require (
github.com/99designs/gqlgen v0.17.49
Expand Down
8 changes: 4 additions & 4 deletions serve/graph/generated.go

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

10 changes: 5 additions & 5 deletions serve/graph/model/models_gen.go

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

10 changes: 5 additions & 5 deletions serve/graph/schema/filter/transaction_filter.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ input TransactionFilter {
hash: String

"""
Transaction's message to filter Transactions.
`messages` can be configured as a filter with a transaction message's `router` and `type` and `parameters(bank / vm)`.
`messages` is entered as an array and works exclusively.
ex) `messages[0] || messages[1] || messages[2]`
Transaction's messages to filter Transactions.
`message` can be configured as a filter with a transaction message's `router` and `type` and `parameters(bank / vm)`.
`message` is entered as an array and works exclusively.
ex) `message[0] || message[1] || message[2]`
"""
messages: [TransactionMessageInput!]
message: [TransactionMessageInput!]

"""
`memo` are string information stored within a transaction.
Expand Down
3 changes: 2 additions & 1 deletion serve/graph/transaction_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"math"

"github.com/gnolang/gno/tm2/pkg/std"

"github.com/gnolang/tx-indexer/serve/graph/model"
)

Expand All @@ -30,7 +31,7 @@ func FilteredTransactionBy(tx *model.Transaction, filter model.TransactionFilter
return false
}

if !filteredTransactionByMessages(tx, filter.Messages) {
if !filteredTransactionByMessages(tx, filter.Message) {
return false
}

Expand Down
Loading