NextJS can't map through new content type

Hello prismic team!

I have created a new a document type called gated_content in my Prismic repo I am able to query for this content type in the API browser so I know the data is there:[[at(document.type%2C+"gated_content")]]#format=json

I am able to see the data in my inspector and display individual pieces of content like so:


In my blog page I am querying for this document type like so

 const gatedContentPosts = await client.query(['document.type', 'gated_content')
	{ orderings: '[ desc]' }

And then trying to display this on my page like so :

{ => {
			<li key={gatedContentPost.uid}>

When I try to map through the results nothing seems to happen. Not quite sure what I'm doing wrong. This is the exact method I'm using to display other types of content from prismic on this page.

You can view a live version of this site here:


  • N

Hey Niki,

It seems there was and extra set of curly brackets in your query and your query option for the date was using the post still. Can you try the following?

 const gatedContentPosts = await client.query('document.type', 'gated_content'),
    { orderings: '[ desc]' }


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.