I am using tanstack-query and have dependent queries to do:
const { resourceId } = useGetResourceId(); // resourceId: number | null
const { data, loading, error } = useGetResourceData(resourceId);
How can I tell useGetResourceData hook to wait with API call to retrieve resource data, until I have valid resourceId from hook above?