relate-app / gatsby-source-strapi-graphql

A Gatsby source plugin for building websites using Strapi as a data source
BSD Zero Clause License
32 stars 9 forks source link

Pagination limit on repeatable component items #9

Closed pepijn-vanvlaanderen closed 2 years ago

pepijn-vanvlaanderen commented 2 years ago

Strapi limits the results of a repeatable component to 10 items. In the graphQL query you can define the limit, but this requires identification of those repeatable components while generating the queries, and then insert those pagination options and set it to a higher limit. I couldn't figure it out myself to add it, like this plugin already does for collectionTypes.

As a workaroud I changed the defaultLimit on the Strapi side:

#config/plugins.js
module.exports = {
  ...
  graphql: {
    config: {
      defaultLimit: 1000,
    },
  },
  ...
}
timbrandin commented 2 years ago

Okey, great find, I have added the pagination to the query with 1000 released on 4.3.2