Skip to content

Relation directives with paginator duplicates data with non-unique foreign keys #2251

@mostafa-rz

Description

@mostafa-rz

Describe the bug

When there is a custom FK in a relation that the FK is not unique, the data will be duplicated. Without a paginator the data is correct.

Expected behavior/Solution

The PaginatedModelsLoader union part, must be optimized.

Steps to reproduce

  1. Run testQueryPaginatedHasManyWithNonUniqueForeignKey().

Output/Logs

Click to expand
# Add in log output/error messages here

Lighthouse Version

latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error within Lighthouse

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions