devrsi0n / chirpy

💬 A privacy-friendly and customizable Disqus (comment system) alternate. 注重隐私保护和定制化的评论系统。
https://chirpy.dev
GNU Affero General Public License v3.0
555 stars 32 forks source link

Migrate to trpc #541

Closed devrsi0n closed 1 year ago

devrsi0n commented 1 year ago

Is your feature request related to a problem? Please describe.

GraphQL is good for teams with enough resources to develop backend/frontend separatedly, but for a small team, we consider trpc as a better option, since it's type safety and quicker database development flow

GraphQL cons for this project:

GraphQL related client side bundle sizes:

image image

And I really like react-query model to handle local cache to improve user & developer experiences.

And we plan to use planetscale as our hosted database, because of the low latency and convenient database branching development.

Migration blockers:

Solutions:

Describe the solution you'd like

Describe alternatives you've considered

Additional context

devrsi0n commented 1 year ago

Maybe migrate to react-query first, it should reduce the bundle size and leverage client cache. Related links: use subscription https://github.com/TanStack/query/discussions/1506