fl-query icon indicating copy to clipboard operation
fl-query copied to clipboard

refreshInfiniteQueries and refreshQueries not working after mutation

Open wagnercsfilho opened this issue 2 years ago • 0 comments

After calling the mutation, the refreshInfiniteQueries and refreshQueries are not effectively refreshing the related queries.

Example:

final query = useInfiniteQuery<List<Post>, dynamic, dynamic>(
  "following-feed",
  ...
);

final mutation = useMutation<void, dynamic>(
  mutationKey: 'create_post',
  refreshInfiniteQueries: ['following-feed'],
  ...
);

Expected Behavior: After a successful creation mutation, the 'following-feed' query should be refreshed automatically. Ensure that the refreshInfiniteQueries configuration is correctly set and the query is properly identified.

Environment: Flutter: 3.16.2 fl_query: 1.0.0 fl_query_hooks: 1.0.0

wagnercsfilho avatar Dec 05 '23 00:12 wagnercsfilho