3 ms·
Things will be very interesting if we treat each single rest endpoint as a GQL query. With static typing definition and OPENAPI, we can declare the response ty
by tangkikodo 2y ago
Things will be very interesting if we treat each single rest endpoint as a GQL query.
With static typing definition and OPENAPI, we can declare the response type first, and then borrow the concepts of resolver and dataloder to easily construct the response we want.
Using resolver and dataloader can iterate as fast as GQL, and after the requirement is stable, we can refactor each single endpoint on demand.
for FastAPI user, pydantic-resolve is developed for this purpose.
- peterldowns 2y agoYeah basically this!