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

Move PgContextPlugin into @dataplan/pg #1879

Merged
merged 5 commits into from
Dec 4, 2023
Merged

Move PgContextPlugin into @dataplan/pg #1879

merged 5 commits into from
Dec 4, 2023

Conversation

benjie
Copy link
Member

@benjie benjie commented Dec 4, 2023

Description

If you export your schema, you should still be able to use the withPgClient/pgSettings/etc on the GraphQL context. This is currently handled via PgContextPlugin, but if you import that from graphile-build-pg then you have to bundle all of graphile-build-pg and graphile-build into your serverless schema bundle... which sucks!

Solution: move this plugin into @dataplan/pg (which you'll need at runtime anyway) so your production config can pull in just this one plugin and not the entirity of graphile-build.

Performance impact

Improves bundled exported schemas by reducing dependencies, reducing parsing time and memory usage, and improving startup speed.

Security impact

None known.

Checklist

  • My code matches the project's code style and yarn lint:fix passes.
  • I've added tests for the new feature, and yarn test passes.
  • I have detailed the new feature in the relevant documentation.
  • I have added this feature to 'Pending' in the RELEASE_NOTES.md file (if one exists).
  • If this is a breaking change I've explained why.

Copy link

changeset-bot bot commented Dec 4, 2023

🦋 Changeset detected

Latest commit: 13be850

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
graphile-build-pg Patch
@dataplan/pg Patch
graphile-utils Patch
pgl Patch
postgraphile Patch
graphile Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@benjie benjie merged commit 6f0d187 into main Dec 4, 2023
24 checks passed
@benjie benjie deleted the move-pgcontextplugin branch December 4, 2023 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

1 participant