-
Notifications
You must be signed in to change notification settings - Fork 201
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
Circular-references in returned entry #1893
Comments
Having the same issue. But I use include: 2. I get: I tried to find simular tickets with solutions. But all is closed due to inactivity. |
Still facing this issue, and it is making it impossible to pull any entries from a contentType that links to other pages, because those pages can reference the contentType that links to other pages. Which in turn makes it impossible to pull the pages themselves, since they can contain the other contentType to link to other pages. I've tried solutions where I'm trying to trim out everything but the If there were some way to say that the "Link," contentType should only ever grab like, its text field, and its |
If it helps anybody, I used json-cycle to convert the circular references into static keys that can be represented in object notation, then again in the client to repopulate the circular references. |
Expected Behavior
When getting a resolved entry I'm expecting it to be free of circular references. (I also tried getEntries but same problem)
Actual Behavior
I'm getting an object with circular-references, for testing I'm trying to do
JSON.stringify
forcurrentEntry
resolving in:My entry (Article) has a field
relatedArticles
that has the following circular reference:There is not really any documentation about this, in earlier versions there was
toPlainObject
that was supposed to fix this but It never worked, thus the upgrade of version... I've been looking into this issue but not success...Possible Solution
Add some documentation regarding this. I tried mimicking "fixes" from the linked issue above but from what I can tell that is implemented in this version of the SDK already?
Steps to Reproduce
getEntry
orgetEntries
to get that entry (with include 10)JSON.stringify
Context
I'm trying to keep a copy of our (resolved) contentful entries in dynamodb.
Environment
The text was updated successfully, but these errors were encountered: