← All stories
● Covered by 1 source · 1 reportLow impact1 positive

Cobalt Introduces GraphQL from TypeScript Without Manual GraphQL Writing

🔄 Updated 2d ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • Cobalt generates GraphQL schemas from TypeScript code.
  • It offers tRPC-like speed and GraphQL flexibility.
  • Addresses REST endpoint fatigue and GraphQL double declaration.
  • Provides magnetic type safety and zero-config SDKs.

Introducing Cobalt

Cobalt is a new framework designed to provide GraphQL capabilities directly from TypeScript, without requiring developers to write GraphQL schemas manually. The framework positions itself as a solution that combines the benefits of existing API paradigms while mitigating their drawbacks.

Addressing API Development Challenges

The framework aims to solve common issues found in REST and pure GraphQL implementations. For REST, it tackles 'endpoint fatigue' and 'over-fetching' by offering a single endpoint where clients specify data needs. For GraphQL, it resolves the 'double declaration problem' where TypeScript interfaces, GraphQL schemas, and resolvers must be manually synchronized, which can lead to application crashes if they drift.

Cobalt's approach is to use TypeScript code as the single source of truth for the schema, removing the need for client-side codegen steps or schema synchronization.

Comparison with tRPC

While tRPC is noted for its speed, Cobalt identifies a 'tight coupling trap' where backend logic can leak into the client bundle, complicating scaling to microservices or exposing public APIs. Cobalt proposes 'loose coupling' with 'magnetic types', where the schema acts as the contract, allowing for faster development and scalability for complex backends.

Core Features and Benefits

Cobalt emphasizes 'magnetic type safety', where logic is defined once, the schema is inferred, and an SDK is generated with types bonded across the network boundary. It also aims to reduce boilerplate by generating the transport layer, eliminating the need for manual controllers, serialization, and service layers.

The framework is also described as 'LLM Friendly' due to its dense, collocated code, which can reduce context window footprints for AI assistance and lower token costs. It provides 'zero-config SDKs' that are fully typed, removing the need for manual GraphQL query writing.

✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →

The daily brief

One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.

One email a day. Unsubscribe in one click, any time.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~4 min · 3 stories · Nov 26

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Reporting from

Cobalt is a new framework that allows developers to use GraphQL features directly from TypeScript code, eliminating the need to write GraphQL schemas manually. It aims to combine the iteration speed of tRPC with the flexibility of GraphQL, addressing issues like endpoint fatigue in REST and the double declaration problem in pure GraphQL.