Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onHealthCheck not available in apollo-server-express #5096

Closed
david-wb opened this issue Apr 9, 2021 · 1 comment
Closed

onHealthCheck not available in apollo-server-express #5096

david-wb opened this issue Apr 9, 2021 · 1 comment

Comments

@david-wb
Copy link

david-wb commented Apr 9, 2021

The title says it all. ApolloServerExpressConfig does not have an onHealthCheck property while the standalone config does. This is a bug right? I'm using apollo-server-express version 2.22.2.

Thanks

@glasser
Copy link
Member

glasser commented Apr 9, 2021

onHealthCheck is an argument to applyMiddleware in apollo-server-express rather than the constructor. (It's in the constructor for apollo-server because that package takes care of the equivalent of applyMiddleware for you.)

This is not particularly documented well. In fact in general, we do a bad job of documenting all of the different package APIs fully accurately (despite the fact that, about the same number of projects use apollo-server-express directly as use apollo-server). I'm hoping to overhaul our docs as part of our current work on Apollo Server 3; see #5097

@glasser glasser closed this as completed Apr 9, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants