Hi I currently have using the js sdk to retrieve a document using its uid. I'd like to get the contents of a linked document ( content relationship field ) in that same query as the uid document call.
Example:
const doc = await api.getByUID("profile", "myuid");
The above brings me back all the fields in this document but I also want to get to all the document fields inside any linked fields in doc.
I'l like to do something like.
const doc = await api.getByUID("profile", "myuid", { fetchLinkedDocuments });
I have seen examples of fetching linked fields based on their name but I want to return all the fields without having to list them.
In the link above can I use the helper getByUID in combination with the options object example:
const doc = await api.getByUID("profile", "myuid", {fetchLinks: ['article.title', 'article.description']});
But instead of having to know all the fields upfront is there a way to fetch all the fields ?