-
Notifications
You must be signed in to change notification settings - Fork 15
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
Serverless App demo. #141
Comments
Also a GraphQL example would be cool. |
GraphQL and Replicache don't really go together. The Replicache sync protocol takes the spot that GraphQL usually does. |
Interesting. For example, I used FaunaDB for an application and I interact with it using GraphQL. Does this mean that I cannot use Replicache for offline real time syncing? |
You would need to put an application server in front of fauna (perhaps a lambda would do) to implement the Replicache push and pull endpoints. See: https://doc.replicache.dev/how-it-works#the-big-picture. This is fairly easy to do. Additionally for each Replicache mutator (https://doc.replicache.dev/how-it-works#push) you need to implement the corresponding mutation code for Fauna. Most apps don't have a very large number of mutators so this isn't a big deal. |
Most people find Replicache easier to use than GraphQL 😂 so they don't really mourn the loss. Once you have sync setup you can kind of forget the server exists much of the time and program entirely on the client. |
Okay but as far as I understood these docs, it would be possible in my situation. Is this correct? I could implement pull and push endpoints and then just run graphql queries instead of sql on the server side. |
Yep, you could do that. |
Is it possible to get a SvelteKit (or NextJS, Nuxt ) PostgreSQL / Supabase demo?
The text was updated successfully, but these errors were encountered: