You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I replaced RESTful with RPC to illustrate my point better.
GraphQL plays pretty well on composing data with resolver and dataloader.
RPC (better with openapi) has a mature software ecosystem such as rate control, caching, monitoring etc.
and it has capable of generating clients from openapi.json
As a python / fastapi developer I got an idea one day that we can apply resolver and dataloader pattern into any class transforming library of a language which support typings
for example: pydantic.
so that we can declare complicated, deep, nest schema, and let resolver / dataloader handle the fetching process. (no worry about N+1 query).
and let RPC (openapi) ecosystem to generate client with types and method to clients.
I've setup a demo repo for this whole process, it includes:
define basic schema
compose complicated schema
define resolver and dataloader, if a loader return value meets the basic schema, then it can be inherited and extended.
this could be a simple alternative choice for API integration.
The text was updated successfully, but these errors were encountered:
allmonday
changed the title
Developer always compares RESTful and GraphQL, why not combine them together?
Developer always compares RESTful (or RPC) and GraphQL, why not combine them together?
Jul 26, 2024
allmonday
changed the title
Developer always compares RESTful (or RPC) and GraphQL, why not combine them together?
Developer always compares RESTful, RPC and GraphQL, why not combine them together?
Jul 26, 2024
allmonday
changed the title
Developer always compares RESTful, RPC and GraphQL, why not combine them together?
Developer always compare RPC and GraphQL, why not combine them together?
Jul 26, 2024
allmonday
changed the title
Developer always compare RPC and GraphQL, why not combine them together?
Developer always compare JSON-RPC with GraphQL, why not combine them together?
Aug 2, 2024
From my point of view:
GraphQL plays pretty well on composing data with resolver and dataloader.
RPC (better with openapi) has a mature software ecosystem such as rate control, caching, monitoring etc.
and it has capable of generating clients from openapi.json
As a python / fastapi developer I got an idea one day that we can apply resolver and dataloader pattern into any class transforming library of a language which support typings
for example: pydantic.
so that we can declare complicated, deep, nest schema, and let resolver / dataloader handle the fetching process. (no worry about N+1 query).
and let RPC (openapi) ecosystem to generate client with types and method to clients.
I've setup a demo repo for this whole process, it includes:
the whole can be progressive:
repo: https://github.com/allmonday/pydantic-resolve-demo
this could be a simple alternative choice for API integration.
The text was updated successfully, but these errors were encountered: