0

I tried returning the entity objects from the event handlers on the AssemblyScript Subgraph code to simplify unit testing. For example, this works fine:

// Original code
export function handleEventCreation(
       event: EventCreation
): void {
...
}

but this fails:

// Failing code in Subgraph (it compiles well)
export function handleEventCreation(
     event: EventCreation,
): CreationEntity | null {
...
}

Both examples compile well.

Is there any explanation for that? In the Subgraph API site, I see that it failed indexing events only, but no further details about it.

gagiuntoli
  • 475
  • 5
  • 13
  • Can you show the stack traces from the error on the second example? – TachyonicBytes Mar 27 '23 at 13:04
  • I didn't find a way to get the stack traces once the code is deployed to Subgraph and fails. I could only see the error message: "failed indexing events". There are no enough details unfortunately. – gagiuntoli Mar 27 '23 at 16:14

0 Answers0