Update subgraph watcher demo readme (#480)

* Update subgraph watcher demo readme

* Pass extra block data required in subgraph block handler (#486)

* Use codegen config directory name instead of file path

* Get block data from extra event data

* Add extra event data in processBlockAfterEvents

---------

Co-authored-by: neeraj <neeraj.rtly@gmail.com>

* Update example subgraph mapping code for graph-cli upgrade

* Return 0 value for block size in ipld-eth-client

---------

Co-authored-by: neeraj <neeraj.rtly@gmail.com>
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
This commit is contained in:
2023-11-24 11:13:40 +05:30
committed by GitHub
co-authored by neeraj prathamesh
parent 937aed139f
commit 6decf61d4c
8 changed files with 38 additions and 38 deletions
@@ -50,6 +50,7 @@ export function handleTest (event: Test): void {
if (!category) {
category = new Category(author.blogCount.toString());
category.name = event.params.param1;
category.count = BigInt.zero();
}
category.count = category.count + BigInt.fromString('1');
@@ -59,13 +60,14 @@ export function handleTest (event: Test): void {
blog.kind = 'long';
blog.isActive = true;
const blogReviews = blog.reviews;
// eslint-disable-next-line @typescript-eslint/ban-types
const blogReviews: BigInt[] = new Array(0);
blogReviews.push(BigInt.fromString('4'));
blog.reviews = blogReviews;
blog.author = author.id;
const categories = blog.categories;
const categories: string[] = new Array(0);
categories.push(category.id);
blog.categories = categories;