diff --git a/docs/2.build/3.near-components/anatomy/bos-components.md b/docs/2.build/3.near-components/anatomy/bos-components.md deleted file mode 100644 index 58dc30891c8..00000000000 --- a/docs/2.build/3.near-components/anatomy/bos-components.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -id: bos-components -title: Historical data -sidebar_label: Handling Historical data ---- - -Building components that handle historical blockchain data require dedicated solutions that manage the data and reduce the latency of requests, as it's not possible to scan the whole blockchain when a user makes a request. - -A simple solution for developers building on NEAR is using [QueryAPI](../environment.md), a fully managed solution to build indexer functions, extract on-chain data, store it in a database, and be able to query it using GraphQL endpoints. - -:::tip -Learn more about QueryAPI in this [QueryAPI Overview](../environment.md) article. -::: - ---- - -## Tutorials - -For a technical implementation deep-dive, check these QueryAPI tutorials: - - - [Posts Indexer tutorial](../../../3.tutorials/near-components/indexer-tutorials/posts-indexer.md): this indexer creates a new row in a pre-defined database for every new Social post found on the blockchain. - - [Hype Indexer tutorial](../../../3.tutorials/near-components/indexer-tutorials/hype-indexer.md): this indexer creates a new row in a pre-defined database for every new Social post or comment found on the blockchain that contains either `PEPE` or `DOGE` in the contents. - - [Social Feed Indexer tutorial](../../../3.tutorials/near-components/indexer-tutorials/feed-indexer.md): this indexer keeps track of new posts, comments, and likes on Social, so a social feed can be rendered quickly. - ---- - -## GraphQL queries - -Using [QueryAPI's GraphiQL](../../6.data-infrastructure/query-api/index-function.md#mutations-in-graphql) tab, you can access the GraphiQL Explorer that provides a user friendly GraphQL playground, where you can view and create queries and mutations based on the DB schema that you defined for the indexer. - -![QueryAPI Indexer Dashboard](/docs/assets/QAPIgraphiql.png) - -You can easily set some fields and select the returning data -that you want, and the tool will build a query on the mutation panel on the right. -Then you can copy the resulting query, either in your JavaScript code so that you pass actual -data manually, or you pass in the mutation data object as a second parameter. - -For example, if you go and add a new mutation, click +, then you can do a bunch of actions here, such as creating, deleting, or inserting posts into your table. - -![Playground](/docs/assets/QAPIScreen.gif) - -If you want to test your mutation, using [Debug Mode](../../6.data-infrastructure/query-api/index-function.md#local-debug-mode) you can add a specific -block to the list, and then play it to see how it works. -Based on the indexer logic you defined, you'll get a call to the GraphQL mutation with the object -and data passed into it. - -:::tip Video Walkthrough - -**Tip:** watch the video on how to [create mutations in GraphQL](https://www.youtube.com/watch?v=VwO6spk8D58&t=781s). - -::: - ---- - -## Generate a NEAR component using Playground - -Creating a NEAR component from a GraphQL query is simple when using QueryAPI's GraphQL Playground. Just follow these steps: - -- go to the GraphiQL tab -- select the query that you want to use -- click on the Show GraphiQL Code Exporter button -- get some default code here, copy it, -- go to the NEAR sandbox, paste it. - -This will set up some boilerplate code to execute the GraphQL query, add the query that you had -in your playground and then call that query, extract the data and render it using the -render data function. - -Once you have the NEAR component code, you can test it out by going to [Jutsu](https://app.jutsu.ai/), -pasting the generated code, and enabling Live Preview. -Next, you can create a nice UI over this boilerplate code, and publish your new NEAR component. - -#### Component Examples - -- [Activity Feed widget](https://near.org/near/widget/ComponentDetailsPage?src=roshaan.near/widget/user-activity-feed&tab=source) running on [dev.near.org](https://dev.near.org) diff --git a/docs/3.tutorials/welcome.md b/docs/3.tutorials/welcome.md index 228b27eb65f..e1a279212a6 100644 --- a/docs/3.tutorials/welcome.md +++ b/docs/3.tutorials/welcome.md @@ -24,7 +24,7 @@ Explore our collection of Examples and Tutorials - diff --git a/docs/4.tools/indexing-tools.md b/docs/4.tools/indexing-tools.md index 62bf7e22c69..a1e841b33f5 100644 --- a/docs/4.tools/indexing-tools.md +++ b/docs/4.tools/indexing-tools.md @@ -8,8 +8,6 @@ sidebar_label: "Indexing Solutions" Here's a quick overview of Indexer projects on the NEAR ecosystem: -- [QueryAPI](../2.build/6.data-infrastructure/query-api/intro.md): Near QueryAPI is a fully managed solution to build indexer functions, extract on-chain data, store it in a database, and be able to query it using GraphQL endpoints. - - [BigQuery](../2.build/6.data-infrastructure/big-query.md): Blockchain data indexing in NEAR Public Lakehouse is for anyone wanting to understand blockchain data. - [NEAR Lake Framework](../2.build/6.data-infrastructure/lake-framework/near-lake.md): a companion library to NEAR Lake. It allows you to build your own indexer that watches a stream of blocks **from a NEAR Lake data source** and allows you to **create your own logic to process that data**. Keep in mind this is **the one you want to use for future projects**, instead of the Indexer Framework. Read [why it is better](https://docs.near.org/concepts/advanced/near-indexer-framework#why-is-it-better-than-near-indexer-framework). diff --git a/website/sidebars.js b/website/sidebars.js index 74cfb30380a..f07d030d702 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -217,7 +217,6 @@ const sidebar = { "build/near-components/anatomy/near", "build/near-components/anatomy/social", "build/near-components/anatomy/notifications", - "build/near-components/anatomy/bos-components" ] }, "build/near-components/bos-gateway", @@ -276,20 +275,6 @@ const sidebar = { "build/data-infrastructure/lake-framework/near-lake", "build/data-infrastructure/lake-framework/near-lake-state-changes-indexer", "build/data-infrastructure/lake-framework/migrating-to-near-lake-framework", - { - "Building Indexers": [ - "build/data-infrastructure/lake-framework/building-indexers/primitives", - { - "type": "link", - "label": "NEAR Lake Primitives", - "href": "https://near.github.io/near-lake-framework-js/" - }, - "build/data-infrastructure/lake-framework/building-indexers/js-lake-indexer", - "build/data-infrastructure/lake-framework/building-indexers/python-lake-indexer", - "build/data-infrastructure/lake-framework/building-indexers/nft-indexer", - "build/data-infrastructure/lake-framework/building-indexers/python-nft-indexer" - ] - }, { "Running NEAR Lake": [ "build/data-infrastructure/lake-framework/running-near-lake/run-lake-indexer", @@ -455,6 +440,20 @@ const sidebar = { } ] }, + { + "Building Indexers": [ + "build/data-infrastructure/lake-framework/building-indexers/primitives", + { + "type": "link", + "label": "NEAR Lake Primitives", + "href": "https://near.github.io/near-lake-framework-js/" + }, + "build/data-infrastructure/lake-framework/building-indexers/js-lake-indexer", + "build/data-infrastructure/lake-framework/building-indexers/python-lake-indexer", + "build/data-infrastructure/lake-framework/building-indexers/nft-indexer", + "build/data-infrastructure/lake-framework/building-indexers/python-nft-indexer" + ] + }, { "Build a Crossword Game": [ {