Nesting Place Responses

Queries that support pagination (textSearch, aroundCoordinates, and childrenLookup) require an additional nesting layer for place responses. This allows the response to include both pagination and place information. The place response is nested under places. This is applicable for both Basic and Full Place Responses.

In the example below, notice how places appears above locationName and topCategory(information found in a Place Response). places is at the same level as pageInfo, which encompasses pagination info.

query {
  textSearch(text: "denver mexican food") {
    places {
      locationName
      topCategory
    }
  	pageInfo {
      totalCount
    }
  }
}

lookup and batchLookup do not support pagination and therefore do not require a places nesting layer. Notice in the following example how locationName and topCategory (information found in a Place Response) do not have this nesting layer.

{
  lookup(placekey: "zzy-22j@5qk-kb7-85f") {
      locationName
      topCategory
  }
}