PolyProgrammist / neardevhub-proposals-indexer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Near DevHub indexers

This repo keeps track of DevHub's indexers. DevHub makes use of two custom indexers

  1. The proposal indexer
  2. The post indexer (old feed)

View

QueryAPI has a QueryApi.App NEAR widget, hosted under the dataplatform.near account. With this component, you can see all the public indexers currently available on the Near blockchain.

Deploy

Important

In order to deploy indexers your account needs to be given permission.

Simply fork an existing indexer and press the publish button in the QueryApi.App widget. alt text

Tips:

  1. Once a indexer is deployed the schema can't be edited only forked. Make sure to deleted unused once. You don’t have to fork the indexer every time you fix the JS code – this is needed only if you need to use another SQL schema or want to completely wipe the indexer.

  2. Make sure to fork the indexer before editing the schema. It automatically makes some useful changes for you.

  3. The original way of writing data to the indexer was using GraphQL mutation. This generally works, but provides less flexibility and has poor performance. It is recommended to migrate to context.db methods. Try to use upsert extensively to allow your indexer to reindex same blocks.

Read more about the indexer in the docs

Read more about query api

About


Languages

Language:JavaScript 100.0%