Say I have a bunch of entries of type Document in Contentful. Each of these has three fields:
Within body, we frequently use the entry-hyperlink type to link to other Documents. Suppose that each of these entries has a body containing roughly 1000 words and each contains 10 or more entry-hyperlinks.
In my component, it's handy to have some fields resolved for me. However, because _every_ field is resolved, including body, I end up with the unused full text content for all 10 hyperlinked references in page-data.json, bloating file size by 10x and producing warnings:
warn The size of at least one page context chunk exceeded 500kb, which could lead to degraded...
Total field resolution makes sense for embedded entries, but less so for hyperlinked ones. Not sure exactly what the fix would be (would schema customization work here?). Maybe the solution is adding a plugin option that prevents the resolution of certain field types (rich text, potentially long text) when creating rich text nodes for nodes with type 'entry-hyperlink'.
Would love to hear other's thoughts.
Hi @scnroy! You might be interesting in checking on https://github.com/gatsbyjs/gatsby/pull/24905 (and follow links to issues and comments from there). There is currently effort under way where you can specify what to resolve ( just not sure if this operates just on content types or also on rich-text "link" type). In any case you should be able to define small subset of the fields from the type - for hyperlink I guess some form of url/slug and title and maybe thumbnail image would make sense. Including everything (current situation) surely doesn't.
@axe312ger do you have any insights on this? Would your current work in progress handle this issue?
Oh, that's great! Happy to close this out if the fix is captured in that PR. I'll let @axe312ger confirm one way or another. V excited about those changes.
Yes #24905 should handle this properly :)
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鈥檚 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!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!
Thanks for being a part of the Gatsby community! 馃挭馃挏
If an issue is being worked on, do you typically wait until the PR is merged to close the issue or is it good enough that we've linked the two in discussion, even though the code that resolves the issue hasn't been shipped? Happy closing this, but want to make sure it isn't confusing for others who may be wondering about the status of the issue.
Hey there,
sorry we had some delays, but there is now a version for you to test. The whole change is breaking, thats why we are releasing a canary version before merging everything to master.
The new Contentful source plugin can be installed via npm i gatsby-source-contentful@next.
Migration instructions can be found here: https://github.com/gatsbyjs/gatsby/pull/25249
Would be amazing if you could confirm that the new version fixes your issue, or not.
Thanks,
Benedikt
Edit: To answer your question, usually we close when we merge to master. As this code is in another branch yet, the ticket remains open till its fixed in the stable version of Gatsby :)