Sorting, pagination, deduplication and counts
NodeOrderBy (exact published input shape)
input NodeOrderBy { field: NodeOrderField!, direction: OrderDirection }
enum OrderDirection { ASC DESC }
enum NodeOrderField {
RANKING_SCORE
RATING
RATING_VOTES
RELEVANCE
UNIQUENESS
LAST_UPDATED
DISTANCE
PLACE_SCORE
}| Field | Meaning |
|---|---|
RANKING_SCORE |
Earlier Evendo ranking signal |
RATING |
Average customer review rating |
RATING_VOTES |
Review-count ranking |
RELEVANCE |
Relevance signal |
UNIQUENESS |
Uniqueness measure |
LAST_UPDATED |
Record freshness by last update |
DISTANCE |
Distance from coordinates; requires lat and lon |
PLACE_SCORE |
Evendo proprietary popularity/quality score, higher is better |
Default ordering described by the public docs: search orders by text relevance, then ranking_score descending; childrenOf and descendantsOf by ranking_score descending, with a stable ID tie-break. When geo coordinates are present, default ordering is nearest first, unless orderBy overrides it. Missing sort values sort last. RELEVANCE, UNIQUENESS and LAST_UPDATED can be sparse.
Example: sort by score
query {
descendantsOf(
ancestorId: "27799"
nodeType: "Attractions"
orderBy: { field: PLACE_SCORE, direction: DESC }
first: 10
) {
edges { node { id title place_score rating } }
pageInfo { hasNextPage endCursor }
}
}Cursor pagination
- Default
first: 20; maximum: 100. - List responses include
edges { cursor node }andpageInfo { hasNextPage endCursor }. - When
hasNextPageis true, pass the exactendCursoras theafterargument. - Cursors are opaque and tied to the query ordering and location parameters. Never construct cursors or reuse one after changing filters/order/coordinates.
- No offset pagination or
totalCountis declared.
query Page($cityId: String!, $after: String) {
descendantsOf(ancestorId: $cityId, nodeType: "Restaurants", first: 20, after: $after) {
edges { node { id title rating } }
pageInfo { hasNextPage endCursor }
}
}Deduplication
By default dedupe: true deduplicates records by place_id, because a venue can appear under more than one list parent in the world model. Set dedupe: false when you intentionally need all stored copies. Records without place_id remain eligible to be returned. Do not assume a page's edges.length is the total number of matches.
Counts
nodeCount(nodeType: "Restaurants") reports a global inventory count. To count within Madrid, resolve the city and paginate descendantsOf(ancestorId: "27799", nodeType: "Restaurants", first: 100), adding the returned edges until hasNextPage is false. Be explicit about the dedupe setting when interpreting counts.