api
Installation
SKILL.md
API Engineering
Default Stack (Ask First)
Before applying anything, ask:
"Can I use FastAPI for this API? And should I use REST or GraphQL? I'll choose based on your app's complexity."
API Style Decision Rule:
- Use FastAPI REST when: the app is primarily CRUD, data is flat or lightly relational, a single known client (your own frontend) consumes it.
- Use Strawberry GraphQL when: multiple clients consume different data shapes, entities are deeply relational (User -> Orders -> Products -> Reviews), or a mobile client needs field-level data efficiency.
If unsure, default to REST. Migrating from REST to GraphQL is less painful than over-engineering a GraphQL schema for a simple CRUD app.
Progressive Disclosure
- Load
references/fastapi-rest.mdfor advanced REST patterns (pagination, filtering, OpenAPI customization). - Load
references/graphql-strawberry.mdfor GraphQL schema, resolver, and dataloader patterns.