Functions: PostGIS

Functions: PostGIS

In this example, we'll be fetching a list of landmarks that are near a given user, along with the user’s details in the same query. PostGIS’ built-in function ST_Distance can be used to implement this use case.

Note: Most managed database vendors will include PostGIS as part of their Postgres installation. If self-hosting, you may need to first install PostGIS (more information for Docker-based installation can be found here: https://registry.hub.docker.com/r/postgis/postgis/)


  • This schema is installable through your Hasura Console
  • The schema sharing source code is available: https://github.com/hasura/schema-sharing/tree/main/postgres/functions-multiple-column-search
  • The schema sharing source code was derived from the following tutorial: https://hasura.io/docs/latest/graphql/core/databases/postgres/schema/custom-functions.html#example-postgis-functions
Released: June 16, 2021
Developed by: Hasura
Category: Intermediate Implementations

We’d love to connect with you at one of our many global events.

Event
HasuraCon 2021HasuraCon 2021Community call
Ready to get started?
Start for free on Hasura Cloud or you could contact our sales team for a detailed walk-through on how Hasura may benefit your business.
Get monthly product updates
Sign up for full access to our product and community highlights, new features, and occasional baby animal gifs! Oh, and we have a strict no-spam rule. ✌️