-
Notifications
You must be signed in to change notification settings - Fork 112
Open
Description
Examples of improvements:
QUERY:
select {
count as totalCount,
searchResult.items as items[{
itemId as id,
label as label,
primaryCategory.categoryName as categoryName,
shippingInfo {
shippingType,
shipToLocation
}
}]
}
from finding
OUTPUT:
{
totalCount: 100,
items: [
{
id: 12345,
label: 'Test',
categoryName: 'Athletic',
shippingInfo: {
shippingType: "Calculated",
shipToLocation: "US"
}
},
...
]
}
Also, an "anonymous" top-level array could be returned by dropping the label for "searchResult.items" as shown in the following query:
QUERY:
select searchResult.items as [{
itemId as id,
label,
primaryCategory.categoryName as categoryName,
shippingInfo {
shippingType,
shipToLocation
}
}]
from finding
OUTPUT:
[
{
id: 12345,
label: 'Test',
categoryName: 'Athletic',
shippingInfo: {
shippingType: "Calculated",
shipToLocation: "US"
}
},
...
]
Also, I think a limit on any arrays should be supported. For example:
QUERY:
select {
count as totalCount,
searchResult.items as items[limit=5, {
itemId as id,
label as label,
primaryCategory.categoryName as categoryName,
shippingInfo {
shippingType,
shipToLocation
}
}]
}
from finding
Also, user functions for controlling property values would be helpful as well. For example:
QUERY:
var formatCurrency = require('utils/formatting').formatCurrency;
select {
totalCount,
searchResult.items as items[{
formatCurrency(buyItNowPrice.$t, buyItNowPrice.currencyId) as buyItNowPrice
}]
}
from finding
Metadata
Metadata
Assignees
Labels
No labels