Code Monkey home page Code Monkey logo

Comments (4)

osehmathias avatar osehmathias commented on July 26, 2024 1

I did try that by setting the ID to StoredValues and re-evaluating. Strangely, it didn't filter. However, I will try another method of setting the ID to selectively sync.

Happy to consider this closed.

from amplify-flutter.

Equartey avatar Equartey commented on July 26, 2024

Hi @osehmathias, could you please provide more context about your use case?

from amplify-flutter.

osehmathias avatar osehmathias commented on July 26, 2024

Hi @Equartey - thank you for the response!

The application allows clinicians and clients to interact with the data a client has created. You can also invite participants.

Participants are clients that have access to another client's account. This is used for family members and so forth.

Instead of using the owner field to grant participant access, I am using a group and an attribute on their Cognito object which indicates the clientID the participant has access to. This ID is used for querying.

When a participant is logging in, it's extremely slow because it's syncing the entire DB.

The ideal solution would be to use the owner field with multiple owners. However, this is not available in Amplify Flutter. #3388

Another solution could be to use the clientID attribute on the participant's Cognito object to selectively sync. However, it seems like once the Amplify DataStore configuration object has been set when the app first loads, it can't be modified.

I am curious if anyone knows a way to selectively sync with a variable that becomes available when a user has logged in.

from amplify-flutter.

Equartey avatar Equartey commented on July 26, 2024

Hi @osehmathias, appreciate the extra context.

If you're looking to change the selective sync during runtime, checkout this guide:

https://docs.amplify.aws/flutter/build-a-backend/more-features/datastore/sync-to-cloud/#reevaluate-expressions-at-runtime

from amplify-flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.