Has there been a change in type generation? Most of my types are now optional

default discord avatar
8 months ago

I can't explain why now most of my types are optional. Does anyone know? I briefly checked the release notes but I can't find something that might be related

The screenshot below shows just shows the the git-change if I update the file

Ok, the change was introduced in


- if I use


it does not happen

I guess:

check relationships indexed access for undefined (959f017)

  • default discord avatar
    7 months ago

    I believe this has been adjusted to be more accurate, have you updated payload recently?

  • default discord avatar
    7 months ago

    Sorry, I didn't regenerate the types, so I kind of postponed this issue - I'll check later this week

  • default discord avatar
    7 months ago

    I've noticied the same issue this morning after updating. A lot of my fields are now marked as optional where they weren't previously?

    Is there anyway with Payload to mark that these fields shouldn't be optional?

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!


Connect with the Payload Community on Discord



Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.