Skip to content
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

Overhaul makePgConfig and related interfaces #190

Merged
merged 15 commits into from
Feb 13, 2023
Merged

Conversation

benjie
Copy link
Member

@benjie benjie commented Feb 13, 2023

🚨 Breaking changes around types and postgres configuration:

  • GraphileBuild.GraphileResolverContext renamed to Grafast.Context
  • GraphileConfig.GraphQLRequestContext renamed to Grafast.RequestContext
  • Grafast.PgDatabaseAdaptorOptions renaed to
    GraphileConfig.PgDatabaseAdaptorOptions
  • @dataplan/pg/adaptors/node-postgres is now @dataplan/pg/adaptors/pg due to
    the bizarre naming of PostgreSQL clients on npm - we've decided to use the
    module name as the unique identifier
  • makePgConfigs:
    • is now makePgConfig (singular) - so you'll need to wrap it in an array
      where you use it
    • no longer exported by @dataplan/pg (because it depended on pg) - instead
      each adaptor exposes this helper - so import from
      @dataplan/pg/adaptors/node-postgres
    • accepts an object parameter containing
      {connectionString, schemas, superuserConnectionString}, rather than
      multiple string parameters
  • postgraphile CLI will now try and respect the adaptor stated in your preset
    when overriding connection arguments
  • Removed Grafast.RequestContext.httpRequest and instead use
    Grafast.RequestContext.node.req/res; all server adaptors should implement
    this if appropriate

…ration:

- `GraphileBuild.GraphileResolverContext` renamed to `Grafast.Context`
- `GraphileConfig.GraphQLRequestContext` renamed to `Grafast.RequestContext`
- `Grafast.PgDatabaseAdaptorOptions` renaed to `GraphileConfig.PgDatabaseAdaptorOptions`
- `@dataplan/pg/adaptors/node-postgres` is now `@dataplan/pg/adaptors/pg` due to the bizarre naming of PostgreSQL clients on npm - we've decided to use the module name as the unique identifier
- `makePgConfigs`:
  - is now `makePgConfig` (singular) - so you'll need to wrap it in an array where you use it
  - no longer exported by `@dataplan/pg` (because it depended on `pg`) - instead each adaptor exposes this helper - so import from `@dataplan/pg/adaptors/node-postgres`
  - accepts an object parameter containing `{connectionString, schemas, superuserConnectionString}`, rather than multiple string parameters
- `postgraphile` CLI will now try and respect the adaptor stated in your preset when overriding connection arguments
- Removed `Grafast.RequestContext.httpRequest` and instead use `Grafast.RequestContext.node.req/res`; all server adaptors should implement this if appropriate
@benjie benjie merged commit 36ea684 into planning Feb 13, 2023
@benjie benjie deleted the postgres-adaptor branch February 13, 2023 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant