So I know that the nextjs slicemachine is still in beta and this might not have a (clean) solution yet.
I'm trying to create nested relationships to children
slice.data.custom_type.data
Unfortunately, I can't see a way to resolve this. The nextjs docs point to the fetchlinks page, but this uses a different approach to fetching data than if you use nextjs slicemachines.
This topic mentions a params option on <SliceZone>, but that appears to be vue only - it's the same issue otherwise however
How would I go about fetching child relationship data using nextjs and slicemachines?
I had a similar issue with NextJS unfortunately fetchLinks has never worked for me so far.
As an alternative, when I get the whole document, I can get access to the child relationship UID, I then simply use the GetByUID query to get the data from the child.
(note that I am using "locale" because my app is translated but you can omit this part if you have only one language)
From there I have my whole document (Page) available, with its nested relation (category).
So I would simply refetch a second time but with the variables from my doc const.
This is based on their slicemachines walkthrough, but as far as I can tell it doesn't accept other params (I've been playing with it but can't find a way to make it do what we need).
I love slicemachines but I often find when working with prismic features that the wind is taken out of my sails due to incomplete/outdated/poorly structured documentation.