LIST
- This is a simple list. It is used to query a list containing several items.
An good example of a simple list could be a query for computerVisionModel variants which returns a list with a manageable number of results.
CONNECTION
- Represents a more complex list. When queried, it will return an unknown or large number of results.
Note AVII allows a maximum of 100 items per request.
cursor
indicator is used to mark the place you want your pagination to start. The cursor
represents the place where the node
is located.
first
- Followed by the number of items (nodes) you want the query to return. This argument will return items starting from the beginning of the list.last
- Followed by the number of items (nodes) you want the query to return. This argument will return items starting from the end of the list.after
- Followed by the value of the cursor
. This indicates the direction in which you want to start displaying items; in this case, it is from the beginning of the list.before
- Followed by the value of the cursor
. This indicates the direction in which you want to start displaying items; in this case, it is from the end of the list.Example You want to display 5 results per page and start with items from the beginning of the list. You would then query for thefirst
5 nodes (this is your first page). If you have more results to show, you would then query for the followingfirst
5 nodesafter
the node indicated by the value of the cursor of the fifth node (this would be your second page). For the third page, you would query for the followingfirst
5 nodesafter
the node indicated by the cursor of the tenth node. When you want to start displaying the results from the end of the list, you uselast
andbefore
respectively.
edge
- Nodes are connected to each other by the edges. An edge contains the following fields:
node
- Represents an object you queried for, an item on the list (for example, a computerVisionModel).
cursor
- The value of the cursor representing the place where the node is located.
pageInfo
- Consists of information on the current connection.
hasNextPage
- Indicates if there are more records to be displayed (hence, if there is a next page). This is a Boolean value.
hasPreviousPage
- Indicates if there are records to be displayed prior to the current page (hence, if there is a previous page). This is a Boolean value.
startCursor
- Indicates the cursor value of the first item on the page.
endCursor
- Indicates the cursor value of the last item on the page.