Comments (10)
What particular parts of the documentation are problematic?
We are actually working on improving documentation and sample app so any feedback is more than welcomed.
Offix is used in https://github.com/aerogear/ionic-showcase.
Demo video: https://www.youtube.com/embed/CrYinCtTHds
from offix.
Also worth note that we going to integrate with the Apollo 3.0 in upcoming releases that address pagination issues.
from offix.
@Hasan-git since the 0.9.0 release it's now possible to directly pass in your own InMemoryCache
instance into OfflineClient
.
const cache = new InMemoryCache();
const offlineClient = new OfflineClient({
httpUrl: https://example.com/grapqhl,
cache
});
We haven't got many test cases around how OfflineClient will behave using different cache instances with custom configs. If you could try that out and let us know how it works for you that would be great. If you have specific use cases and configurations in mind we could work to get some tests covering those.
from offix.
All human beings will be thankful for your efforts
Ionic showcase is a very good as startup.
What particular parts of the documentation are problematic?
We are actually working on improving documentation and sample app so any feedback is more than welcomed.
Offix is used in https://github.com/aerogear/ionic-showcase.Demo video: https://www.youtube.com/embed/CrYinCtTHds
from offix.
how to add links and configure inMemoryCache ( cacheRedirects and dataIdFromObject ).
from offix.
So currently we creating a client for developers. Adding links is possible only by overriding the init method of the ApolloClient. However, we are hoping to extract links in the coming week so it will be available to be used with existing clients.
from offix.
the Query "allTasks" accepts argument ( first : Int ) imagine we are providing this query with arg value.
@ ROOT_QUERY
- allTasks({ "first" : 1 })
- allTasks({ "first" : 2 })
- ...
how could updateQuery handle this situation.
In my case I am using pagination with arguments (filter, limit, page, sortBy, direction) then the queries should be invalid and out of date. But, in case the application is offline it should be able to resolve the query from store !?
I was thinking about invalidating the related queries, then any new request will pass through InMemoryCache "cacheRedirects" where I can get all items from store, the issue that I should loop over the whole cache to get the stored items by typename and then be able to resolve the data and build the query according to query arguments. but looping over the whole cache is not ideal and will cause performance drawbacks when the cache is growing and getting larger and larger.
from offix.
In my case I am using pagination with arguments (filter, limit, page, sortBy, direction) then the queries should be invalid and out of date. But, in case the application is offline it should be able to resolve the query from the store !?
I think we need to have another issue (this one is about documentation) where we will ask for the team to provide support for pagination which is actually really tricky to get now and it will require some heavy lifting on the developer side.
We had some use cases for Pagination but they were always business case specific,
which is really tricky to get right.
I think we can threat paginated results separately (by not caching them as other things by variables but only by globals. Then this means that we will be able to do client-side pagination on top of the data
I think for we also need to have a separate cache update helper for pagination and document pagination case separately. This is something that definitely is in our roadmap.
Do you mind creating a separate issue for that so we can address those issues faster?
We hit so many issues with InMemoryCache so I think from now on we probably going to fork it to this repository and address the issues.
ping @StephenCoady @darahayes
from offix.
To implement that:
I will use cacheRedirects:
Operate on the root object and ignoring the pages.
Have some simplified equivalent of the pagination.
This will also require us to always cache the data on a query without any arguments which is not supported now by our out of the box cache helpers. We can wait until our team will figure that out or you can try to hack something that will satisfy your needs.
Pagination is tricky and since there could be many business requirements to do it. It is hard to do it on a generic level. However, we can try to provide some helpers that will assume some format of pagination that should work for the cases where users can adjust their API to accept it.
from offix.
Closing this for now as it's possible to create and configure your own cache instance. Feel free to reopen if needed.
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
- Ability to provide late binding for datastore queries. HOT 9
- 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.