If you have specific needs, ideas, or suggestions for the new Field Picker in Content Relationship fields on Slice Machine, we’d love to hear from you!
This feature is designed to replace GraphQuery and fetchLinks, by letting you visually select which fields to retrieve — right from the Slice Machine UI.
Let us know what’s working well, what’s missing, and how it could better support your use cases.
For bugs or unexpected behavior, please contact support directly.
Use case suggestion template:
Feature Name: Short name for the feature.
Description: What it does and how you'd use it.
Impact/Benefit: Why it matters and how it would help.
Since using this feature the route resolver doesnt work anymore and creates errors. I am using it like this:
clientConfig: {
routes: [
{
type: 'article',
path: '/magazin/:category/:uid',
resolvers: {
category: 'category'
}
},
When activating this feature our whole production site crashes because every prismic request errors out!
We've been able to reproduce the issue and are working on a fix. In the meantime, you can always roll back to your previous content relationship configuration and your website should work again.
Are there plans to support selecting the slices in the linked content type? I am using graphQuery to do some sub menus on my sites so the header_menu has a content relationship to sub_menu which only has slices in it. When I try to select the slices they dont come up after updating to the newest slicemachine version.
I believe this approach to make menus was suggested in some prismic docs at some point, so I was hoping for this new feature to make that implementation easier. Looking forward to remove all graphquery stuff from my sites if this is supported.
Right now, you can’t select slices from a Content Relationship field.
That’s why nothing appears in the “Allowed type” selection.
For this use case (building menus with nested slices), we currently recommend sticking to the previous approach using GraphQuery to fetch the slices manually.
It’s still the most reliable method.
That said, we’re exploring a dedicated feature to better support menus and navigation structures. Your example helps reinforce that need, and we’ve noted it.
Let us know if you'd like to be updated when that feature is ready.
I really like the new Content-Relationships. Thanks for this useful new feature.
However, there seem to be something off with the generated TypeScript types.
Types of content-relationships are now generated as follows:
Quick question — have you updated Slice Machine and your adapter to the latest versions? We recently fixed several issues related to generated TypeScript types.
Here are the commands to run depending on your framework:
How do I test this new feature before I push it to production? When I update and save changes in slice machine locally, the API responses are unchanged. I assume I will need to push my slice machine changes to Prismic for the changes to take effect on the API, but wouldn't this break my Production website?
@ben.jackson Thanks for reaching out about this. You should be safe to push to production, and you can always undo your changes if your website breaks for any reason.
To see the changes in the API, you'll need to push your slice machine changes to Prismic, then publish something (anything) in your Prismic repo. Then the changes will appear.
Any content relationship that wasn't fetching data will continue to work as usual. Any content relationship that you are currently fetching data with using fetchLinks or graphQuery will also stay the same, because using either of those will override the new data fetching.
This means that you can progressively convert from fetchLinks or graphQuery. You can verify that the correct data is being fetched by running your query without fetchLinks or graphQuery. If everything looks good, then you can remove them from your queries in production and be good to go.
Let us know if you have any questions about this or anything else.