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

default discord avatar
wiesson
8 months ago
5

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

1.6.20

- if I use

1.6.19

it does not happen



I guess:


check relationships indexed access for undefined (959f017)

  • default discord avatar
    Jarrod
    7 months ago

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

  • default discord avatar
    wiesson
    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
    MRL
    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!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

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