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

default discord avatar
2 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)

  • discord user avatar
    Payload Team
    last month

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

  • default discord avatar
    last month

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

  • default discord avatar
    4 weeks 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.