React native realm mongodb query and offline usage

We have a use case where user login will has list of products which can be shown even if not internet connection and i tried to achieve this using realm device sync (Flexible) using mongodb query (Aggregation) but it able to fetch products only when internet is available so my question is that is it possible with realm device sync that we sync products from mongodb using mongodb query and load even if there is no internet connection?

Below is sample code that i tried to integrate in our app

const config = {
	id: this.id
};
this.app = new Realm.App(config);

const credentials = Realm.Credentials.anonymous();
await this.app.logIn(credentials);


this.connection =  await Realm.open({
	schema: [Customer],
	sync: {
		user: this.app.currentUser,
		flexible: true,
		onError: (_session, error: any) => {
			console.log('sync error');
			console.log(error.name, error.message);
		}
	}
});

const mongodb = this.app.currentUser.mongoClient('mongodb-atlas');
const collectionUsers = mongodb.db('dev_database').collection('user_roles');

const pipeline = [{
	...
}];

const result = await collectionUsers.aggregate(pipeline);
// Get result when user is online but do not loads after i switch to offline