Merged
Conversation
kishorepran
approved these changes
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request overview
Fix feeding expiration flow — prevent negative timer and incorrect rejection logic
Problem
After the feeding countdown elapsed (~1 hour), the app displayed a negative time and the feeding was not automatically cancelled.
UI elements intended only for the pre-feeding state became visible, while the feeding itself remained active.
Root cause: the expiration flow was incorrectly using the reject feeding operation instead of the dedicated backend expiration mechanism.
This triggered a chain of failures that prevented the feeding from being cancelled.
Summary
This PR replaces the incorrect rejection flow with the proper expiration flow aligned with backend logic.
Key fixes:
expireFeeding) for automatic expirationRoot Cause Analysis
1) Wrong operation used (Reject vs Expire)
The app attempted to auto-cancel feeding using:
rejectFeedingHowever, backend restrictions allow rejection only by:
As a result, the request consistently failed:
Automatic expiration must instead use:
expireFeedingwhich is designed specifically for timeout scenarios.
2) Incorrect identifier usage
The previous implementation used a feeding point ID when fetching the feeding entity, causing the query to return
niland abort the flow.Correct behavior requires using the feeding ID.
3) Invalid GraphQL input payload
The rejection mutation sent malformed data that did not match the backend
FeedingInputschema:imagessent as a single string instead of[String]createdBy,updatedBy,owner) sent as string"null"instead ofnullidandfeedingPointFeedingsIdThese inconsistencies caused conditional failures inside the Lambda resolver.
4) Backend conditional checks
Even with corrected IDs, the rejection mutation still failed due to authorization rules enforced in the resolver transaction.
Expiration must bypass moderator-only constraints and be processed via the dedicated expiration operation.
Changes
processRejectFeeding→processFeedingExpiration🧠 How it works (High level)
expireFeedingmutation is sent to backendHow to test
Automatic expiration