Skip to main content

Limit

GraphQL queries allow you to limit the number of results that appear for a multi, ref predicate. In order to perform a limit, you can specify an integer.

In the below example, we are querying all people, and limiting the number of chat_Via_person returned.

{
graph {
person {
_id
handle
chat_Via_person(limit: 10) {
instant
message
comments {
message
}
}
}
}
}

For this lesson, you'll be modifying the below query:

{
graph {
person {
_id
handle
favArtists {
name
}
}
}
}

Modify a Query!


Modify the last query in this lesson to limit the number of favArtists to 1.

Use the above queries for reference.