-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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(gatsby-source-contentful): Add contentful_id field recursively #20258
fix(gatsby-source-contentful): Add contentful_id field recursively #20258
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
Thanks!
contentful_id
field recursively in gatsby-source-contentful
Published in |
} | ||
if (_.isPlainObject(val)) { | ||
return fixIds(val) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should account for circular references otherwise we'll get stack overflow errors. Probably also need a test with circular references.
This fix broke my code. We use some circular references. Perhaps it should be an option instead of the default?
|
Correct, I've been able to repro that upgrading to this version causes Maxmimum Callstack issue. |
--> #20313 |
Description
The gatsby-source-contentful fixIds method is recursively "fixing" contentful node ids, but only adding a contentful_id field one level deep.
Documentation
Related Issues
Fixes #15426