placeholderData can also be a function, where you can get access to the data and Query meta information of a “previous” successful Query. This is useful for situations where you want to use the data from one query as the placeholder data for another query.
https://tanstack.com/query/v5/docs/framework/angular/guides/placeholder-query-data

