Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offline Sync Query (DeltaSync) #4

Open
robertpitt opened this issue May 19, 2019 · 7 comments
Open

Offline Sync Query (DeltaSync) #4

robertpitt opened this issue May 19, 2019 · 7 comments

Comments

@robertpitt
Copy link

robertpitt commented May 19, 2019

Hey,

Just looking at the redux persist/hydrate store, and feel as though the naming is a little off here, take a look at the following screenshot.

Screen Shot 2019-05-19 at 22 42 03

I would expect that AppQuery.{....} should contain the root operation, such as AppQuery. allCinemaDetails{ ... }.

@morrys
Copy link
Owner

morrys commented May 20, 2019

I have chosen the key nomenclature to better manage the garbage collector.
For which use case would you like to have the root operation information?

@robertpitt
Copy link
Author

The use case for the root operation would be to be able to pre-emptily execute so that we can have an offline sync scenario.

Example being

  1. Open Application
  2. The following query is executed
query OfflineSyncQUery {
   cinemas(param: 1, param: 2) {
      ...CinimaView_cinima
      ...CinimaContact_infomation
   }
}
  1. Once the sync is complete, navigating to the view CinimaView would call the QueryRenderer that will attempt to find cinemas(param: 1, param: 2) in the root operations, if it exists then it will be served without going to the network.

@morrys
Copy link
Owner

morrys commented May 20, 2019

Do you mean a scenario similar to "https://docs.aws.amazon.com/en_us/appsync/latest/devguide/tutorial-delta-sync.html"?

This is a theme that I am placing myself in the "https://github.com/morrys/react-relay-appsync" repository and at the moment the best hypothesis is its implementation in the refetchContainer (DeltaSyncContainer or QueryRendererSync).

@robertpitt
Copy link
Author

Hey, is it possible for us to connect on a slack channel somewhere I can send you some documents I wrote on the internal ideas we had for how we thought this solution would play out?

@morrys
Copy link
Owner

morrys commented May 20, 2019

There is the channel https://graphql.slack.com and you can write me a DM

@sibelius
Copy link
Collaborator

we can discuss these on #relay channel there

I think more people want to collaborate on this

@sibelius
Copy link
Collaborator

maybe this could help with delta sync

https://github.com/zth/relay-utils#createmissingfieldshandler

missingFieldHandlers

@morrys morrys changed the title Root Operations (Incorrectly serialised?) Offline Sync Query (DeltaSync) May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants