Skip to content

heartbeatIntervalMs missing from ApolloServerPluginSubscriptionCallback options #8167

@mario-jerkovic

Description

@mario-jerkovic

Issue Description

Apollo Server docs for ApolloServerPluginSubscriptionCallback mention a configurable
heartbeatIntervalMs, but the current TypeScript interface does not expose this option.
As a result, users cannot configure heartbeat behavior in a supported or type-safe way.

Docs reference:
https://github.com/apollographql/apollo-server/blob/main/docs/source/api/plugin/subscription-callback.mdx#heartbeatintervalms

HTTP-callback subscriptions are sensitive to timing and latency between the router/gateway
and the subgraph.

Without a supported way to configure the subgraph’s heartbeat interval:

  • we cannot compensate for event-loop jitter or network latency
  • valid subscriptions may be terminated despite healthy communication

Link to Reproduction

https://github.com/mario-jerkovic/apollo-server-subscription-callback-plugin-issue

Reproduction Steps

Run:

yarn install
yarn build

Actual tsc fails with and error

error TS2353: Object literal may only specify known properties, and 'heartbeatIntervalMs' does not exist in type 'ApolloServerPluginSubscriptionCallbackOptions'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions