keystone icon indicating copy to clipboard operation
keystone copied to clipboard

Implement async config

Open pazams opened this issue 3 years ago • 3 comments
trafficstars

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

pazams avatar Feb 07 '22 21:02 pazams

⚠️ 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

changeset-bot[bot] avatar Feb 07 '22 21:02 changeset-bot[bot]

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

vercel[bot] avatar Feb 07 '22 21:02 vercel[bot]

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.

codesandbox-ci[bot] avatar Feb 07 '22 22:02 codesandbox-ci[bot]

~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

dcousens avatar Oct 18 '22 04:10 dcousens

@pazams if you had any examples of how you are wanting to use this, that would really help us resolve this canonically for Keystone

dcousens avatar Oct 19 '22 00:10 dcousens

Followed up in https://github.com/keystonejs/keystone/discussions/7273#discussioncomment-4190847

dcousens avatar Nov 20 '22 23:11 dcousens