docs: add introduction to Blockchain Indexing
Close: #2295
Minimal Documentation to introduce Blockchain indexing through tx-indexer.
I've as well made made an introduction video with a GraphQL live coding example : https://www.youtube.com/watch?v=8ld0nsV37SA.
🛠 PR Checks Summary
🔴 Changes to 'docs' folder must be reviewed/authored by at least one devrel and one tech-staff
Manual Checks (for Reviewers):
- [ ] IGNORE the bot requirements for this PR (force green CI check)
- [ ] The pull request description provides enough details
Read More
🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers.
✅ Automated Checks (for Contributors):
🟢 Maintainers must be able to edit this pull request (more info) 🔴 Changes to 'docs' folder must be reviewed/authored by at least one devrel and one tech-staff 🟢 Pending initial approval by a review team member, or review from tech-staff
☑️ Contributor Actions:
- Fix any issues flagged by automated checks.
- Follow the Contributor Checklist to ensure your PR is ready for review.
- Add new tests, or document why they are unnecessary.
- Provide clear examples/screenshots, if necessary.
- Update documentation, if required.
- Ensure no breaking changes, or include
BREAKING CHANGEnotes. - Link related issues/PRs, where applicable.
☑️ Reviewer Actions:
- Complete manual checks for the PR, including the guidelines and additional checks if applicable.
📚 Resources:
Debug
Automated Checks
Maintainers must be able to edit this pull request (more info)
If
🟢 Condition met └── 🟢 And ├── 🟢 The base branch matches this pattern: ^master$ └── 🟢 The pull request was created from a fork (head branch repo: Davphla/gno)Then
🟢 Requirement satisfied └── 🟢 Maintainer can modify this pull requestChanges to 'docs' folder must be reviewed/authored by at least one devrel and one tech-staff
If
🟢 Condition met └── 🟢 And ├── 🟢 The base branch matches this pattern: ^master$ └── 🟢 A changed file matches this pattern: ^docs/ (filename: docs/README.md)Then
🔴 Requirement not satisfied └── 🔴 And ├── 🔴 Or │ ├── 🔴 Pull request author is a member of the team: tech-staff │ └── 🔴 At least 1 user(s) of the team tech-staff reviewed pull request(with state "APPROVED") └── 🔴 Or ├── 🔴 Pull request author is a member of the team: devrels └── 🔴 At least 1 user(s) of the team devrels reviewed pull request(with state "APPROVED")Pending initial approval by a review team member, or review from tech-staff
If
🟢 Condition met └── 🟢 And ├── 🟢 The base branch matches this pattern: ^master$ └── 🟢 Not (🔴 Pull request author is a member of the team: tech-staff)Then
🟢 Requirement satisfied └── 🟢 If ├── 🟢 Condition │ └── 🟢 Or │ ├── 🔴 At least one of these user(s) reviewed the pull request: [jefft0 leohhhn n0izn0iz notJoon omarsy x1unix] (with state "APPROVED") │ ├── 🟢 At least 1 user(s) of the team tech-staff reviewed pull request │ └── 🟢 This pull request is a draft └── 🟢 Then └── 🟢 Not (🔴 This label is applied to pull request: review/triage-pending)Manual Checks
**IGNORE** the bot requirements for this PR (force green CI check)
If
🟢 Condition met └── 🟢 On every pull requestCan be checked by
- Any user with comment edit permission
The pull request description provides enough details
If
🟢 Condition met └── 🟢 And ├── 🟢 Not (🔴 Pull request author is a member of the team: core-contributors) └── 🟢 Not (🔴 Pull request author is user: dependabot[bot])Can be checked by
- team core-contributors
I think you should use something else than balance as an example, since for that you can simply query the chain.
I think a good example is building a search tool.
Example, for social content: indexing blog posts and building a full-text-search feature over posts content on top of that, which is something that would cost a huge amount of gas if done on-chain. Also search for usernames is a good example.
@n0izn0iz I modified the section to add more detailed and relevant example following your feedback! :+1:
Hey @Davphla, let me know when you are ready for another round of reviews.
I re-open it. I reworked it since it was not really great before.
I add a full example implementation step by step (i tried it it's all working great, I can upload it in a separate repository). It's a lot of code in the documentation, but I believe in that specific case that's the most efficient way to share knowledge. It's quite hard to implement when you don't know anything about it (as I got when writing this documentation). I'm open to listen any changes and review!
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:loudspeaker: Thoughts on this report? Let us know!
Code available at: https://github.com/samouraiworld/tx-indexer-example (To be moved in Gnoverse).
I've modified through the new update:
- Remove the database part from the documentation. I think is unrelated to the use of the indexer -- Though it is still available through the link above.
- Use of
embedmdto extract the code to the_assetsfolder. - Use a json structure to match the GraphQL structure