Skip to content
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
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- [Key Features](#key-features)
- [Getting Started](#getting-started)
- [GraphQL Endpoint](#graphql-endpoint)
- [Hosted Example](#hosted-example)
- [Examples](#examples)
- [Get all Transactions with add\_package messages. Show the creator, package name and path.](#get-all-transactions-with-add_package-messages-show-the-creator-package-name-and-path)
- [Subscribe to get all new blocks in real-time](#subscribe-to-get-all-new-blocks-in-real-time)
Expand Down Expand Up @@ -118,9 +119,7 @@ The playground includes built-in documentation for available queries, fields, an

```graphql
{
transactions(
filter: { message: {vm_param: {add_package: {}}}}
) {
getTransactions(where: {messages: {value: {MsgAddPackage: {}}}}) {
index
hash
block_height
Expand All @@ -146,7 +145,7 @@ The playground includes built-in documentation for available queries, fields, an

```graphql
subscription {
blocks(filter: {}) {
getBlocks(where: {}) {
height
version
chain_id
Expand Down
8 changes: 4 additions & 4 deletions serve/graph/gen/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ import (
var queriesInject = `
type Query {
"""
EXPERIMENTAL: Fetches Blocks matching the specified where criteria.
Fetches Blocks matching the specified where criteria.
Incomplete results due to errors return both the partial Blocks and
the associated errors.
"""
getBlocks(where: FilterBlock!, order: BlockOrder): [Block!]

"""
EXPERIMENTAL: Retrieves a list of Transactions that match the given
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.
"""
Expand All @@ -30,7 +30,7 @@ type Query {

type Subscription {
"""
EXPERIMENTAL: Subscribes to real-time updates of Transactions that
Subscribes to real-time updates of Transactions that
match the provided filter criteria. This subscription starts immediately
and only includes Transactions added to the blockchain after the subscription
is active.
Expand All @@ -46,7 +46,7 @@ type Subscription {
getTransactions(where: FilterTransaction!): Transaction!

"""
EXPERIMENTAL: Subscribes to real-time updates of Blocks that match the provided
Subscribes to real-time updates of Blocks that match the provided
filter criteria. Similar to the Transactions subscription,
this subscription is active immediately upon creation and only includes Blocks
added after the subscription begins.
Expand Down
16 changes: 8 additions & 8 deletions serve/graph/generated.go

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

7 changes: 5 additions & 2 deletions serve/graph/schema/query.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ type Query {
"""
Retrieves a list of Transactions that match the given filter criteria. If the result is incomplete due to errors, both partial results and errors are returned.
"""
transactions(filter: TransactionFilter!): [Transaction!]
transactions(filter: TransactionFilter!): [Transaction!] @deprecated(reason: "Use `getTransactions` instead.")

"""
Fetches Blocks matching the specified filter criteria. Incomplete results due to errors return both the partial Blocks and the associated errors.
"""
blocks(filter: BlockFilter!): [Block!]
blocks(filter: BlockFilter!): [Block!] @deprecated(reason: "Use `getBlocks` instead.")

"""
Returns the height of the most recently processed Block by the blockchain indexer, indicating the current length of the blockchain.
"""
latestBlockHeight: Int!
}

# Check graph/gen/generate.go to see Query methods using the auto-generated filters

6 changes: 4 additions & 2 deletions serve/graph/schema/subscription.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type Subscription {
Returns:
- Transaction: Each received update is a Transaction object that matches the filter criteria.
"""
transactions(filter: TransactionFilter!): Transaction!
transactions(filter: TransactionFilter!): Transaction! @deprecated(reason: "Use `getTransactions` instead.")

"""
Subscribes to real-time updates of Blocks that match the provided filter criteria. Similar to the Transactions subscription,
Expand All @@ -25,5 +25,7 @@ type Subscription {
Returns:
- Block: Each update consists of a Block object that satisfies the filter criteria, allowing subscribers to process or analyze new Blocks in real time.
"""
blocks(filter: BlockFilter!): Block!
blocks(filter: BlockFilter!): Block! @deprecated(reason: "Use `getBlocks` instead.")
}

# Check graph/gen/generate.go to see Subscription methods using the auto-generated filters
Loading