# Is there a sample using Subscriptions and Intersection Observer

**URL:** <https://community.apollographql.com/t/is-there-a-sample-using-subscriptions-and-intersection-observer/8058>\
**Category:** Client SDKs\
**Tags:** client, web\
**Created:** [January 7, 2025, 4:11pm UTC](https://community.apollographql.com/t/is-there-a-sample-using-subscriptions-and-intersection-observer/8058 "2025-01-07T16:11:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shipswake](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@shipswake](https://community.apollographql.com/u/shipswake)\
**Post date:** [January 7, 2025, 4:11pm UTC](https://community.apollographql.com/t/is-there-a-sample-using-subscriptions-and-intersection-observer/8058/1 "2025-01-07T16:11:47Z")

</div>

I need to create a list with infinite scrolling. I would like to use Apollo Client Graphql Subscriptions and the Intersection Observer. Is there an example of how I can implement this in a React app?

---

<div class="post-metadata">

**Author:** ![JeffAuriemma](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/jeffauriemma/32/2845_2.png) [@JeffAuriemma](https://community.apollographql.com/u/JeffAuriemma)\
**Post date:** [January 31, 2025, 5:06pm UTC](https://community.apollographql.com/t/is-there-a-sample-using-subscriptions-and-intersection-observer/8058/2 "2025-01-31T17:06:33Z")

</div>

Hi @shipswake 👋 I don’t know whether you’d need a subscription to successfully implement infinite scrolling. I think a regular pagination API would probably be the simplest way of achieving that. Essentially you’d use Intersection Observer to watch a “sentinel” `<div>` at the bottom of the scroll container. Then when it’s visible, you call `fetchMore` to grab the next X items in your paginated list.

If you can share more about your use case, maybe the case for subscriptions will be more clear 🙂
