I created a custom post type portfolio and called apiFetch inside the edit() method of the block to try and get data from /wp-json/wp/v2/portfolio. However, I only get empty reply or unauthorized error.
In my anticipated outcome, the block should dynamically retrieve and display existing portfolio posts.