-
Notifications
You must be signed in to change notification settings - Fork 565
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
Health check for liveliness, useReadinessCheck
plugin for readiness
#1808
Conversation
🦋 Changeset detectedLatest commit: 89a732b The changes in this PR will be included in the next version bump. This PR includes changesets to release 15 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Benchmark Results
|
🚀 Snapshot Release (
|
Package | Version | Info |
---|---|---|
@graphql-yoga/apollo-link |
1.0.0-alpha-20220929180530-a25088f2 |
npm ↗︎ unpkg ↗︎ |
@graphql-yoga/urql-exchange |
1.0.0-alpha-20220929180530-a25088f2 |
npm ↗︎ unpkg ↗︎ |
@graphql-yoga/common |
3.0.0-alpha-20220929180530-a25088f2 |
npm ↗︎ unpkg ↗︎ |
@graphql-yoga/redis-event-target |
1.0.0-alpha-20220929180530-a25088f2 |
npm ↗︎ unpkg ↗︎ |
@graphql-yoga/typed-event-target |
1.0.0-alpha-20220929180530-a25088f2 |
npm ↗︎ unpkg ↗︎ |
@graphql-yoga/graphiql |
3.0.0-alpha-20220929180530-a25088f2 |
npm ↗︎ unpkg ↗︎ |
graphql-yoga |
3.0.0-alpha-20220929180530-a25088f2 |
npm ↗︎ unpkg ↗︎ |
@graphql-yoga/node |
3.0.0-alpha-20220929180530-a25088f2 |
npm ↗︎ unpkg ↗︎ |
@graphql-yoga/plugin-apollo-inline-trace |
1.0.0-alpha-20220929180530-a25088f2 |
npm ↗︎ unpkg ↗︎ |
@graphql-yoga/plugin-apq |
1.0.0-alpha-20220929180530-a25088f2 |
npm ↗︎ unpkg ↗︎ |
@graphql-yoga/plugin-persisted-operations |
1.0.0-alpha-20220929180530-a25088f2 |
npm ↗︎ unpkg ↗︎ |
@graphql-yoga/plugin-response-cache |
1.0.0-alpha-20220929180530-a25088f2 |
npm ↗︎ unpkg ↗︎ |
@graphql-yoga/render-graphiql |
3.0.0-alpha-20220929180530-a25088f2 |
npm ↗︎ unpkg ↗︎ |
@graphql-yoga/subscription |
3.0.0-alpha-20220929180530-a25088f2 |
npm ↗︎ unpkg ↗︎ |
🚀 Website PreviewThe latest changes to the website are available as preview in: https://5dd8edb0.graphql-yoga.pages.dev |
Closes #958
Prelude
"Readiness" and "liveliness" are types of health checks, they both are a health check but serve a different meaning:
The difference is that a service can be live but not ready - for example, server has started but the database read replica is unavailable.
A liveliness check is something Yoga can offer out of the box because Yoga is a server and Yoga knows when it's alive/running. However, a readiness check is something Yoga cannot possibly figure out on its own, it is a check requiring user-land context.
Having said this, I propose dropping the built-in
/ready
route serving a "readiness" check and keeping the/health
route for a liveliness check (a liveliness check is naturally interpreted as a health check).Summary
/readiness
route, no morereadinessCheckEndpoint
useReadinessCheck
pluginunderunder core@graphql-yoga/plugin-readiness-check
graphql-yoga
Using the readiness check plugin
*See tests and code docs for more usage ideas.
TODO