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

How to write cache after mutations #3440

Closed
guendev opened this issue Sep 12, 2024 · 2 comments
Closed

How to write cache after mutations #3440

guendev opened this issue Sep 12, 2024 · 2 comments
Labels
question Issues that have a question which should be addressed

Comments

@guendev
Copy link

guendev commented Sep 12, 2024

Question

I am looking to implement cache management after a mutation, but I couldn’t find relevant documentation or examples for this use case in Apollo iOS.

Here’s what I am trying to achieve (similar to how I would do it in JavaScript with Apollo):

Steps in JavaScript:

  1. Query: MeQuery returns null.
  2. Perform: SignUp mutation returns { token: string, user: User }.
  3. Write: Update the MeQuery cache with data from the SignUp mutation.
  4. Recall: Re-execute MeQuery to reflect the updated cache.
@guendev guendev added the question Issues that have a question which should be addressed label Sep 12, 2024
@AnthonyMDev
Copy link
Contributor

Hi @guendev, documentation for local cache mutations can be found here. If you still have specific questions after reading those docs, please feel free to reply here with them.

@AnthonyMDev AnthonyMDev closed this as not planned Won't fix, can't repro, duplicate, stale Sep 13, 2024
Copy link
Contributor

Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo iOS usage and allow us to serve you better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Issues that have a question which should be addressed
Projects
None yet
Development

No branches or pull requests

2 participants