Ariel Navarro
Ariel Navarro

Reputation: 21

gatsby-source-graphql only shows 10 results

I'm want to fetch data from a wordpress site and currently when I pass the query to show all the pages the site has it only returns 10 of 64, is there an option under gatsby-source-graphql resolver in gatsby-config.js to show more results?

Upvotes: 1

Views: 1911

Answers (1)

Brandon
Brandon

Reputation: 51

I was experiencing the same issue with Graphql only returning the first 10 comments. I was able to get around this issue by specifying a first value in my query.

query {
    comments (first: 500) {
      ...
    }
}

The current GraphQL Edge schema likely has 10 as a default value for first.

Upvotes: 5

Related Questions