👋 Welcome to the Keystone Example Projects – a collection of projects that demonstrate Keystone features.
You can use these as jumping off point when adding features to your own Keystone project.
There are two base projects which all other projects build on:
They have very simple schemas and none of the bells or whistles you'd expect in a complete project. You can use these as a starting point for general experimentation in a clean environment.
Each project below demonstrates a Keystone feature you can learn about and experiment with.
withAuth(): Adds password-based authentication to the Task Manager base.- JSON field: Adds a JSON field to the Task Manager base.
defaultValue: Adds default values to the Blog base.extendGraphqlSchema: Extends the GraphQL API of the Blog base.extendGraphqlSchemawith graphql-ts: Extends the GraphQL API of the Blog base with graphql-ts.extendGraphqlSchemawith Nexus: Extends the GraphQL API of the Blog base with Nexus.- Virtual field: Adds virtual fields to the Blog base.
- Document field: Adds document fields to the Blog base.
- Testing: Adds tests with
@keystone-6/core/testingto thewithAuth()example. - Custom field: Adds a custom
starsfield to the Blog base. - Custom field view: Adds a custom Admin UI view to a
jsonfield to the Task Manager base. - Custom Admin UI logo: Adds a custom logo in the Admin UI to the Task Manager base.
- Custom Admin UI pages: Adds a custom page in the Admin UI to the Task Manager base.
To run an example, clone this repo and run the following commands:
yarn
cd examples/<feature>
yarn devIf everything works 🤞 the GraphQL Server and Admin UI will start on localhost:3000. See the README in each example for more specific details.
If you have trouble running these examples, or find a bug, please open an issue and tag it with the examples tag on GitHub.
Otherwise if you want to ask questions or have a chat with us, join us in Slack!
Follow @KeystoneJS on Twitter for updates.