Slice Machine 2.0 Release ⭐️

:warning:IMPORTANT​:warning:: this new release contain an important update for GraphQL API users, please read carefully before upgrading.

Hey! :wave:

Today's release is a bit special.

We are super excited and proud to announce the very first improvement of a large series of new modeling features: Groups in Slices.

Indeed, the team's current focus is to enhance Prismic's modelling capabilities, starting with Slices. See all plans here.

Why Groups in Slices?
We listened to our users and understood that in various cases, they needed to implement a design for Slices that contains multiple blocks of repeated content. Like this one :point_down:

image Screenshot from www.jasper.ai website.

The current implementation of the repeatable zone in Slices didn't allow to cover these use cases, so we decided to leverage a feature that our users know and use a lot: Group fields. And at the same time simplify the understanding of the structure of a Slice, by removing the repeatable and static zone.

:call_me_hand: Groups in Slices

  • All users can now use as many Group fields as they want in Prismic Slices, replacing the current repeatable zone for new Slices.
  • All Slices still using the repeatable zone are still supported and can add Group fields in their Static zone.

:warning: IMPORTANT :warning:: The team took the decision, that due to a really minor usage compared to our main REST API, this new version and the new modeling features will not support GraphQL queries. Existing setups will remain functional, and all website will not experience any disruptions. However, to leverage the new version of Slice Machine and create Slices using Group fields, we recommend to switch to REST API. Also note that you can still use Prismic GraphQuery API option that allows for nested and selective fetching with our REST API, following a similar GraphQL syntax. Learn more here.

:art: Responsive

  • We improved the UI of Slices Variation list to fit on smaller screens

:star: We now build in public

You can now follow all roadmap updates and the teams plans updated everyweek on Prismic updates

Best,

Côme and the Prismic DevTools team

@Phil
So after this update you advise against using GrapQL because it does not work 100%?
I would like to start a new project using GrapQL. The main reason is because of this post (the site is not pre-generated).
If using GrapQL will have general disadvantages when using it with Prismic, I will continue to use REST

Thank you

Yes, exactly that; by continuing to use GraphQL, you will lose the latest group field developments with Slice Machine.

You can still use GraphQuery in the rest API for this use case:

Thanks.

Hi! Thanks for the answer!
The problem is that grapQuery doesn't allow to fetch only meta data
ES: This doesn't work:
graphQuery: {} not even this:graphQuery: { blog { } }

PS: I suggest you to add a warning banner in the graphQL documentation because no one can know the limitation unless they view this release note

Thank you!

Hi Lorenzo,

While it's correct that GraphQL is no longer a good option for querying linked Slice data since these updates, you can still query your linked data on the page level with the Rest API and GraphQuery, then build your sitemap separately with GraphQL.

Adding a warning banner to the GraphQL docs is a great idea. I've added it to our backlog.

Thanks.