Evaluate Mutation Results in Realtime Refresh Conditions & Support Mutation-Side Triggers
Currently, when configuring a refresh condition on a query, the condition can only evaluate the triggering mutation's variables and auth (uid/token). We cannot check the actual result (response) of the mutation.
This creates a significant friction point when mutations are executed from non-client environments, such as a Cloud Function triggered by another backend service (e.g., Firebase Storage). Because the Cloud Function executes without the end-user's auth context, the only way to accurately filter the query refresh is to pass the userId into the mutation's variables. This feels like an unnecessary workaround just to satisfy the refresh condition.
To make real-time cache invalidation cleaner and more robust for server-side triggers, you need
- Access to Mutation Results in Query Conditions
- Mutation-Driven Triggers: