Skip to content

Commit

Permalink
Upgrade updates (#6753)
Browse files Browse the repository at this point in the history
* typo

* Added notices to fields API surfaces

* Changes update intro copy

* Format change

* Added Rest API example

* Removed Link tag for external anchors

* formatting fixes
  • Loading branch information
raveling committed Oct 10, 2021
1 parent ac3e07d commit 4af5c0b
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 7 deletions.
4 changes: 3 additions & 1 deletion docs/components/docs/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ export function DocsNavigation() {
<SubHeading>Config</SubHeading>
<NavItem href="/docs/apis/config">Config API</NavItem>
<NavItem href="/docs/apis/schema">Schema API</NavItem>
<NavItem href="/docs/apis/fields">Fields API</NavItem>
<NavItem href="/docs/apis/fields">
Fields API <Badge look="success">Updated</Badge>
</NavItem>
<NavItem href="/docs/apis/access-control">
Access Control API <Badge look="success">Updated</Badge>
</NavItem>
Expand Down
2 changes: 2 additions & 0 deletions docs/pages/docs/apis/fields.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { InlineCode } from '../../../components/primitives/Code';

# Fields API

?> We recently improved this API. If you were using it prior to October 5th 2021, [read this guide](/releases/2021-10-05#upgrade-guide) for details on how to upgrade.

The `fields` option of a [list configuration](./schema) defines the names, types, and configuration of the fields in the list.
This configuration option takes an object with field names as keys, and configured field types as values.

Expand Down
8 changes: 8 additions & 0 deletions docs/pages/docs/examples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,14 @@ export default function Docs() {
Adds a custom Navigation component to the Admin UI. Builds on the Task Manager starter
project.
</Well>
<Well
grad="grad2"
heading="REST API endpoint"
href="https://github.com/keystonejs/keystone/tree/main/examples/rest-api"
>
Demonstrates how to create REST endpoints by extending Keystone's express app and using
the Query API to execute queries against the schema.
</Well>
</div>

<Type as="h2" look="heading30" margin="2rem 0 1rem 0" id="deployment-projects">
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/docs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default function Docs() {
color: 'inherit',
}}
>
Learn how Keystone’s leading a new paradigm generation of content management tools.
Learn how Keystone’s leading a new generation of content management tools.
</Type>
</a>
</Link>
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/releases/2021-10-05.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ ALTER TABLE "Post" ALTER COLUMN "content" SET DEFAULT E'[{"type":"paragraph","ch
UPDATE "Post" SET "content" = DEFAULT WHERE "content" IS NULL;
ALTER TABLE "Post" ALTER COLUMN "content" SET NOT NULL;
```

### general

`text`, `float`, `integer`, `decimal`, `timestamp`, `select`, `password` can be made non-nullable at the database-level with the `isNullable` option which defaults to `true`, except for `text` which defaults to `false`.
Expand All @@ -252,7 +253,7 @@ All fields above except `password` can also have:

- `graphql.create.isNonNull` set if you have no create access control and you don't intend to add any in the future, it will make the GraphQL create input field non-nullable.

Keep in mind, `checkbox` is now [always non-nullable](#checkbox).
Keep in mind, `checkbox` is now [always non-nullable](#checkbox).

## Hook Updates <Emoji symbol="🪝" alt="Hook" />

Expand Down
20 changes: 16 additions & 4 deletions docs/pages/updates/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ export default function WhatsNew() {
</Type>

<Type as="p" look="body18" margin="1rem 0">
A snapshot of improvements we've landed recently in Keystone.
A snapshot of Keystone improvements and community happenings.
<br />
For more detail see our{' '}
For more on updates see our{' '}
<Link href="/releases">
<a>release notes</a>
</Link>
Expand All @@ -158,7 +158,7 @@ export default function WhatsNew() {
margin: '0 0.8rem 0.5rem 0',
}}
>
Where are we up to, and what we're working on next? Check out our
What are we working on next? Check out our
</span>
<Button as="a" href="/updates/roadmap" rel="noopener noreferrer">
Roadmap <ArrowR />
Expand All @@ -172,7 +172,19 @@ export default function WhatsNew() {
gap: 0,
})}
>
<Timeline date="21st September 2021" isLatest />
<Timeline date="5th October 2021" isLatest />
<Box heading="New example: REST API endpoint">
<a
href="https://github.com/keystonejs/keystone/tree/main/examples/rest-api"
target="_blank"
rel="noopener noreferrer"
>
This example
</a>{' '}
shows you how to create REST endpoints by extending Keystone’s express app so you can use
the Query API to execute queries against the schema.
</Box>
<Timeline date="21st September 2021" />
<Box heading="Keystone Community Q&A + YouTube launch">
<Stack orientation="horizontal">
<a
Expand Down

1 comment on commit 4af5c0b

@vercel
Copy link

@vercel vercel bot commented on 4af5c0b Oct 10, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.