Skip to content

Commit

Permalink
add resources docs page
Browse files Browse the repository at this point in the history
  • Loading branch information
hayes committed May 30, 2023
1 parent cec71ef commit 5ac6147
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 9 deletions.
53 changes: 53 additions & 0 deletions website/pages/docs/resources.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: Resources
title: Resources
description: External guides, tools, and libraries created by members of the Pothos community.
---

import { DocsPage } from '../../components/Docs/Page';
import { buildNav } from '../../util/build-nav';

export default DocsPage;

export const getStaticProps = () => ({ props: { nav: buildNav() } });

## Guides and Tutorials

- [End-To-End Type-Safety with GraphQL, Prisma & React: GraphQL API](https://www.prisma.io/blog/e2e-type-safety-graphql-react-3-fbV2ZVIGWg#start-up-a-graphql-server)
by [Sabin Adams](https://twitter.com/sabinthedev)
- [Code-first GraphQL with Pothos](https://graphql.wtf/episodes/60-code-first-graphql-with-pothos)
by [Jamie Barton](https://twitter.com/notrab)
- [How to Build a Type-safe GraphQL API using Pothos and Kysely](https://dev.to/franciscomendes10866/how-to-build-a-type-safe-graphql-api-using-pothos-and-kysely-4ja3)
by [Francisco Mendes](https://github.com/FranciscoMendes10866)
- [Type-safe GraphQL Server with Pothos](https://omkarkulkarni.hashnode.dev/type-safe-graphql-server-with-pothos-formerly-giraphql)
by [Omkar Kulkarni](https://twitter.com/omkar_k45)
- [Build a GraphQL server running on Cloudflare Workers](https://the-guild.dev/blog/graphql-yoga-worker)
by [Rito Tamata](https://twitter.com/chimame_rt)

## 3rd party Tools and Libraries

- [Prisma Generator Pothos Codegen](https://github.com/Cauen/prisma-generator-pothos-codegen) by
[Emanuel](https://twitter.com/cauenor)
- [Nexus to Pothos codemod](https://github.com/villesau/nexus-to-pothos-codemod) by
[Ville Saukkonen](https://twitter.com/SaukkonenVille)
- [protoc-gen-pothos](https://github.com/proto-graphql/proto-graphql-js/tree/main/packages/protoc-gen-pothos)
by [Masayuki Izumi](https://twitter.com/izumin5210)
- [@smatch-corp/nestjs-pothos](https://github.com/smatch-corp/nestjs-pothos) by
[Chanhee Lee](https://github.com/iamchanii)

## Templates and Examples

- [Pothos GraphQL Server](https://github.com/theogravity/graphql-pothos-server-example) by
[Theo Gravity](https://github.com/theogravity)
- [GraphQL countries server ](https://github.com/gbicou/countries-server) by
[Benjamin VIELLARD](https://github.com/gbicou)

## Conference talks

- [Pothos + Prisma: delightful, type-safe and efficient GraphQL](https://www.youtube.com/watch?v=LqKPfMmxFxw)
by [Michael Hayes](https://twitter.com/yavascript)

## Paid tools

- [Bedrock](https://bedrock.mxstbr.com/) by [Max Stoiber](https://twitter.com/mxstbr)
- [nytro](https://www.nytro.dev/) by [Jordan Gensler](https://twitter.com/vapejuicejordan)
18 changes: 9 additions & 9 deletions website/util/build-nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import matter, { GrayMatterFile } from 'gray-matter';
import { TableOfContents, TableOfContentsEntry } from '../components/Toc';

const navOrder: Record<string, string[]> = {
'@root': ['Overview', 'Sponsors', 'Guide', 'Plugins', 'Migrations', 'Design', 'API'],
'@root': ['Overview', 'Sponsors', 'Resources', 'Guide', 'Plugins', 'Migrations', 'Design', 'API'],
Guide: [
'Objects',
'SchemaBuilder',
Expand Down Expand Up @@ -95,14 +95,7 @@ export function buildNav(): TableOfContents {
const sorted = [...entries].sort((a, b) => (a.data.menu ? 1 : -1));

sorted.forEach(({ path, data, menu, name, link, description, title }) => {
if (!menu) {
nav.entries.push({
name,
title,
link,
description,
});
} else {
if (menu) {
const menuEntry = nav.entries.find((entry) => entry.name === menu);

if (!menuEntry) {
Expand All @@ -119,6 +112,13 @@ export function buildNav(): TableOfContents {
link,
description,
});
} else {
nav.entries.push({
name,
title,
link,
description,
});
}
});

Expand Down

1 comment on commit 5ac6147

@vercel
Copy link

@vercel vercel bot commented on 5ac6147 May 30, 2023

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.