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

UpdateQueries do nothing #35

Closed
Samuell1 opened this issue Feb 22, 2017 · 5 comments
Closed

UpdateQueries do nothing #35

Samuell1 opened this issue Feb 22, 2017 · 5 comments

Comments

@Samuell1
Copy link

Samuell1 commented Feb 22, 2017

Hey, i have some updateQueries to update apollo cache but doesnt work.

Maybe this is related to apollographql/apollo-client#1129 ?

Code:

        updateQueries: {
          animal: (previousQueryResult, { mutationResult }) => {
            return {
              animal: {
                ...previousQueryResult.animal,
                records: [mutationResult.data.createRecord, ...previousQueryResult.animal.records],
              }
            }
          }
        },
@Samuell1
Copy link
Author

@Akryum Any plans to update to new apollo 8?

@Akryum
Copy link
Member

Akryum commented Feb 24, 2017

It's planned.

@Samuell1
Copy link
Author

@Akryum
Copy link
Member

Akryum commented Mar 10, 2017

Yup! 😄

@Akryum
Copy link
Member

Akryum commented Mar 12, 2017

See #42

@Akryum Akryum closed this as completed Mar 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants