Giter VIP home page Giter VIP logo

Comments (9)

kingsleyzissou avatar kingsleyzissou commented on June 5, 2024 1

Okay after initial investigation, we will have to do a startReplication method on the server. I will drop a work in progress PR sometime today.

I need to defer the building of the graphql schemas until after we've applied the filter, but I will put some comments on the code to highlight this.

from offix.

wtrocki avatar wtrocki commented on June 5, 2024

CC @kingsleyzissou

from offix.

wtrocki avatar wtrocki commented on June 5, 2024

Generally we will need to be able to start replication separately to model setup.
So we might have startReplication method on model and this can be triggered from app/components itself.

from offix.

kingsleyzissou avatar kingsleyzissou commented on June 5, 2024

This is a good point, starting replication automatically might not be desired behaviour in most cases.

from offix.

kingsleyzissou avatar kingsleyzissou commented on June 5, 2024

@wtrocki

Regarding this, what I'm thinking of doing here is removing the replication config as a parameter to the setup model method here:

public setupModel<T>(schema: ModelJsonSchema<T>, replicationConfig?: ModelReplicationConfig) {

Then we can add another function called applyReplicationFilters where we can add filters to our replication config in React context and then init the datastore once that has been set. If no filters have been applied, we could use the default config at that point.

Do you see any downsides to this approach?

from offix.

wtrocki avatar wtrocki commented on June 5, 2024

How and when are we going to start replication? Would this mean that if someone doesn't add filter things will never replicate?

from offix.

kingsleyzissou avatar kingsleyzissou commented on June 5, 2024

The idea would be to start replication in context, but start it later. If a filter isn't provided, we can revert to the default config.
Alternatively, we could keep it as is and use the context to update the filters for the replication config for each model.

from offix.

wtrocki avatar wtrocki commented on June 5, 2024

Sounds like plan

from offix.

kingsleyzissou avatar kingsleyzissou commented on June 5, 2024

#1016 closes this issue

from offix.

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.