# Is it possible to get an array with the events of the contract

**URL:** <https://forum.thegraph.com/t/is-it-possible-to-get-an-array-with-the-events-of-the-contract/3974>\
**Category:** Questions & Feedback\
**Created:** [January 26, 2023, 10:18pm UTC](https://forum.thegraph.com/t/is-it-possible-to-get-an-array-with-the-events-of-the-contract/3974 "2023-01-26T22:18:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paul](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@paul](https://forum.thegraph.com/u/paul)\
**Post date:** [January 26, 2023, 10:18pm UTC](https://forum.thegraph.com/t/is-it-possible-to-get-an-array-with-the-events-of-the-contract/3974/1 "2023-01-26T22:18:26Z")

</div>

Besides storing the event data as entities I want to have some way to get n amount of events in order.  
I thought about creating an entity

```auto
type Events {
events: [Event]
}

```

but it seems like a dirty solution.

Does anyone know if there is a way to accomplish this?

Thanks

---

<div class="post-metadata">

**Author:** ![Krishna](https://avatars.discourse-cdn.com/v4/letter/k/71c47a/32.png) [@Krishna](https://forum.thegraph.com/u/Krishna)\
**Post date:** [January 27, 2023, 1:16am UTC](https://forum.thegraph.com/t/is-it-possible-to-get-an-array-with-the-events-of-the-contract/3974/2 "2023-01-27T01:16:36Z")

</div>

Its certainly possible to do that, but having very large arrays like this is not a good practice, you can still create this by pushing to this array each time a eventHandler is run
