Skip to content

Commit

Permalink
fix: Rollback backward incompatible change (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnavarro committed Sep 13, 2024
1 parent 3e524a7 commit 220501c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 17 deletions.
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

0 comments on commit 220501c

Please sign in to comment.