How do I refresh my repeater after data update (using backend Query)?

Hi, I am struggling to solve a refresh issue on my Repeater. I am displaying PrivateMembersData publicly so have had to create a Query in the backend with Suppress. It works perfectly. However, when I have a new sign up who registers their details, if I visit the Directory which has the repeater, the new information does not display. It is displaying the record in the repeater on my Editor but not on the live site. I have refreshed several times and both on PC and mobile the record does not show.

I don’t need it to automatically refresh, just as long as the directory page is reloaded, I would like the repeater to be re-populated.

If the user is not an Admin and you’re trying to expose info of others members, it won’t let you (for security&privacy reasons) unless you use suppressAuth (in the backend).

//backend. In the export function:
return query.find({suppressAuth: true})

Hi JD,
That part works:
"I am displaying PrivateMembersData publicly so have had to create a Query in the backend with Suppress. It works perfectly. "

I am having an issue after a new profile is created, I go to the directory and refresh page but the repeater does not load the new data?

My issue has nothing to do with permissions, but instead it just won’t update or query again the new data.

If I understand you correctly, when you view it in preview, the data is showing the most recent member that has signed up when you load the page, but when you’re on the live site, it doesn’t show the most recent members?

Can you also share the code you’re using for your query in the backend file? That would help guide us with a good suggestion for you.

That’s correct.

Here is my backend code which I call at the top of my onReady on my Directory page (I call it in the front end using async/await):


import wixData from 'wix-data';

export function bypassMemberPerm() {    
    
    console.log("Supp");
    let options = {
    "suppressAuth": true,
    }
    console.log(options);
    console.log("Supp1");
    
    return wixData.query("Players")     
    .include("region", "position")  
    .isNotEmpty("position")
    .isNotEmpty("region")
    .isNotEmpty("dateOfBirth")
    .isNotEmpty("footballClub")
    .isNotEmpty("preferredFoot")
    .limit(1000)        /
    .find(options)
    .then((results) => {
        console.log("cross");
        console.log(results);
        console.log("bar");
        
        if(results.totalCount>0){
            return results.items; 
            //+ "QUERY WORKS";
        }
        else{
            return "NORESULTS";
        }
        
        
    })
    .catch((err) => {
        let errorMsg = err;
    });

}

@yisrael-wix Could you assist with this?

What does it display when you refresh it?

@jonatandor35 weirdly it just seems to pull the data correctly now and I didn’t do anything to it. Is there normally such delays on wix datasets?