S_stockBulkSearch
Gets an auto paginating list of +10k auctions. Returns 300 auctions per page.
To iterate through less than 10k auctions, please use S_stock
query instead.
You will be thrown an error if you try to use S_stockBulkSearch with less than 10k auctions.
Pagination
Pagination is automatic, as each request advances one page, until the last one that will have no elements.
Keep in mind the total
and scrolledCount
fields to track auto pagination.
The last page will have empty stock, or scrolledCount === totalCount
If after one minute our system receives no call to advance the page, the search will reset. Thus keep track of scrolledCount
to prevent unexpected changes in pagination.
Supported arguments
The following arguments are supported by S_stockBulkSearch query:
Field | Type | Description |
---|
Return type
The query returns theS_API_BulkStockSearchResult
type.
Example usage
Query
query {
S_stockBulkSearch {
scrolledCount
total
stock {
id
onHand
price {
amount
currency
}
}
}
}
Result
The response will include 300
S_API_Stock
objects. Only two included for the example.
On the following call, scrolledCount
would increase by 300.
{
"data": {
"S_stockBulkSearch": {
"stock": [
{
"id": "a60f8e9e-6aee-11ef-b864-0242ac120002",
"onHand": 62,
"price": {
"amount": 1000,
"currency": "EUR"
}
},
{
"id": "d5b447b6-6aee-11ef-b864-0242ac120002",
"onHand": 12,
"price": {
"amount": 15000,
"currency": "EUR"
}
}
],
"scrolledCount": 300,
"total": 19500
}
}
}