Comments (9)
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.
from offix.
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.
This is a good point, starting replication automatically might not be desired behaviour in most cases.
from offix.
Regarding this, what I'm thinking of doing here is removing the replication config as a parameter to the setup model method here:
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.
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.
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.
Sounds like plan
from offix.
#1016 closes this issue
from offix.
Related Issues (20)
- Action Required: Fix Renovate Configuration
- Reverting a offline mutation HOT 7
- Issue with nested objects in variables HOT 2
- Expose network status change HOT 3
- npm package seems out of date for react-offix-hooks HOT 2
- Docs concept page is blank
- Offline Search dgraph
- Error subbscribeToUpdate is undefined at react-native example project
- How offix supports File offline upload ? HOT 4
- Dependency Dashboard
- Add ability to build query that includes all relationships
- Please export ApolloQueryResult from offix HOT 2
- Getting error while build project HOT 1
- OfflineStore removeEntry expects v1:queue:yyyy but it's called with queue:yyyy HOT 3
- Interfaces versus Types generation HOT 1
- Aggregate Hooks Issue HOT 1
- Simplify Datastore flow HOT 4
- _super.call is not a function, with fix HOT 6
- rxDB integration / offix Limitations HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from offix.