BowlingX/ra-postgraphile

RFI: Possible to use 2 different databases?

caston1981 opened this issue · 1 comments

Hello,

I have forked Stephane-klein's example to the following:
https://github.com/affluent-bilby-classifieds/react-admin-and-postgraphile-playground

I have been making changes to suit the needs of my project which is to allow a burger restaurant to edit their menu from a dashboard.
I have extended the contacts database and have added instructions to import a menu from json into a jsonb field in postgres. This is in a separate database I have called "menudb". The contacts have just been imported into a database called "postgres" which was the default used in the initial project. I will change this down the track.

I want to ask how I would work with this separate (menudb) database. Am I making changes to the postgraphile configuration or extending the dataprovider configuration in react-admin?

This is more a generic question. Managing the underlying postgraphile instance is out of the scope of this project. You technically can have multiple database schemas supported with postgraphile. See here: https://www.graphile.org/postgraphile/usage-library/#api-postgraphilepgconfig-schemaname-options (schemaName).