We are using the Prismic API to query our data through javascript. When querying a page we are retrieving slices from the body, in some slices there are content relationships within the slice repeatable zone but this only returns the id of the custom type the slice is linked to. Is there a way from retrieving all the data from the linked custom type without having to query the ID separately.
Query for context - client.query(Prismic.Predicates.at("my.product_page.uid", "test-product"))
In this case, you need to add fetchLinks option to get the required fields from the linked custom_type. The fetchLinks option allows you to retrieve a specific content field from a linked document and add it to the document response object.