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

Tidy up examples, and add types #8096

Merged
merged 16 commits into from
Feb 14, 2023
Merged

Tidy up examples, and add types #8096

merged 16 commits into from
Feb 14, 2023

Conversation

dcousens
Copy link
Member

@dcousens dcousens commented Nov 17, 2022

The examples are, honestly, disorganized and incomplete.
We actively need examples that show-case how to structure your project, and examples that demonstrate and explain the complexity of different features. Some examples might show how a particular use-case might play out, that is OK, but they should be identifiably different from our feature examples.

Before this pull request, our access control and authentication examples did not showcase things like isFilterable or isOrderable, nor did they showcase filter or item access control.

As of this pull request, many of our examples still need plenty of work, but they are an improvement on what we had.

@vercel
Copy link

vercel bot commented Nov 17, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
keystone-next-docs ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 14, 2023 at 0:28AM (UTC)

@changeset-bot

This comment was marked as resolved.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 17, 2022

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 1f33efc:

Sandbox Source
@keystone-6/sandbox Configuration

@vercel vercel bot temporarily deployed to Preview November 17, 2022 01:47 Inactive
@vercel vercel bot temporarily deployed to Preview November 22, 2022 07:33 Inactive
@dcousens dcousens self-assigned this Jan 23, 2023
@vercel vercel bot temporarily deployed to Preview January 23, 2023 02:59 Inactive
@vercel vercel bot temporarily deployed to Preview February 2, 2023 06:39 Inactive
@vercel vercel bot temporarily deployed to Preview February 3, 2023 03:45 Inactive
@dcousens dcousens marked this pull request as ready for review February 3, 2023 03:50
@vercel vercel bot temporarily deployed to Preview February 3, 2023 03:52 Inactive
@vercel vercel bot temporarily deployed to Preview February 3, 2023 04:28 Inactive
@dcousens dcousens force-pushed the examples-tidy branch 2 times, most recently from d622afd to 77295b0 Compare February 3, 2023 04:38
@vercel vercel bot temporarily deployed to Preview February 3, 2023 04:40 Inactive
@vercel vercel bot temporarily deployed to Preview February 3, 2023 04:46 Inactive
@vercel vercel bot temporarily deployed to Preview February 3, 2023 05:05 Inactive
@vercel vercel bot temporarily deployed to Preview February 6, 2023 06:18 Inactive
export const lists: Lists = {
User: list({
access: {
operation: {
...allOperations(allowAll),
// Only allow admins to delete users
Copy link
Member Author

@dcousens dcousens Feb 6, 2023

Choose a reason for hiding this comment

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

Probably the example should have prevented other operations too

@vercel vercel bot temporarily deployed to Preview February 13, 2023 03:44 Inactive
@vercel vercel bot temporarily deployed to Preview February 13, 2023 06:13 Inactive
@vercel vercel bot temporarily deployed to Preview February 13, 2023 06:24 Inactive
@vercel vercel bot temporarily deployed to Preview February 13, 2023 06:40 Inactive
@vercel vercel bot temporarily deployed to Preview February 13, 2023 06:48 Inactive
@vercel vercel bot temporarily deployed to Preview February 14, 2023 00:20 Inactive
@vercel vercel bot temporarily deployed to Preview February 14, 2023 00:28 Inactive
@dcousens dcousens merged commit f7d3639 into main Feb 14, 2023
@dcousens dcousens deleted the examples-tidy branch February 14, 2023 03:23
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.

2 participants