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

Fix bug in relational polymorphism where the polymorphic relations were nonsensically added to concrete types #2149

Merged
merged 8 commits into from
Aug 7, 2024

Conversation

benjie
Copy link
Member

@benjie benjie commented Aug 7, 2024

Description

Fixes #2085

Performance impact

Negligible.

Security impact

Improvement?

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 Aug 7, 2024

🦋 Changeset detected

Latest commit: f28f6c6

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

This PR includes changesets to release 5 packages
Name Type
graphile-build-pg Patch
postgraphile Patch
graphile-utils Patch
pgl 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

@@ -588,6 +591,9 @@ export const PgPolymorphismPlugin: GraphileConfig.Plugin = {
for (const [relationName, relationSpec] of Object.entries(
relations,
)) {
// Skip over the polymorphic relations
if (polyRelationNames.includes(relationName)) continue;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FelixZY if you're interested; this was the fix.

@benjie benjie merged commit 7ef445d into main Aug 7, 2024
36 checks passed
@benjie benjie deleted the relational-polymorphism-relations branch August 7, 2024 11:47
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.

Derived types include selector for the derived types when using relational polymorphism
1 participant