Pydantic-resolve – define relationships once, reuse across REST, GraphQL and MCP
pydantic-resolve is a declarative data assembly library for Pydantic. It eliminates N+1 queries with minimal code by combining the DataLoader pattern with Pydantic models. It also provides rich data transformation capabilities — including derived field computation, cross-layer data flow, and field subset filtering — covering the full pipeline from data loading to final response construction.
The core idea: mark missing fields with resolve_* , compute derived values with post_* , and let the Resolver walk the tree. As your project grows, repeated relationship wiring can be consolidated into an ER Diagram with AutoLoad , which also powers GraphQL and MCP generation.
Every page in the Guide section uses the same business scenario:
Once you understand the core model, these pages go deeper into specific areas:
Detailed signatures and parameters for all public APIs: