Update parameters of ObservedResults?

I came across this discussion stating that it’s not possible to have a dynamic filter in ObservedResult property wrapper. It suggests to filter in the view body instead.

But I was able to update the filter of the ObservedResult like this:

struct SomeView: View {
    @ObservedResults(SomeType.self, configuration: config) var objects
        
    func setFilter(_ filter: NSPredicate) {
        _objects.filter = filter
    }
    
    var body: some View { ... }
}

After reading the code it seems that ObservedResults was designed to make it possible to update the parameters, so I don’t see why this wouldn’t be the correct solution? Did I miss something?

Hey, I am sorry to bother you, but I can see from the posts I’ve been looking through that you are pretty knowledgeable on the MongoDB realm.

I am struggling to figure out how to make certain server functions only available for users that have been authenticated. I have two forms of authentication anonymous and email and password. I want it so that only email and password-authenticated users can make a query to add a product to the collection. I am using web SDK rn. Any help or direction would be greatly appreciated.