In this example, I am logged in to the site because I can see the logout button and dashboard.
The whoami query does not return the body, which contains the query to retrieve a user details because it is protected by the security identity feature.
The get_menu_public query returns the body of the query because it is not protected by any security identity or security restrict features.
While this is a great feature for non-restricted data, it does not appear to work for restricted data or data only users logged in can see.
Could it be that because I use libraries for my server restrict actions be causing the issue? I have various library folders with the different security restricts used and "include" them on the server action. I use libraries to save time from repeated use.