Queries
Using Multiple Arguments
Learn how to combine multiple filters and arguments in a single query.
Using Multiple Arguments
This is a query that retrieves information about reward options with multiple filters, such as specific input assets and type keys. It returns details about the type, metrics, input assets, and providers associated with the reward options. The query also specifies a limit for the amount of data returned for each of these nested objects.
Example
{
rewardOptions(where: {inputAsset: {symbols: ["ETH"]}, typeKeys: ["solo-staking", "pos"]}, limit: 10) {
type {
key
label
}
metrics(limit: 10) {
metricKey
defaultValue
}
inputAssets(limit: 1) {
name
symbol
}
providers(limit: 5) {
name
country
}
}
}This query demonstrates:
- Filtering by input asset symbol (
ETH) - Filtering by multiple type keys (
solo-stakingandpos) - Limiting results at each nesting level
- Retrieving related objects (type, metrics, inputAssets, providers)