diff --git a/website/pages/docs/resources.mdx b/website/pages/docs/resources.mdx new file mode 100644 index 000000000..843f21159 --- /dev/null +++ b/website/pages/docs/resources.mdx @@ -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) diff --git a/website/util/build-nav.ts b/website/util/build-nav.ts index 7d6061b5c..9f72949c8 100644 --- a/website/util/build-nav.ts +++ b/website/util/build-nav.ts @@ -4,7 +4,7 @@ import matter, { GrayMatterFile } from 'gray-matter'; import { TableOfContents, TableOfContentsEntry } from '../components/Toc'; const navOrder: Record = { - '@root': ['Overview', 'Sponsors', 'Guide', 'Plugins', 'Migrations', 'Design', 'API'], + '@root': ['Overview', 'Sponsors', 'Resources', 'Guide', 'Plugins', 'Migrations', 'Design', 'API'], Guide: [ 'Objects', 'SchemaBuilder', @@ -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) { @@ -119,6 +112,13 @@ export function buildNav(): TableOfContents { link, description, }); + } else { + nav.entries.push({ + name, + title, + link, + description, + }); } });