nowfound

Life & fun · February 3, 2022

PA

Pothos – a plugin based GraphQL schema builder for TypeScript

A plugin-based GraphQL schema builder for TypeScript. Define your types once and they flow into every resolver without codegen or decorators.

Pothos – a plugin based GraphQL schema builder for TypeScript launched on February 3, 2022 with 5 votes and more than 50% of that year's launches. The site was still online in September 2026, 4 years on.

What it does

Pothos is a plugin-based GraphQL schema builder for TypeScript. Define your types once and they flow into every resolver without codegen or decorators. At the scale of Airbnb, Netflix, and your weekend project. 1 import SchemaBuilder from '@pothos/core' ; 2 3 const builder = new SchemaBuilder <{ Context: Context }> (); 4 5 // Type the object by its backing model. 6 const User = builder .objectRef <{ id: string; name: string }> ( 'User' ); 7 8 User .implement ({ 9 fields : ( t ) => ({ 10 id : t .exposeID ( 'id' ), 11 name : t .exposeString ( 'name' ), 12 // user and ctx arrive typed — no annotations. 13 posts : t .field ({ 14 type : [ Post ], 15 resolve : ( user , _args , ctx ) => loadPosts…from pothos-graphql.dev

Does a similar job

all alternatives →

More life & fun this month

the category →

Source: Show HN post ↗

Launched alongside, February 2022

the whole month →
  • Bardeen▲1,286

    One-click automations for your repetitive tasks

    Growth · 2022 · bardeen.ai

  • Sha256 algorithm explained online step by step visually

    Life & fun · 2022 · sha256algorithm.com

  • Today, after years of research, development, and refinement EdgeDB graduates to a production-ready database. We are very proud to announce EdgeDB 1.0.

    Dev tools · 2022 · edgedb.com

  • Medusa▲893

    The open-source Shopify alternative

    Dev tools · 2022 · medusajs.com

  • Trusted ways to help Ukraine stop Russian aggression

    Life & fun · 2022

  • 100 ideas for your startup's first 100 users

    Growth · 2022 · first100users.com