-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
Best way to add mongodb? #525
Comments
@vadimsg The kit is database-agnostic. It is examples of server-side modules, e.g. |
@Vlasenko Thanks for the reply! By the way maybe some one has a mini example for mongo server module or directions what is needed to be done, what to connect to include other db support so this kit works with it as good as with out of the box supported db. Looking at those different settings/configs for mysql, pg, sqlite that somehow work together with this kit and different libraries are not helping much at the moment as I'm new in so advanced scenarios and for each db are different approaches/settings how to use it with this kit. Would appreciate any sort of small list about what/where to connect, what to not forget etc. |
When I do some testing of another database in this Kit. I usually create a generic connector inside the folder "/src/server/sql/myCustomConnector.js". After that I only add in the module sql.js the path of this connector and make my calls normally. You do not even need to take the Knex out of the kit. You can use "/src/server/modules/myModule/sql.js" or modify the sql.js name to "mongodb.js" just for the sake of aesthetics. |
@MichelDiz Thanks a lot! |
@vadimsg Ware you able to make the |
@mitjade yes, thank you guys for tips. Great kit! |
@vadimsg Great! Would you be willing to make a PR or your solution? |
@mitjade Ok, I will try to make it when will have free time. |
@vadimsg Great! Thank you in advance. |
@vadimsg : Could you please post some example on how did you achieve on integrating with mongo? |
I had a look at the code (I want to integrate with Mongo as well) and the best place is probably here https://github.com/sysgears/apollo-universal-starter-kit/blob/master/src/server/modules/user/resolvers.js#L12
|
Hello there,
What would be the best way to add mongodb to this starter-kit? SQL will not do for my project.
Was looking in issues and was surprised no one was asking before it.
Thanks for any information!
The text was updated successfully, but these errors were encountered: