The GraphQL schema represents an invalid data format for events/actions. The way the GraphQL schema is defined, it implies that events/actions will always have the same transaction information in a block. But this is incorrect since events/actions can be dispatched from different zkApp transactions, which all get included in a single block. Right now, the Archive Node API, will look at the first transaction fetched from the Postgres DB and assume that that transaction emitted all events/actions under a block.
We will need to fix the transaction information to be related to individual emitted actions/events since they can all have different transaction information related to a block.
Description
Transaction Information related to events/actions are defined on the top level of the actions/events resolvers: https://github.com/o1-labs/Archive-Node-API/blob/90c90cb289031ded9ca9d73267d033c92ee58b51/schema.graphql#L43
The GraphQL schema represents an invalid data format for events/actions. The way the GraphQL schema is defined, it implies that events/actions will always have the same transaction information in a block. But this is incorrect since events/actions can be dispatched from different zkApp transactions, which all get included in a single block. Right now, the Archive Node API, will look at the first transaction fetched from the Postgres DB and assume that that transaction emitted all events/actions under a block.
We will need to fix the transaction information to be related to individual emitted actions/events since they can all have different transaction information related to a block.