Graph database integration

Hi there, any advice for trying to get a Graph DB backend? I'm trying to do some network searching, would it just be easier to use Postgress Also can I connect more than one DB type. Eg SQL for logins but graph for friends
3 Replies
kapa.ai
kapa.ai8mo ago
Hi @Sterling1060. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. The knowledge sources provided do not contain specific information about integrating a Graph DB backend with Wasp. However, Wasp currently supports PostgreSQL databases and you can specify the database to use in the app declaration's db field. You would need to provide the server with the correct DATABASE_URL environment variable and ensure that the database is accessible from the server source (https://wasp-lang.dev/docs/advanced/deployment/manually#4-deploying-the-database). There's also an open issue discussing the exploration of new DB engines like MySQL, MSSQL, and similar source (https://github.com/wasp-lang/wasp/issues/1261). But there's no specific mention of Graph DBs. As for connecting more than one DB type, the sources do not provide information on this. For more detailed information, I would recommend checking the official Wasp documentation (https://wasp-lang.dev/docs) or reaching out to the Wasp community on their Discord server (https://discord.com/invite/rzdnErX). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Sterling1060, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
miho
miho8mo ago
You can of course connect to which ever DB you want from Node.js e.g. in the server.setupFn hook https://wasp-lang.dev/docs/project/server-config and then use it across your app! Some popular graph DBs are Neo4j, Memgraph. Dgraph... you can host them and them connect to them.
Server Config | Wasp
You can configure the behavior of the server via the server field of app declaration:
martinsos
martinsos8mo ago
What Wasp does is use Postgres as its main database. You can additionaly use a graph base next to it, as an additional database, which you would manually handle and that is perfectly fine. Postgres also has plugins that add it additional functionality, and quick googling tells me there is https://age.apache.org/ -> graph database for PostgreSQL, so maybe that is also interesting.
Want results from more Discord servers?
Add your server