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

Deprecate @keystone-6/system and server.healthCheck #8721

Merged
merged 5 commits into from Jul 31, 2023
Merged

Conversation

dcousens
Copy link
Member

This pull request deprecates @keystone-6/system, including each of the exports createSystem, createExpressServer and initConfig. Neither of these exports should be used by developers in new code, as we are slowly changing the way users interact with Keystone generally. If you have a usecase for these functions, please comment on this pull request!

This pull request additionally deprecates config.server.healthCheck, with the new recommendation for developers to use extendExpressApp with a custom route that fits their use-case. This configuration was highly opinionated and often unhelpful in different environments when you needed a very specific response format.
An implementation that wants to upgrade early could use the following:

import { config } from '@keystone-6/core';
import { TypeInfo } from '.keystone/types';

export default config<TypeInfo>({
  ...
  server: {
    extendExpressApp: (app, commonContext) => {
      app.get('/status', async (req, res) => {
        res.status(200).json({ status: 'up' })
      })
    },
  },
})

@changeset-bot

This comment was marked as resolved.

@dcousens dcousens requested a review from borisno2 July 31, 2023 06:18
@dcousens dcousens self-assigned this Jul 31, 2023
@dcousens dcousens force-pushed the deprecations branch 2 times, most recently from d45d19c to 1be2a76 Compare July 31, 2023 06:28
Copy link
Member

@borisno2 borisno2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

.changeset/less-systems-now.md Outdated Show resolved Hide resolved
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 31, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 768d785:

Sandbox Source
@keystone-6/sandbox Configuration

@dcousens dcousens merged commit 955dee9 into main Jul 31, 2023
58 checks passed
@dcousens dcousens deleted the deprecations branch July 31, 2023 06:50
@dcousens dcousens mentioned this pull request Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants