North Bay Python 2024

Magical (or not) GraphQL
2024-06-30, 14:25–14:50 (US/Pacific), Barn

Introducing Magql (pronounced "magical"), a framework for defining GraphQL APIs, including generating from SQLAlchemy models and integrating with Flask. Magql is extensible, looks familiar to developers who are used to Flask, and provides convenience on top of the "official" Python GraphQL library. I'll discuss why I decided to write this library, and how I went about it, including some of the technical challenges presented by GraphQL's complexity. GraphQL's nested schema and query language allows for some unique and weird possiblities compared to traiditional HTTP/REST APIs, and I'll show off some clever examples that demonstrate its potential. But that complexity can also lead to difficulties. Ultimately, the decision between GraphQL and REST is not clear cut, and this talk will also discuss some of our findings after using Magql and GraphQL in production, and where we want to go next.

Lead maintainer of Flask, Jinja, Click, and others on Pallets. Member of the Python community and PSF fellow. I also enjoy hiking, scuba diving, ultimate frisbee, and brewing beer.