graphile / crystal-pre-merge

Repository moved
https://github.com/graphile/crystal
39 stars 7 forks source link

Watch fixtures are a mess #166

Closed benjie closed 1 year ago

benjie commented 1 year ago

HT @TimoStolz

  1. Need a "superuserConnectionString" or similar to install them, probably.
  2. This maybe means that executors need a "superuser" mode. And maybe a "database owner" mode. These might be useful beyond this feature.
  3. Watch fixtures should be installed for each executor, not for each pgSource. (Maybe even figure out the unique databases that the executors relate to - e.g. turn them all into connection strings and then unique those?)
  4. The warning on failure should be more helpful.
benjie commented 1 year ago

Workaround: add this to your graphile.config.mjs:

  gather: {
    installWatchFixtures: false
  }

And install the watch fixtures yourself: https://github.com/benjie/postgraphile-private/blob/planning/graphile-build/graphile-build-pg/src/watchFixtures.ts

benjie commented 1 year ago

So pgSources on config refers to the database configuration: GraphileConfig.PgDatabaseConfiguration

It does not refer to the PgSource class from @dataplan/pg

This is hugely confusing. I'm going to rename pgSources to pgConfigs.