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

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

Closed
Labels
type: bug An issue or pull request relating to a bug in Gatsby

Comments

@pauleveritt
Copy link

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.

@wardpeet
Copy link
Contributor

@pieh it seems like you have most context about this

@wardpeet wardpeet added the type: bug An issue or pull request relating to a bug in Gatsby label Feb 18, 2019
@gatsbot gatsbot bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Mar 11, 2019
@gatsbot
Copy link

gatsbot bot commented Mar 11, 2019

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

Thanks for being a part of the Gatsby community! 💪💜

@pauleveritt
Copy link
Author

Not stale.

@lannonbr lannonbr added not stale and removed stale? Issue that may be closed soon due to the original author not responding any more. labels Mar 11, 2019
@freiksenet
Copy link
Contributor

@pauleveritt This might have been fixed in latest gatsby, I wonder if you could see if it works for you.

@pauleveritt
Copy link
Author

@freiksenet I just tried (albeit with @link) and it worked. Closing. Thanks for checking back!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment