You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.
Hello @remorses, this project is awesome, very easy set up and deploy. But I have one question, does mongoke supports mutations? I'm planning on creating a database from scratch for insertion and query. Many thanks in advance.
The text was updated successfully, but these errors were encountered:
Currently no, I created mongoke as a way to query your database from the frontend client, implementing mutations this way is an anti pattern, you would add a lot of complex logic in the client side, making the bundle size a lot bigger.
Another problem that arises when you implement mutations directly in the client is that usually you don’t mutate a single collection in database, but instead you change many resources (like change a user object and a blogPost object), if you mutate from the client there is the possibility that the database becomes inconsistent if all the mutations don’t end successful and there is no way you can handle the case the client disconnects
A better alternative is to implement mutations in a different api that talks directly to the database, this way you separate the complex logic from the client, making the code base cleaner
To connect the api you can use an Apollo federation gateway to connect the 2 services, check out the federation example in the examples directly
If you think mutations are useful I can maybe implement them and enable them via the configuration file with an option
Hello @remorses, this project is awesome, very easy set up and deploy. But I have one question, does mongoke supports mutations? I'm planning on creating a database from scratch for insertion and query. Many thanks in advance.
The text was updated successfully, but these errors were encountered: