api-patterns

Select REST, GraphQL, or tRPC for projects using decision criteria.

Updated Jan 26, 2026
One-click install
npx skills add https://github.com/TwuanMinn/fadelab --skill api-patterns-twuanminn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-patterns
Source: https://github.com/TwuanMinn/fadelab/tree/main/.agent/skills/skills/api-patterns
Command: npx skills add https://github.com/TwuanMinn/fadelab --skill api-patterns-twuanminn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Guides teams to pick the correct API paradigm (REST, GraphQL, or tRPC) and align it with project goals, data needs, and user demands to avoid over- or under-engineering APIs.

Core Features & Use Cases

  • Decision frameworks for selecting REST, GraphQL, or tRPC based on consumer profiles and data complexity
  • Guidelines for REST, GraphQL, and tRPC design, versioning, and pagination
  • Reference patterns and OpenAPI/OpenAPI-like documentation scaffolding to support adoption

Quick Start

Analyze your API needs and select the best-fit API style using the provided decision framework.

Frequently Asked Questions about api-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose between REST, GraphQL, and tRPC for my API design?

To choose an API design style, evaluate consumer needs, data complexity, and mutability using a decision framework that matches project goals to REST, GraphQL, or tRPC paradigms to prevent over-engineering APIs.

When should I use GraphQL over REST for complex data requirements?

Use GraphQL over REST when your API design involves highly complex data relationships and consumers need flexible querying capabilities, whereas REST excels for standardized, cacheable resource endpoints and simpler use cases.

What security and versioning patterns should I consider for REST and tRPC?

API design security and versioning patterns for REST and tRPC involve defining concrete scenarios for access control and endpoint evolution, ensuring stable consumer integration while mitigating vulnerabilities during data mutations.

Does this API design framework provide pagination guidelines for GraphQL and REST?

Yes, the API design framework provides specific pagination guidelines for both GraphQL and REST, ensuring efficient data retrieval by defining recommended patterns that handle large datasets without overwhelming consumers.

Can I generate OpenAPI documentation scaffolding after selecting an API style?

Yes, after selecting an API style, you can generate reference patterns and OpenAPI-like documentation scaffolding to support adoption, ensuring the chosen REST, GraphQL, or tRPC design is properly documented for consumers.

What are the limitations of using tRPC compared to REST for API consumers?

The limitations of using tRPC compared to REST include stronger coupling to the client stack, reducing compatibility with non-TypeScript consumers, making REST a better API design choice for broad interoperability across diverse platforms.