keystone
keystone copied to clipboard
Implement async config
This is a Non-breaking feature.
This allows keystone.ts to now return either KeystoneConfig or Promise<KeystoneConfig>
Ref https://github.com/keystonejs/keystone/issues/7274
⚠️ No Changeset found
Latest commit: 6de2608279584ad8dcbf762f0f45d4aa94a88497
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/keystonejs/keystone-next-docs/95fyn9Wt2kssfJAhJkLjwVxgyodu
✅ Preview: https://keystone-next-docs-git-fork-pazams-pazams-imp-dca090-keystonejs.vercel.app
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.
~I don't think we want to support an asynchronous configuration from the keystone.ts, but with new pathways like getContext, users should feel free to run any asynchronous actions as needed before-hand.~
~Maybe I'm not understanding the reasoning behind when you would want to do this though.~
edit: thinking about this, actually I can see a few scenarios where this could be helpful, re-opening
@pazams if you had any examples of how you are wanting to use this, that would really help us resolve this canonically for Keystone
Followed up in https://github.com/keystonejs/keystone/discussions/7273#discussioncomment-4190847