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

faq: update apollo client cache suggestions #393

Merged
merged 2 commits into from
May 3, 2024

Conversation

alessbell
Copy link
Contributor

This is based on the guidance we now give in our own documentation (source). I started by basically quoting the section wholesale but would be happy to adjust the language as needed :)

Copy link

vercel bot commented May 2, 2024

@alessbell is attempting to deploy a commit to the MSW Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@kettanaito kettanaito left a comment

Choose a reason for hiding this comment

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

This is fantastic! Thank you so much for contributing this!

Copy link

vercel bot commented May 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
website ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 3, 2024 4:56pm

@kettanaito kettanaito changed the title Update faq.mdx faq: update apollo client cache suggestions May 3, 2024
@kettanaito
Copy link
Member

Hi, @alessbell 👋 I've made a few edits to your suggestions:

  1. Removed the quote because it's Apollo-specific explanation. The developer can learn more by following the link to Apollo docs, which I moved under the code snippet to be consistent with how we use "Learn more" links in our docs.
  2. Split the code snippet into two: the first one features the apollo-client.js, which is the same client you'd use in your app, keeping the makeClient so it's not a singleton. Then, another code snippet representing a test file, where makeClient is imported and a new Apollo client is constructed within the test block. This will help the developer orient where things are.

Let me know if those look okay to you! Once again, thank you for contributing this.

@alessbell
Copy link
Contributor Author

@kettanaito ++ on those changes, looks great to me! Thanks for making those updates :)

@kettanaito kettanaito merged commit 8319a7c into mswjs:main May 3, 2024
2 checks passed
@alessbell alessbell deleted the patch-1 branch May 3, 2024 19:05
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.

2 participants