Getting started with Dgraph-8: Easily build location-aware apps using our native geolocation features - Dgraph Blog

First of all, thanks for your work on dgraph.

I wanted to ask something that I can’t seem to find in the documentation of the near function. Is there a way that I can use a variable as the center of the near function. I mean something like

near(geo-predicate, some_geojson_point, distance)

The reason I’m asking is that I would like to do something like:

  1. At the root look for a given user’s uid and fetch its location, which will be a geojson point
  2. Find the hotels near the given user’s location.

I thought that it would be able to use the root user’s location as the center of the near function but I get an "Invalid coordinates" error message.