I want to get only n results of a query in GraphiQL Explorer.
The GraphQL documentation says that I can use first, but when I try to use it in GraphiQL Explorer, I get an error.
query allEventsTest {
eventsTestList(first:10) {
items {
_path
}
}
}
Views
Replies
Total Likes
You can use limit and offset. Let's say you need 10 pages only. This will fetch 10 blog posts starting from the 1st record.
query { blogPosts(limit: 10, offset: 0) { title author { name authorImage } } }
For second page, use limit: 10, offset: 10, This will fetch 10 records starting from the 11th record and so on.
Hi HeenaMadan,
I tried the following query in GraphiQL Explorer and got an error "Unknown argument "limit" on field "QueryType.eventList"".
query { eventsTestList(limit: 10, offset: 0) { items { _path } } }
From the answers to the following questions, it appears that Paging/Sorting is not yet supported.