NEAR Query API Beta Is Now Open for Apps Building on B.O.S
NEAR FOUNDATION
October 12, 2023
Pagoda has officially opened the Beta version of NEAR Query API, a fully managed serverless infrastructure offering NEAR blockchain #indexers, storage, and GraphQL endpoints. Developers can now build indexers for any smart contract using JavaScript and the NEAR Lake Primitives library, and store data in custom SQL schemas, all without needing to manage any infrastructure. This approach significantly simplifies the way developers interact with blockchain data and empowers them to build B.O.S applications with great user experiences.

NEAR Query API allows developers to store indexer code on-chain and receive an auto-provisioned database with GraphQL API and indexed historical data, continuously updated through an indexer service that closely tracks the blockchain. The GraphQL API supports paginated and aggregate queries such as count, avg, min, etc. It also enables subscriptions through web sockets, allowing you to create user interfaces that update data without page refresh.

With QueryAPI, you can quickly get GraphQL endpoints and use them directly in your dApps to enrich the user experience and improve user interface performance.

In the latest release, Pagoda moved to a more scalable and stable infrastructure and open-sourced the code to make it easy to run it yourself and contribute to future development.

Sample Indexers
Additionally, Pagoda introduced several sample indexers:

A social feed indexer for posts, likes, and comments with a corresponding component. This API currently powers the activity feed on near.org.
A B.O.S component indexer with a widget feed that updates automatically with every commit using WebSockets.
User Interface
The NEAR Query API’s user-friendly interface, built using B.O.S components, provides easy access to all indexers and key features of the platform that streamline the process of building indexers:

Access to all indexers built on the platform. Developers can learn from practical examples as indexers’ code and schemas are stored on-chain.
Edit code online with autocomplete for easy access to block data and SQL tables for efficient development.
Debug indexers on any block using the browser console for a familiar debugging experience.
Build GraphQL queries using the GraphiQL playground.
Auto-generate JSX code for swift B.O.S component development.
Monitor indexer status and access logs written from JavaScript code.
Start historical indexing from any block.
Documentation

Pagoda created documentation for QueryAPI to help you get started. Take a look at how it works, read about indexer functions, the context object, and check out the tutorials. To provide more insight into the capabilities of the NEAR Query API, the product team has prepared a walkthrough video that you can watch here.

Invitation to Beta Testing
Pagoda invites developers to register their interest in closed Beta testing of NEAR Query API. If you are interested in indexing smart contracts on Mainnet with moderate transactions per day, the team is eager to engage with you and help you get started. Please use this link to register your interest.

Build full-stack JavaScript dApps on NEAR
On NEAR, JavaScript developers can build smart contracts with low gas fees, fast and decentralized user interfaces on the B.O.S and powered by QueryAPI, and all without needing to worry about cloud infrastructure.

Pagoda will be working with B.O.S developers on improving the developer experience of building, debugging, using and maintaining indexers, as well as performance and scalability to prepare for general availability later this year.

Join in this exciting new chapter of full-stack JavaScript dApps with NEAR B.O.S. and NEAR Query API!