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

Update master from website live #6402

Merged
merged 30 commits into from
Aug 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4b06d75
Update index.tsx (#6278)
bladey Aug 8, 2021
7349553
Fix updates bit on the website (#6287)
emmatown Aug 10, 2021
4746a22
Content management update (#6282)
raveling Aug 10, 2021
512b8de
Fixed whitespace (#6283)
raveling Aug 10, 2021
6eda6b6
Update Header.tsx (#6289)
bladey Aug 10, 2021
3d4c268
Add CTA block for Web Box eCommerce Course (#6273)
raveling Aug 10, 2021
f97a9ca
Content update (#6290)
raveling Aug 10, 2021
2963ac7
Style fixes (#6291)
raveling Aug 10, 2021
d534409
Added new content to /updates (#6300)
raveling Aug 11, 2021
27e0d19
Update fields.mdx (#6304)
bladey Aug 12, 2021
e29b5e4
Fixed typo (#6322)
raveling Aug 15, 2021
64e6c1d
Added top margin to docs page component (#6301)
raveling Aug 16, 2021
c1df1e5
Added styles to table (#6315)
raveling Aug 16, 2021
4427bbc
Un-nest <Head> tags. (#6327)
bladey Aug 16, 2021
c24a290
Fixed link value (#6328)
raveling Aug 16, 2021
36f6550
Update `website_live` (#6336)
bladey Aug 17, 2021
14861b4
Merge branch 'master' into website_live
bladey Aug 17, 2021
712bea2
Release notes for 2021-08-17 release (#6345)
bladey Aug 17, 2021
46b2dc6
Fixed markdown for bold styles (#6346)
raveling Aug 17, 2021
44d6ec1
Update wording on upgrade guide and release notes (#6353)
timleslie Aug 17, 2021
cdde508
Updates nav additions (#6366)
raveling Aug 19, 2021
d43a1d8
Update new-graphql-api.mdx (#6375)
bladey Aug 19, 2021
e7ed4d3
Updated URLs (#6374)
raveling Aug 19, 2021
67e0756
Tweaking docs for Next.js walkthrough for latest version (#6383)
bladey Aug 20, 2021
a3fb2ea
Added upgrade notices to GraphQL API related pages (#6387)
raveling Aug 22, 2021
31a2064
Fixed link color inconsistency (#6388)
raveling Aug 22, 2021
80f122f
Add note to use `yarn` in the embedded Next.js guide (#6384)
bladey Aug 23, 2021
2da90e0
[WIP] Related content links (#6360)
raveling Aug 24, 2021
903e5ce
Added 2x testimonials (#6400)
raveling Aug 25, 2021
325f123
Merge branch 'website_live'
bladey Aug 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/components/RelatedContent.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/** @jsx jsx */
import { jsx } from '@emotion/react';
import { ReactNode } from 'react';

import { useMediaQuery } from '../lib/media';

export function RelatedContent({ children }: { children: ReactNode }) {
const mq = useMediaQuery();

return (
<div
css={mq({
display: 'grid',
gridTemplateColumns: ['1fr', '1fr', '1fr', '1fr 1fr'],
gap: 'var(--space-xlarge)',
'> a > p > p > code': {
textDecoration: 'none',
},
})}
>
{children}
</div>
);
}
32 changes: 31 additions & 1 deletion docs/components/docs/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { useMediaQuery } from '../../lib/media';
import { useHeaderContext } from '../Header';
import { Badge } from '../primitives/Badge';
import { Type } from '../primitives/Type';
import { Emoji } from '../primitives/Emoji';

type SectionProps = { label: string; children: ReactNode };
export function Section({ label, children }: SectionProps) {
Expand Down Expand Up @@ -133,7 +134,6 @@ export function DocsNavigation() {
<PrimaryNavItem href="/docs/walkthroughs">Walkthroughs</PrimaryNavItem>
<PrimaryNavItem href="/docs/examples">Examples</PrimaryNavItem>
<Section label="Guides">
<NavItem href="/docs/guides/keystone-5-vs-keystone-6-preview">Keystone 5 vs 6</NavItem>
<NavItem href="/docs/guides/cli">Command Line</NavItem>
<NavItem href="/docs/guides/relationships">Relationships</NavItem>
<NavItem href="/docs/guides/filters">
Expand Down Expand Up @@ -214,6 +214,36 @@ export function UpdatesNavigation({ releases = [] }: { releases: string[] }) {
))}
</Section>
) : null}
<Section label="Featured News">
<NavItem href="/updates/new-graphql-api">
<Emoji symbol="💎" alt="Gemstone" />
&nbsp; New GraphQL API
</NavItem>
<NavItem href="/releases/2021-07-29">
<Emoji symbol="🎛️" alt="Control knobs" />
&nbsp; Customisable Admin UI
</NavItem>
<NavItem href="/updates/prisma-day-2021">
<Emoji symbol="🍿" alt="TV" />
&nbsp; Jed’s Prisma Day Talk
</NavItem>
<NavItem href="/releases/2021-06-15">
<Emoji symbol="⚙️" alt="Gear" />
&nbsp; New Core
</NavItem>
<NavItem
href="https://github.com/keystonejs/keystone/tree/master/examples"
target="_blank"
rel="noopener noreferrer"
>
<Emoji symbol="🧪" alt="Test Tube" />
&nbsp; New Examples Collection
</NavItem>
<NavItem href="/updates/keystone-5-vs-keystone-6-preview">
<Emoji symbol="ℹ️" alt="Information" />
&nbsp; Keystone 5 vs 6
</NavItem>
</Section>
</nav>
);
}
4 changes: 3 additions & 1 deletion docs/components/primitives/Well.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export function Well({ grad = 'grad1', heading, href, children, ...props }: Well
color: 'var(--text)',
overflow: 'hidden',
transition: 'box-shadow 0.2s ease, transform 0.2s ease, padding 0.2s ease',
textDecoration: 'none !important',
':before': {
content: '""',
position: 'absolute',
Expand All @@ -47,8 +48,9 @@ export function Well({ grad = 'grad1', heading, href, children, ...props }: Well
as="h2"
look="heading20bold"
css={{
margin: '0 0 1rem 0',
margin: '0 0 1rem 0 !important',
paddingRight: '2rem',
fontSize: '1.25rem !important',
}}
>
{heading} →
Expand Down
4 changes: 2 additions & 2 deletions docs/lib/prose-lite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ export const proseStyles = {
content: '""',
},
a: {
color: 'var(--text)',
textDecoration: 'underline',
fontWeight: 500,
color: 'inherit',
},
'a:hover': {
color: 'var(--link)',
},
strong: {
color: 'var(--text)',
color: 'inherit',
fontWeight: 600,
},
'ol[type="A"], ol[type="A" s]': {
Expand Down
3 changes: 3 additions & 0 deletions docs/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
13 changes: 13 additions & 0 deletions docs/pages/docs/apis/auth.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { Markdown } from '../../../components/Markdown';
import { Well } from '../../../components/primitives/Well';
import { RelatedContent } from '../../../components/RelatedContent';

# Authentication API

Expand Down Expand Up @@ -475,4 +477,15 @@ If the token has expired the value `{ code: TOKEN_EXPIRED, message: 'The auth to
If the token is valid then the session handler will start a new session and return the encoded session cookie data as `sessionToken`.
The authenticated item will be returned as `item`.

## Related resources

<RelatedContent>
<Well
heading="Example Project: Authentication"
href="https://github.com/keystonejs/keystone/tree/master/examples/with-auth"
>
Adds password-based authentication to the Task Manager starter project.
</Well>
</RelatedContent>

export default ({ children }) => <Markdown description="API reference for supporting authentication against a password field using the createAuth() function in the `@keystone-next/auth` package.">{children}</Markdown>;
14 changes: 14 additions & 0 deletions docs/pages/docs/apis/config.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { Markdown } from '../../../components/Markdown';
import { Well } from '../../../components/primitives/Well';
import { RelatedContent } from '../../../components/RelatedContent';
import { InlineCode } from '../../../components/primitives/Code';

# System Configuration API

Expand Down Expand Up @@ -405,4 +408,15 @@ Options:
- `generateNextGraphqlAPI`: Creates a file at `node_modules/.keystone/next/graphql-api` with `default` and `config` exports that can be re-exported in a Next API route
- `generateNodeAPI`: Creates a file at `node_modules/.keystone/api` with a `lists` export

## Related resources

<RelatedContent>
<Well
heading="Schema API Reference"
href="/docs/apis/schema"
>
The API to configure your options used with the <InlineCode>list</InlineCode> function.
</Well>
</RelatedContent>

export default ({ children }) => <Markdown description="API reference for configuring your Keystone system: Lists, Database, Admin UI, Server, Sessions, GraphQl, Files, Images, and experimental options.">{children}</Markdown>;
20 changes: 20 additions & 0 deletions docs/pages/docs/apis/context.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { Markdown } from '../../../components/Markdown';
import { Well } from '../../../components/primitives/Well';
import { RelatedContent } from '../../../components/RelatedContent';
import { InlineCode } from '../../../components/primitives/Code';

# Context API

Expand Down Expand Up @@ -161,4 +164,21 @@ They will be removed in future releases.

`gqlNames`: A function which takes a `listKey` and returns an object containing the GraphQL query, mutation and type names related to that list.

## Related resources

<RelatedContent>
<Well
heading="List Items API Reference"
href="/docs/apis/list-items"
>
A programmatic API for running CRUD operations against your GraphQL API. For each list in your system you get an API at <InlineCode>context.lists.&lt;listName&gt;</InlineCode>
</Well>
<Well
heading="DB Items API Reference"
href="/docs/apis/db-items"
>
The API for running CRUD operations against the internal GraphQL resolvers in your system. It returns internal item objects, which can be returned from GraphQL resolvers.
</Well>
</RelatedContent>

export default ({ children }) => <Markdown description="The KeystoneContext object is the primary API entry point for all of the run-time functionality of your system. It's APIs can be used to write things like access control, hooks, testing and GraphQL schema extensions.">{children}</Markdown>;
20 changes: 20 additions & 0 deletions docs/pages/docs/apis/db-items.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { Markdown } from '../../../components/Markdown';
import { Well } from '../../../components/primitives/Well';
import { RelatedContent } from '../../../components/RelatedContent';
import { InlineCode } from '../../../components/primitives/Code';

# Database Items API

Expand Down Expand Up @@ -140,4 +143,21 @@ const users = await context.db.lists.User.deleteMany({
});
```

## Related resources

<RelatedContent>
<Well
heading="List Items API Reference"
href="/docs/apis/list-items"
>
A programmatic API for running CRUD operations against your GraphQL API. For each list in your system you get an API at <InlineCode>context.lists.&lt;listName&gt;</InlineCode>.
</Well>
<Well
heading="Context API Reference"
href="/docs/apis/context"
>
The API for run-time functionality in your Keystone system. Use it to write business logic for access control, hooks, testing, GraphQL schema extensions, and more.
</Well>
</RelatedContent>

export default ({ children }) => <Markdown description="Keystone’s database items API is a programmatic API for running CRUD operations against the internal GraphQL resolvers in your system. It bypasses the GraphQL Server itself, invoking resolver functions directly.">{children}</Markdown>;
22 changes: 21 additions & 1 deletion docs/pages/docs/apis/fields.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { Markdown } from '../../../components/Markdown';
import { Well } from '../../../components/primitives/Well';
import { RelatedContent } from '../../../components/RelatedContent';
import { InlineCode } from '../../../components/primitives/Code';

# Fields API

Expand Down Expand Up @@ -731,4 +734,21 @@ export default config({
});
```

export default ({ children }) => <Markdown description="A reference of Keystone’s field types, and the configuration options they accept.">{children}</Markdown>;
## Related resources

<RelatedContent>
<Well
heading="Schema API Reference"
href="/docs/apis/schema"
>
The API to configure your options used with the <InlineCode>list()</InlineCode> function.
</Well>
<Well
heading="GraphQL API Reference"
href="/docs/apis/graphql"
>
A complete CRUD (create, read, update, delete) GraphQL API derived from the list and field names you configure in your system.
</Well>
</RelatedContent>

export default ({ children }) => <Markdown description="A reference of Keystone’s field types, and the configuration options they accept.">{children}</Markdown>
15 changes: 15 additions & 0 deletions docs/pages/docs/apis/filters.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { Markdown } from '../../../components/Markdown';
import { Well } from '../../../components/primitives/Well';
import { RelatedContent } from '../../../components/RelatedContent';

# Query Filter API

?> We recently improved this API so it’s easier to program and reason about. If you were using it prior to August 17th 2021, [read this guide](/updates/new-graphql-api) for info on how to upgrade.

Each field type provides its own set of filters which can be used with [queries](./graphql#all-users).
This page lists all the filters available for each field type.
For more details on how to use filters in queries please consult to the [GraphQL Queries - Filters](../guides/filters) guide.
Expand Down Expand Up @@ -147,4 +151,15 @@ The `file` field type does not support filters.

The `image` field type does not support filters.

## Related resources

<RelatedContent>
<Well
heading="Query Filters Guide"
href="/docs/guides/filters"
>
Query filters are an integral part of Keystone’s powerful GraphQL APIs. This guide will show you how to use filters to get the data you need from your system.
</Well>
</RelatedContent>

export default ({ children }) => <Markdown description="A reference list of every filters available for every Keystone field type. Keystone filters are typically named after the field they are filtering.">{children}</Markdown>;
22 changes: 22 additions & 0 deletions docs/pages/docs/apis/graphql.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { Markdown } from '../../../components/Markdown';
import { Well } from '../../../components/primitives/Well';
import { RelatedContent } from '../../../components/RelatedContent';
import { InlineCode } from '../../../components/primitives/Code';

# GraphQL API

?> We recently improved this API so it’s easier to program and reason about. If you were using it prior to August 17th 2021, [read this guide](/updates/new-graphql-api) for info on how to upgrade.

Keystone generates a CRUD (create, read, update, delete) GraphQL API based on the [schema](./schema) definition provided in the system [config](./config).

Consider the following system definition:
Expand Down Expand Up @@ -407,4 +412,21 @@ type User {
}
```

## Related resources

<RelatedContent>
<Well
heading="Schema API Reference"
href="/docs/apis/schema"
>
The API to configure your options used with the <InlineCode>list()</InlineCode> function.
</Well>
<Well
heading="Config API Reference"
href="/docs/apis/config"
>
The API to configure all the parts parts of your Keystone system.
</Well>
</RelatedContent>

export default ({ children }) => <Markdown description="Reference docs for Keystone’s CRUD (create, read, update, delete) GraphQL API. Based on the schema definitions outlined in your system config.">{children}</Markdown>;
13 changes: 13 additions & 0 deletions docs/pages/docs/apis/hooks.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { Markdown } from '../../../components/Markdown';
import { Well } from '../../../components/primitives/Well';
import { RelatedContent } from '../../../components/RelatedContent';

# Hooks API

Expand Down Expand Up @@ -438,4 +440,15 @@ The data resolving steps are applied in the following order:
5. Field hooks (user defined): A `resolveInput` field hook can return a new value for its field, which will the current field value on `resolvedData`.
6. List hooks (user defined): A `resolveInput` list hook can return a new value for the entire `resolvedData` object.

## Related resources

<RelatedContent>
<Well
heading="Hooks Guide"
href="/docs/guides/hooks"
>
Learn how to use Hooks within your schema to extend Keystone’s powerful CRUD GraphQL APIs with your own business logic.
</Well>
</RelatedContent>

export default ({ children }) => <Markdown description="Hooks let you to execute code at different stages of the mutation lifecycle when performing create, update, and delete operations.">{children}</Markdown>;
19 changes: 19 additions & 0 deletions docs/pages/docs/apis/list-items.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { Markdown } from '../../../components/Markdown';
import { Well } from '../../../components/primitives/Well';
import { RelatedContent } from '../../../components/RelatedContent';

# List Items API

Expand Down Expand Up @@ -144,4 +146,21 @@ const users = await context.lists.User.deleteMany({
});
```

## Related resources

<RelatedContent>
<Well
heading="Context API Reference"
href="/docs/apis/context"
>
The API for run-time functionality in your Keystone system. Use it to write business logic for access control, hooks, testing, GraphQL schema extensions, and more.
</Well>
<Well
heading="DB Items API Reference"
href="/docs/apis/db-items"
>
The API for running CRUD operations against the internal GraphQL resolvers in your system. It returns internal item objects, which can be returned from GraphQL resolvers.
</Well>
</RelatedContent>

export default ({ children }) => <Markdown description="Reference docs for Keystone‘s List Items API: a programmatic API for running CRUD operations against your GraphQL API.">{children}</Markdown>;
Loading