trpc-query-that-writes-silent-reminder-anti-pattern
TaskFlow’s reminders.checkDueTomorrow was implemented as a tRPC query (GET) that writes notification rows as a side effect. Queries must be idempotent reads — writes belong in mutations. Additionally, using a query for reminder delivery means reminders only fire when a client manually hits the endpoint, not on a schedule. Cron-triggered mutations or background jobs are required for reliable time-based notifications.
Related
- trpc-query-procedure-performing-writes-contract-violation
- trpc-query-procedure-must-not-perform-writes
- trpc-query-used-for-side-effects-reminder-anti-pattern
- trpc-query-used-for-write-violates-idempotency
- trpc-query-procedure-used-for-side-effecting-writes
- trpc-query-procedure-used-for-writes-contract-violation