Skip to main content


Aliases are supported via the .as method - any field (including methods) can be renamed by using .as("newName")

The following example assumes there is a country method at the toplevel query which fetches a country by its code. We need to fetch two countries for a comparison

let compareCountriesQuery = query(q => [{ code: $("code1") }, c => [,]).as("first"),{ code: $("code2") }, c => [,]).as("second"),

The response will have two properties: first and second, each containing a country