Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Was queryHiddenFields recently removed from payload.find?

default discord avatar
thgh.2 years ago
8

It seems to be missing from the types

  • default discord avatar
    notchr2 years ago

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

    showHiddenFields
  • discord user avatar
    jmikrut
    2 years 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.2 years ago

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

  • discord user avatar
    jarrod_not_jared
    2 years ago

    Yes

  • discord user avatar
    jmikrut
    2 years ago

    with the local API, yes,

    overrideAccess

    is true by default



    but for GraphQL and REST, it is false

  • default discord avatar
    thgh.2 years 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
    2 years ago

    access functions are allowed to query hidden fields, yes



    BUT



    the query will still be validated

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

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.