How to construct complex data declaratively and progressively?

Python devs split: new tool vows easy API data, critics say it's just GraphQL

TLDR: Pydantic-resolve pitches an easier, declarative way to build complex API data in Python and even claims it can replace GraphQL, now with relationship diagrams in v2. The community is split between excitement over simpler code and frustration about dropped old support and unproven performance claims—making it a hot, contentious launch.

A new Python library, pydantic-resolve, claims it can build complex app data step by step—no messy “glue code”—and even replace GraphQL. For the uninitiated, GraphQL is a way to ask servers for exactly the data you want. The crowd? Absolutely divided. Fans are thundering that declarative data (writing what you want, not how to get it) finally lands in Python without the extra server setup. Skeptics clap back: “This is just GraphQL wearing a Python hoodie.” One camp swoons over v2’s support for ER diagrams—simple maps showing how things relate—saying onboarding will be so much easier. Another camp grumbles about dropping old support: pydantic v1 and dataclasses are out, cue migration headaches. FastAPI folks are vibing with the pydantic-resolve on PyPI hype and the dependency visuals via fastapi-voyager, while Django fans mutter, “Where’s DRF in this story?” Meanwhile, performance claims spark mini flame wars: believers post snappy demos; doubters demand real benchmarks, not vibes. Memes abound—“GraphQL killer of the week,” “Glue code is canceled,” and a tombstone reading “RIP dataclasses.” The spiciest take? Calling it “GraphQL without the baggage” versus “GraphQL without the ecosystem.” And yes, someone asked if the resolve_* methods can also resolve office sprints—cue nervous laughter.

Key Points

  • Pydantic-resolve offers a declarative, progressive way to construct complex API data, aiming to reduce imperative glue code.
  • Version v2 adds ERDiagram support for declaring application-level entity relationships; Pydantic v1 is dropped starting in v2.0.0.
  • The library integrates with FastAPI, Litestar, and Django Ninja; FastAPI schemas can be visualized with fastapi-voyager.
  • Core features include resolve_{field} methods for on-demand fetching, post_{field} for post-processing, and cross-layer node data transmission.
  • Basic and advanced usage include DefineSubset for field selection, Loader/Resolver for efficient related data fetching, and APIs like ExposeAs and SendTo.

Hottest takes

“Congrats, you rebuilt GraphQL in Python—minus the ecosystem” — cache_me_outside
“Declarative data without glue code? My manager just fainted” — sprint_skeptic
“Dropping Pydantic v1 without migration tooling is a vibe” — legacyLarry
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.