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

[Testing utilities] Example with MSW #11709

Open
alessbell opened this issue Mar 20, 2024 · 1 comment · May be fixed by #11763
Open

[Testing utilities] Example with MSW #11709

alessbell opened this issue Mar 20, 2024 · 1 comment · May be fixed by #11763

Comments

@alessbell
Copy link
Member

Issue Description

Build an example of using proxiedSchema with Mock Service Worker using react-apollo-error-template.

Link to Reproduction

N/A

Reproduction Steps

No response

@apollo/client version

N/A

@alessbell
Copy link
Member Author

@jerelmiller and I had an interesting discovery related to some MSW tests yesterday in which several tests are sharing a client instance: the SuspenseCache was causing tests running serially using the same query in subsequent tests to do an initial render with the old data from the resolvers set in the previous test.

This is due to a setTimeout in the dispose function to work around an issue with strict mode. Jerel had an idea about how we may be able to remove the setTimeout since some of the logic around unsubscribing/resubscribing changed with the introduction of createQueryPreloader.

@alessbell alessbell linked a pull request Apr 5, 2024 that will close this issue
@alessbell alessbell self-assigned this Apr 5, 2024
@alessbell alessbell linked a pull request Apr 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant