- Added: api-patterns, app-builder, architecture, bash-linux, behavioral-modes, clean-code, code-review-checklist, database-design, deployment-procedures, docker-expert, documentation-templates, game-development, geo-fundamentals, i18n-localization, lint-and-validate, mobile-design, nestjs-expert, nextjs-best-practices, nodejs-best-practices, parallel-agents, performance-profiling, plan-writing, powershell-windows, prisma-expert, python-patterns, react-patterns, red-team-tactics, seo-fundamentals, server-management, tailwind-patterns, tdd-workflow, typescript-expert, vulnerability-scanner - Updated README: skill count 179 → 223 - Added credit for vudovn/antigravity-kit (MIT License) Source: https://github.com/vudovn/antigravity-kit
1.1 KiB
1.1 KiB
API Style Selection (2025)
REST vs GraphQL vs tRPC - Hangi durumda hangisi?
Decision Tree
Who are the API consumers?
│
├── Public API / Multiple platforms
│ └── REST + OpenAPI (widest compatibility)
│
├── Complex data needs / Multiple frontends
│ └── GraphQL (flexible queries)
│
├── TypeScript frontend + backend (monorepo)
│ └── tRPC (end-to-end type safety)
│
├── Real-time / Event-driven
│ └── WebSocket + AsyncAPI
│
└── Internal microservices
└── gRPC (performance) or REST (simplicity)
Comparison
| Factor | REST | GraphQL | tRPC |
|---|---|---|---|
| Best for | Public APIs | Complex apps | TS monorepos |
| Learning curve | Low | Medium | Low (if TS) |
| Over/under fetching | Common | Solved | Solved |
| Type safety | Manual (OpenAPI) | Schema-based | Automatic |
| Caching | HTTP native | Complex | Client-based |
Selection Questions
- Who are the API consumers?
- Is the frontend TypeScript?
- How complex are the data relationships?
- Is caching critical?
- Public or internal API?