Open wtrocki opened 5 years ago
Soon I will create a roadmap within github to highlight the macro themes that will be addressed by the individual libraries.
The architecture and related documentation will be extended and integrated according to the needs of the community.
As for the apollo libraries, the features introduced extend the original ones without altering the behavior of the client when the network status is online.
Yes. I like the idea. Any reason why users will need to use custom replication protocol in execute? I see that you can change this to use the same graphql mutations and url. I meant there could be some motivation for that use case, but overal framework will be much simpler if offline data will be replicated seamlessly they same way.
Are you familiar wityh the concept of the Apollo-link-queue? https://github.com/helfer/apollo-link-queue/issues/3
It could seriously simplify your library.
Soon I will create a roadmap within github to highlight the macro themes that will be addressed by the individual libraries.
This sounds amazing!
are you talking about link: httpLinkOffline in https://github.com/morrys/wora/tree/master/packages/apollo-offline#apollo-client-with-offline-options ?
Yes.
it is not mandatory to enter this option, by default the same link is used to execute mutations online.
I gave this opportunity just to give the possibility to insert custom logics for offline mutations. For example, different retry links, different error handling, payload check or all those needs that may arise based on the use case.
I could tell you a thousand possible solutions of use but without a requirement and / or a problem it is useless.
That is a really interesting approach. Is this global handler then or we can apply this with UI binding? Can I use Apollo
How enqueueing happens? When I hit client.mutate() and I'm offline do I get any response in promise or error or this will be blocked until the change is replicated to server?
I think I'm getting the entire framework slowly and this looks impressive.
Checked example: https://github.com/morrys/offline-examples/blob/master/apollo/todo/client/src/components/TodoOffline.js
It looks like there will be couple migration steps require to use it starting from vanilla Apollo application. It will be easy to avoid that IMHO assuming that offline mutations are not blocking.
Queuing occurs asynchronously and responds to the UI with the optimistic response. It does not keep the ui locked and absolutely does not wait for any response from the server.
Execution is performed in the background once the connection becomes available (and it is also possible to manage it manually).
Checked example: https://github.com/morrys/offline-examples/blob/master/apollo/todo/client/src/components/TodoOffline.js
this react component is the one I talk about in this comment: https://github.com/morrys/wora/issues/3#issuecomment-512357653
to use the library this class is enough:
https://github.com/morrys/offline-examples/blob/master/apollo/todo/client/src/apollo/index.js
and this:
https://github.com/morrys/offline-examples/blob/master/apollo/todo/client/src/app.js#L65-L68
as documented here: https://github.com/morrys/wora/tree/master/packages/apollo-offline#apollo-client
Can you provide more info how you see offline functionalities being developed and how you see future of this library going forward? Any info will be useful