Was queryHiddenFields recently removed from payload.find?

default discord avatar
thgh
7 months ago
13

It seems to be missing from the types

  • default discord avatar
    thisisnotchris
    7 months ago

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

    showHiddenFields
  • discord user avatar
    jmikrut
    Payload Team
    7 months 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
    7 months ago

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

  • default discord avatar
    jarrod69420
    7 months ago

    Yes

  • discord user avatar
    jmikrut
    Payload Team
    7 months ago

    with the local API, yes,

    overrideAccess

    is true by default



    but for GraphQL and REST, it is false

  • default discord avatar
    thgh
    7 months 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
    7 months ago

    access functions are allowed to query hidden fields, yes



    BUT



    the query will still be validated

  • default discord avatar
    thgh
    7 months 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.