trpc-query-used-for-write-violates-idempotency-contract
In tRPC, query procedures map to GET semantics and must be idempotent reads; using a query to trigger side effects (e.g., creating notification rows, sending reminders) is a contract violation. The TaskFlow reminders endpoint was a query that wrote notifications, meaning reminders only fire when a user manually opens the app and the endpoint is hit. Any background trigger (cron, webhook) that needs to write must be a mutation.
Related
- trpc-query-writing-side-effects-breaks-idempotency
- trpc-query-procedures-must-be-idempotent-reads-only
- trpc-query-procedure-used-for-side-effecting-writes
- trpc-query-procedure-must-not-perform-writes
- trpc-query-with-write-side-effects-breaks-idempotency
- trpc-query-procedures-must-not-write-data
- trpc-query-used-for-write-violates-idempotency
- trpc-query-procedure-performing-writes-contract-violation
- trpc-query-that-writes-violates-idempotency-contract
- trpc-query-used-for-write-cron-notification-never-fires
- trpc-query-that-mutates-state-antipattern