feat(sdk): make initial fetch optional on subscriptions#524
feat(sdk): make initial fetch optional on subscriptions#524MartianGreed merged 2 commits intomainfrom
Conversation
📝 WalkthroughWalkthroughIntroduces an optional Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
e748a2c to
db3be30
Compare
Summary
Adds a
fetchInitialDataoption tosubscribeEntityQuery()andsubscribeEventQuery(). When set tofalse, the initialgetEntities/getEventMessagescall is skipped and only the gRPC subscription is opened.Closes #461
Changes
fetchInitialData?: booleantoSubscribeParams<T>interface (defaults totrue)subscribeEntityQueryto conditionally skip initialgetEntitiesfetchsubscribeEventQueryto conditionally skip initialgetEventMessagesfetchfetchInitialData: falsebehaviorUsage
Backward Compatibility
Default is
true, so existing code works without changes.Summary by CodeRabbit
New Features
fetchInitialDataflag to subscriptions, allowing you to skip initial data fetching and open only the subscription stream. Defaults to true for backward compatibility.Tests
fetchInitialDataflag behavior.