Skip to content

Facing issues in @stream directive #7744

Closed Answered by ShubhamSharma1560
ShubhamSharma1560 asked this question in Q&A
Discussion options

You must be logged in to vote

I successfully resolved the issue.

The problem was that I hadn't specified the initialCount parameter in the @stream directive, which caused the response to return empty. After adding @stream(initialCount: 1), the functionality started working as expected, and I now receive responses incrementally.

Additionally, I noticed that my code works even without specifying the [StreamResult] directive. This suggests that the decorator might be redundant in this context.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ShubhamSharma1560
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant