Was queryHiddenFields recently removed from payload.find?

default discord avatar
thgh
4 weeks ago
13

It seems to be missing from the types

  • default discord avatar
    thisisnotchris
    4 weeks ago

    I don't think I see this type either. I see others though, like

    showHiddenFields
  • discord user avatar
    jmikrut
    Payload Team
    4 weeks ago

    yes, I think it was accidentally documented and then never removed



    this had overlap with our security CVE



    it now just respects

    overrideAccess
  • default discord avatar
    thgh
    4 weeks ago

    Alright, and overrideAccess is true by default, so it is enabled?

  • discord user avatar
    Jarrod
    Payload Team
    4 weeks ago

    Yes

  • discord user avatar
    jmikrut
    Payload Team
    4 weeks ago

    with the local API, yes,

    overrideAccess

    is true by default



    but for GraphQL and REST, it is false

  • default discord avatar
    thgh
    4 weeks ago

    Can access functions always query all fields? (I think yes because I'm using it like that and noticed a typo since 1.7)

  • discord user avatar
    jmikrut
    Payload Team
    4 weeks ago

    access functions are allowed to query hidden fields, yes



    BUT



    the query will still be validated

  • default discord avatar
    thgh
    4 weeks ago

    Perfect đź‘Ť


    Only issue is that the error message was too vague, I hoped to find a trace to the exact problem in payload config.

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.