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

Add syncGraphQL export #5

Closed
sgwilym opened this issue Aug 1, 2020 · 0 comments · Fixed by #11
Closed

Add syncGraphQL export #5

sgwilym opened this issue Aug 1, 2020 · 0 comments · Fixed by #11
Projects

Comments

@sgwilym
Copy link
Collaborator

sgwilym commented Aug 1, 2020

Add a function with the following signature to this package's exports:

syncGraphQL(storage: IStorage, graphqlUrl: string)

This would kick off a predefined GraphQL query to the provided GraphQL endpoint which would retrieve all the documents of the provided's IStorage's address. The function would then use the response from the GraphQL endpoint to pass documents along to ingestDocument.

It would also need to push all the documents from IStorage to the GraphQL endpoint. This would probably need a new push mutation intended for pushing many documents at a time.


For now this would be an inefficient sync like the base earthstar package has, but once the schema adds support for document filtering we can begin to open up efficient syncing methods.

@sgwilym sgwilym created this issue from a note in v3.0.0 (To do) Aug 1, 2020
@sgwilym sgwilym moved this from To do to In Progress in v3.0.0 Aug 4, 2020
@sgwilym sgwilym moved this from In Progress to To do in v3.0.0 Aug 4, 2020
@sgwilym sgwilym moved this from To do to In Progress in v3.0.0 Aug 4, 2020
v3.0.0 automation moved this from In Progress to Done Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v3.0.0
  
Done
Development

Successfully merging a pull request may close this issue.

1 participant