# Documentation for ApolloServer 4 Setup with Subscriptions & Context?

**URL:** <https://community.apollographql.com/t/documentation-for-apolloserver-4-setup-with-subscriptions-context/7600>\
**Category:** Server\
**Tags:** server\
**Created:** [June 10, 2024, 8:24pm UTC](https://community.apollographql.com/t/documentation-for-apolloserver-4-setup-with-subscriptions-context/7600 "2024-06-10T20:24:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikr00001](https://avatars.discourse-cdn.com/v4/letter/v/f05b48/32.png) [@vikr00001](https://community.apollographql.com/u/vikr00001)\
**Post date:** [June 10, 2024, 8:24pm UTC](https://community.apollographql.com/t/documentation-for-apolloserver-4-setup-with-subscriptions-context/7600/1 "2024-06-10T20:24:15Z")

</div>

Is there sample code for ApolloServer 4 setup with subscriptions & context? I looked here:

> **[Configure GraphQL Subscription Support](https://www.apollographql.com/docs/graphos/routing/operations/subscriptions)**
>
> Configure your router to support GraphQL subscriptions, enabling clients to receive real-time updates via WebSocket or HTTP callbacks.

…but it doesn’t seem to include code for ApolloServer setup.

I’ve found a lot of sample code on the web, but most of it seems to be for outdated versions of ApolloServer.
