Workshop: Creating a Spatial GraphQL API with PostGIS and Postgraphile
2021-09-28, 14:00–18:00, Gabriela Mistral

Not everyone fully understands yet what GraphQL is all about, or why it is seen by many as the successor of REST. The goal of this workshop is to explain why this bold statement has been made on a hands-on demo. While showing GraphQL features we’ll demonstrate how they can be perfectly implemented on top of an existing PostgreSQL/PostGIS spatial database using PostGraphile. We’ll discuss pros and cons of this technology over REST, highlighting a few important points in which they differ.

During the workshop we will:

  • Learn how to use, create and manage a fully spatial GraphQL API using PostGraphile and a common, existing PostgreSQL/PostGIS spatial database;

  • Publish spatial and non-spatial data;

  • Create processing/analysis endpoints that rely on PostgreSQL/PostGIS functions;

  • Secure the data with Row-Level Security (RLS) set at the database level and transpose those credentials to the API in a straightforward way. Users can then make use of JWT tokens to authenticate.

  • Extend the GraphQL API using plugins that can be used to create complex endpoints that need to be created at the server level with NodeJs and Javascript or Typescript.


This workshop will be hosted in GitHub. Using guided steps, we’ll start by exploring the basics of GraphQL. Then, we'll create and configure one existing spatial database using PostGIS. From that point onwards we will slowly increase the complexity and learn step by step how to create and configure PostGraphile https://www.graphile.org/postgraphile/

The workshop will take 4 hours and requires no previous knowledge of GraphQL. However, It is advisable to have basic knowledge in PostgreSQL and PostGIS.


Authors and Affiliations

Luis Filipe Calisto

Level

2 - Basic. General basic knowledge is required.

Requirements for the Attendees

Basic knowledge of PostgreSQL/PostGIS. Workshop will be available on GitHub therefore attendees are recommended to have an account.

A FOSS enthusiast for more than 15 years. Passionate for all geo technologies such as QGIS, OpenLayers, OGC standards, GDAL and a fan of PostGIS. Recently an enthusiast of GraphQL with PostGIS and Graphile.