Skip to content

Skip parameter

The skip parameter specifies how many items to omit from the beginning of the result set before returning data.

It is commonly used for pagination in combination with the limit parameter.

skip=value: Integer
skip(value: Integer)

Usage

In this example, the response skips the first item and returns the next one. The actual result depends on the sort order. To ensure consistent results, combine skip with a sort clause.

GET https://api.play.funql.io/v1beta1/sets?skip=1
HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "name": "LEGO Star Wars R2-D2",
    "setNumber": 10225,
    "price": 179.99,
    "launchTime": "2012-05-01T14:15:30.500Z"
  }
]

Try

POST https://api.play.funql.io/funql
Content-Type: text/plain

listSets(
  skip(1)
)
HTTP/1.1 200 OK
Content-Type: application/json

{
  "data": [
    {
      "name": "LEGO Star Wars R2-D2",
      "setNumber": 10225,
      "price": 179.99,
      "launchTime": "2012-05-01T14:15:30.500Z"
    }
  ]
}

Pagination

To retrieve additional pages of data, combine skip with the limit parameter. For example, use skip(10) with limit(10) to get the second page of results in a paginated list (items 11-20).

GET https://api.play.funql.io/v1beta1/sets?skip=10&limit=10
HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "name": "LEGO Star Wars Millennium Falcon",
    "setNumber": 75192,
    "price": 849.99,
    "launchTime": "2017-10-01T14:15:30.500Z"
  }
]

Try

POST https://api.play.funql.io/funql
Content-Type: text/plain

listSets(
  skip(10),
  limit(10)
)
HTTP/1.1 200 OK
Content-Type: application/json

{
  "data": [
    {
      "name": "LEGO Star Wars Millennium Falcon",
      "setNumber": 75192,
      "price": 849.99,
      "launchTime": "2017-10-01T14:15:30.500Z"
    }
  ]
}