GraphQL with Postgraphile

GraphQL is a de-facto standard for self describing API’s on hierarchical data. Graphql provides via its API specification capabilities to query datasets using filters, but also indicate which properties to be returned alongside with proper pagination. The GraphQL website provides a quick start on Graphql based on NodeJS.

GraphQL is currently not endorsed as an INSPIRE Good Practice, but it fits many aspects of an INSPIRE download service. GraphQL is a good fit to disseminate measurement and observation data from soil profiles.

At ISRIC we use GraphQL (along WMS/WFS) to disseminate the WOSIS soil profile database.

Postgraphile

Postgraphile is a NodeJS server application which creates a GraphQL API on any postgres database. Besides being totally compatible with PostgreSQL it also supports PostGIS and therefore it can easily work as a Spatial GraphQL API.

Load some data into the database

Configure the service

Query a GraphQL endpoint

Read more