Open
Description
When using the Contentful API, and the include
is being used in the request, linked content has the possibility to not have field data if that linked content is in draft/deleted/archived status.
For instance, if there was a Page entry that linked to a Content entry, and the Content entry was in draft and the Page was not, there would be an undefined error for the following: page.fields.content.fields.title
. Generated interfaces should enforce type by making fields
and content
a union type with undefined
, where the following is now written: page.fields.content?.fields?.title
Metadata
Metadata
Assignees
Labels
No labels