Published page not showing up in API

Hi all,

I have a page of type video. It is published but when I query a list of all videos in the API it does not show up. But when I query it directly it shows up.

This happens in both the REST and GraphQL endoints.

This works:
{
video(uid: “interview-with-debbie-obrien-from-nuxtjs”, lang: “en-us”) {
_meta {
uid
}
}

This however doe snot show the page:
{
allVideos {
edges {
node {
_meta {
uid
}
}
}
}
}

Everything seems to be published and the type is saved.

Thanks!
Tim

Hey Tim,

It sounds like a pagination issue, do you have more than 20 results?

The REST api has a default limit of 20 results and a max of 100, here’s the docs for Vue about paginating your results.
https://prismic.io/docs/vuejs/query-the-api/pagination-for-results

The GraphQL api has a max of 20 results, here’s the docs for pagination with it,
https://prismic.io/docs/graphql/query-the-api/paginate-your-results

Let me know if you need anything else :grinning:

2 Likes

This is definitely it. I have 21 items. The last published item doesn’t come back in the graphQL result.

Thanks for the tip!

I’ll look into the cursor system to resolve this.

Tim

As I wasn’t able to resolve the issue with the GraphQL and Gridsome in my context. I created this workaround: https://github.com/timbenniks/gridsome-source-prismic

1 Like