Pagination Help

I am hoping someone can help me figure out what I am doing wrong with pagination in the API. I have tried following the example here. However, when I submit the example query from that guide:

query {
  search(first:500 filter:{
         brand: "Starbucks"}) {
    places {
      pageInfo { hasNextPage, endCursor}
      edges {
        node {
          placekey
          safegraph_core {
            location_name 
            region
            postal_code
          }
        }
      }
    }
  }
}

The returned result is: {‘error’: “Query does not pass validation. Violations:\n\nCannot query field ‘places’ on type ‘Place’. Did you mean ‘placekey’? (line 5, column 5):\n places {\n ^”}.

I thought that perhaps something changed with pagination since the guide was written because the December notes mentioned an update to this service (see here). Might this be the problem? In any case, any tips for looping through pages for larger searches using the API?

Thanks!

Hey @Nicholas_Hallman_UT_Austin - the docs need to be updated. Sorry about that! In the meantime I think this query should work for what you are looking for. Feel free to reach out again for any additional questions!

query {
  search(filter: { brand: "Starbucks" }) {
    places {
      results(first: 500) {
        pageInfo {
          hasNextPage
          endCursor
        }
        edges {
          node {
            placekey
            safegraph_core {
              location_name
              region
              postal_code
            }
          }
        }
      }
    }
  }
}