Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion src/components/cards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function Cards({
<ul className="grid grid-cols-1 justify-stretch gap-2 pt-6 sm:grid-cols-2 lg:gap-4">
{items.map((item, index) => {
// Try to get section from learn-pages
let section: "getting-started" | "best-practices" | undefined
let section: "getting-started" | "best-practices" | "schema-governance" | undefined

const path = item.link.replace(/^\/learn\//, "").replace(/\/$/, "")
const learnPage = learnPages[path as keyof typeof learnPages]
Expand Down
10 changes: 9 additions & 1 deletion src/components/learn-aggregator/learn-pages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface LearnPageItem {
title: string
description: string
icon: string
section: "getting-started" | "best-practices"
section: "getting-started" | "best-practices" | "schema-governance"
href: string
}

Expand Down Expand Up @@ -147,13 +147,21 @@ const _items: Record<
icon: new URL("./assets/construction.svg", import.meta.url).href,
section: "best-practices",
},
// ---
"schema-review": {
description:
"Establish review processes and automated validation to keep your GraphQL schema consistent, safe, and easy to evolve.",
icon: new URL("./assets/checkbox.svg", import.meta.url).href,
section: "schema-governance",
},
}

const learnPages = _items as Record<LearnPagePath, LearnPageItem | null>

const pagesBySection: Record<LearnPageItem["section"], LearnPageItem[]> = {
"getting-started": [],
"best-practices": [],
"schema-governance": [],
}

for (const path in learnPages) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface TeaserSectionListItemProps
title: string
description: string
icon: React.ReactNode
section: "getting-started" | "best-practices"
section: "getting-started" | "best-practices" | "schema-governance"
href: string
}
export function TeaserSectionListItem({
Expand Down
2 changes: 1 addition & 1 deletion src/components/learn-aggregator/teaser-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface TeaserSectionProps
description: string
href: string
icon: string
section: "getting-started" | "best-practices"
section: "getting-started" | "best-practices" | "schema-governance"
}>
firstIconsEager?: boolean
}
Expand Down
5 changes: 5 additions & 0 deletions src/pages/learn/_meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,9 @@ export default {
security: "",
federation: "",
"debug-errors": "Common GraphQL over HTTP Errors",
"-- 3": {
type: "separator",
title: "Schema Governance",
},
"schema-review": "",
}
15 changes: 15 additions & 0 deletions src/pages/learn/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,21 @@ import { LookingForMore } from "../../components/looking-for-more"
items={pagesBySection["best-practices"]}
/>


<TeaserSection
id="schema-governance"
eyebrow="Schema governance"
title="Schema governance"
description=
"A healthy GraphQL API starts with a well-governed schema. Learn how to put review processes and automated checks in place so your schema stays consistent, safe, and easy to evolve as your team grows."
cta={
<Button href="/learn/schema-review" className='md:w-fit'>
Explore schema governance
</Button>
}
items={pagesBySection["schema-governance"]}
/>

<TrainingCoursesSection id="tutorials" />

<CommonQuestionsSection id="faq" />
Expand Down
Loading
Loading