Skip to content

Mappings don't support 1:N on reverse relationships #11838

@pauleveritt

Description

@pauleveritt

Description

When using a mapping in gatsby-config.js, reverse relationships work as described in the docs but only for a 1:1 relationship. A 1:N relationship doesn't return an array, it just returns a single value.

This was discussed also in #11151

Steps to reproduce

Here is a reproducible repo that illustrates the bug as well has links to a video illustrating it.

Expected result

When expanding the node in a page query, I should get an array of items. Meaning, it should work the same as a forward relationship for 1:N.

Actual result

I only get a single value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugAn issue or pull request relating to a bug in Gatsby

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions