fetchLinks only works for certain properties

I'm creating a blog here at Circuit, and we have two attributes inside the article custom type that are content relationships. One is called author, and the other is called primary_category. So I'm trying to use fetchLinks to get this data when requesting an article, but only the data of author comes from the API when I request it. I can't get any data from primary_category.

If I had to guess, I would say that fetchLinks is not working for properties with an underscore in the name, but I don't know.

3 Likes

Hello Rafael,

Welcome to the Prismic community, and thanks for reaching out to us.

FetchLinks works appropriately with the API ID that contains an underscore. However, some limitations exist in using fetcLinks, like if you have both fields as the Rich Text field, it only retrieves the first element. In that case, we recommend using the advanced version of fetchLinks graphQuery.

Can you please check the field type in your repository?

Thanks,
Priyanka