KLR-PatternKLR-PatternOfficialยท1 Agent Skills Included

pydantic-resolve

Batch-load nested API data without N+1 queries

Assembles nested API response trees in Python by declaring missing fields with resolve and post methods. Eliminates scattered data-joining code, manual dictionary mapping, and N+1 query problems across services and routes. Exposes the same data model to REST, GraphQL, and MCP endpoints without rewriting business logic.
npx skills add KLR-Pattern/pydantic-resolve --all -g -y

All Skills in This Repository (1)

Pure Emerald Level Indicators

Frequently Asked Questions

FAQPage Schema
How to install pydantic-resolve?โ–ผ

Run `npx skills add KLR-Pattern/pydantic-resolve --all -g -y` in your terminal to install all skills in this repository globally.

How to avoid N+1 queries in FastAPI?โ–ผ

Declare related fields with resolve methods and batch loaders; the framework collects all load calls and runs one query per loader automatically.

What is the three-phase development pattern?โ–ผ

It guides projects from requirement confirmation, to schema and ER diagram modeling, to business methods with GraphQL, and finally REST and MCP endpoints.

Does pydantic-resolve work with SQLAlchemy and Django?โ–ผ

Yes. It includes built-in integrations for SQLAlchemy, Django ORM, and Tortoise ORM to auto-generate data loaders from model relationships.

Can I expose my data model as GraphQL or MCP?โ–ผ

Yes. The same entity graph can be served through GraphQL queries, REST routes, and MCP servers without duplicating business logic.

Related Repositories in Software Engineering

View All in Software Engineeringโ†’