Skip to content

Commit

Permalink
feat: Document "Start Block" config options for QueryAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
morgsmccauley committed Feb 20, 2024
1 parent de2d1c5 commit 9216a7c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion docs/bos/community/indexers.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ This is the interface through which you can create a new Indexer. On here you ca
* the database schema in `schema.sql`
* the GraphQL queries in `GraphiQL`
* the indexer name on Indexer Name
* from which block to start indexing on Specific Block Height or From Latest Block Height (selected by default)
* from which block to start indexing

### Design Workflow

Expand Down Expand Up @@ -173,6 +173,25 @@ The GraphiQL tab in the editor will allow you to view the returned data from you

:::

### Publishing

Clicking the "Publish" button will open the following pop-up. From here you can configure the Indexer name, start block, and contract filter.

![Publishing QueryAPI Indexer](/docs/assets/QAPIPublish.png)

#### Start Block Options
- Start from latest block - Start indexing from the tip of the network, the exact block height is not guaranteed. Useful to test indexing for events happening in real-time.
- Continue from last processed block - Update the configuration of the Indexer, and resume indexing from the last processed block. The block at which config is updated is not guaranteed. Useful for fixing bugs encountered on specific blocks, or adding additional logs etc.
- Start from block height - Start indexing from the height specified, i.e. when the contract was deployed, or when a specific event occurs.

:::info
"Continue from last processed block" is only available for existing indexers. Updating the contract filter is disabled for this option, as it will create a backlog of blocks for two different contracts.
:::

:::warning
"Start from latest block" and "Start from block height" supersede the existing process, all queued blocks at the time of update will be cleared.
:::

## Performing Queries on the Public GraphQL API

In this section, we will provide a brief overview of how to query from a component in NEAR.
Expand Down
Binary file added website/static/docs/assets/QAPIPublish.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9216a7c

Please sign in to comment.