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

Handle refetch of useAggregate at each record update #8755

Closed
ijreilly opened this issue Nov 26, 2024 · 0 comments · Fixed by #8885
Closed

Handle refetch of useAggregate at each record update #8755

ijreilly opened this issue Nov 26, 2024 · 0 comments · Fixed by #8885
Assignees

Comments

@ijreilly
Copy link
Collaborator

Scope & Context

Unlike we do with useFindManyRecords at recor dupdate, we cannot do optimistic rendering and write straight to the cache as we are not able to compute the new value for the aggregated queries.

Technical input

We could mirror the triggerCreateRecordsOptimisticEffect kind of callback to refetch the aggregate queries. Maybe with Apollo we can have a way to access the names of the queries to refetch.

@ijreilly ijreilly self-assigned this Nov 26, 2024
@charlesBochet charlesBochet moved this from 🆕 New to 🔖 Planned in Product development ✅ Nov 26, 2024
@ijreilly ijreilly moved this from 🔖 Planned to 🏗 In Progress in Product development ✅ Dec 4, 2024
@charlesBochet charlesBochet moved this from 🏗 In Progress to 👀 In review in Product development ✅ Dec 5, 2024
ijreilly added a commit that referenced this issue Dec 5, 2024
#8885)

Closes #8755.
Refetching the aggregate queries on an object following creation,
update, deletion of a record.
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Product development ✅ Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant