Hi pals. I’m not a seasoned GraphQL fella yet, so this one surprised me. Using GraphCMS, I was happily adding more content to my main datatype (‘artists’) when I noticed it wasn’t updating. After deciding it wasn’t caching etc, or anything at the GraphCMS end, I googled a little and found that GraphQL by default only supports 100 queries. Ha! Who knew. Everyone? Well I didn’t.
I thought maybe I needed to go and figure some sort of fix out for the Nuxt GraphCMS plugin I was using (some option that I would have to find but couldn’t; I even starting guessing what it might be…that’s never good…) but actually the answer was just a simple argument in the query.
async asyncData({ $graphcms }) {
const { artists} = await $graphcms.request(
gql`
{
artists(first: 150) {
slug
title
id
}
`
);
return { artistbundle:artists};
},