Skip to content

Commit

Permalink
feat(contentful): improve Rich Text field support
Browse files Browse the repository at this point in the history
* Allow circular references
* Improve performance and reduce RAM footprint
* Query referenced entries and assets via GraphQL

fixes #24221

BREAKING CHANGE:

* Entities references in Rich Text fields are no more automatically resolved
* Use the `raw` subfield instead of `json`
* Use GraphQL to define your referenced data with the new `references` field
* Removes the `resolveFieldLocales` as the new `references` field automatically resolves locales
* To render Rich Text fields unse the new `renderRichText()` function from `gatsby-source-contentful/rich-text`
  • Loading branch information
axe312ger committed Oct 16, 2020
1 parent 1496bf1 commit d4a9c8e
Show file tree
Hide file tree
Showing 6 changed files with 232 additions and 597 deletions.
1 change: 1 addition & 0 deletions packages/gatsby-source-contentful/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
"dependencies": {
"@babel/runtime": "^7.11.2",
"@contentful/rich-text-react-renderer": "^14.1.1",
"@contentful/rich-text-types": "^14.1.1",
"@hapi/joi": "^15.1.1",
"axios": "^0.20.0",
Expand Down
355 changes: 0 additions & 355 deletions packages/gatsby-source-contentful/src/__tests__/rich-text.js

This file was deleted.

Loading

0 comments on commit d4a9c8e

Please sign in to comment.