Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restart simulated streamed request on stream close #62

Merged
merged 2 commits into from
Jul 24, 2023

Conversation

phryneas
Copy link
Member

This would solve the situation where the server renders a useBackgroundQuery, but does not consume the queryRef, so the stream closes before the result can be transported over.

Comment on lines 46 to 47
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just to get the CI to shut up until #61 is merged - I'll remove that later.

Comment on lines +169 to +177
queryManager
.fetchQuery(queryId, {
...queryInfo.options,
context: {
...queryInfo.options.context,
queryDeduplication: false,
},
})
.finally(() => queryManager.stopQuery(queryId))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@phryneas phryneas force-pushed the pr/restart-chopped-off-queries branch from ce1fe39 to 7dad495 Compare July 18, 2023 12:19
@phryneas phryneas changed the base branch from pr/fix-missing-cleanup to main July 18, 2023 12:19
@phryneas
Copy link
Member Author

/release:pr

@github-actions
Copy link
Contributor

A new release has been made for this PR. You can install it with npm i @apollo/experimental-nextjs-app-support@0.0.0-commit-7dad495.

Copy link
Member

@jerelmiller jerelmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Copy link
Contributor

@alessbell alessbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@phryneas phryneas merged commit 2a21911 into main Jul 24, 2023
@phryneas
Copy link
Member Author

@phryneas phryneas deleted the pr/restart-chopped-off-queries branch March 6, 2024 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants