GraphQL not showing a relation ship value but REST API working as intended

default discord avatar
miguderp
4 months ago
4

Hey 👋



Kind of a small thing but I didn't want to spam #general with that.


I have a collection with a relationship field to another collection. I correctly see the value through REST API but it's not showing in GraphQL.



Am I missing something?




In terms of

access

, everything is public (

() => true

) and I assume I can read it with the payload client as well

  • discord user avatar
    jmikrut
    Payload Team
    4 months ago

    hmm, well, i see that you are using custom IDs, is that correct?

  • default discord avatar
    miguderp
    4 months ago

    yes, I'm syncing with an external API so I use their IDs to create/update



    and both collections have that treatment

  • discord user avatar
    jmikrut
    Payload Team
    4 months ago

    can you try this same thing on a collection that is not using custom ID?



    i don't know why it would be that... but if you do indeed have open access control, i am not sure what else it could be



    if you can create a minimally reproducible repo, i can help here further

  • default discord avatar
    miguderp
    4 months ago

    will do thanks, a bit on a deadline now so I'll try to find a workaround but I'll check later on if it was something wrong with my setup that I can reproduce



    I don't have collections that don't use a custom ID but for what it's worth and weirdly enough, another relationship between two collections with custom IDs seem to work as intended (

    Produits

    &

    Marque

    )

    image.png
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.