Join any OpenAPI or Swagger Rest API with Postgres using Hasura Remote Joins
This post discusses how Hasura Remote Joins can be used to join data from a Postgres database with any OpenAPI/Swagger compliant REST API. The example provided demonstrates joining users table data in Postgres with exchange rate data from an OpenAPI service, which is a currency exchange rate API. By adding the OpenAPI service as a Remote Schema using Hasura Console and creating a remote relationship called "currency_rates," it becomes possible to query both sets of data in a single API call. The GraphQL query for this operation includes nested queries from the exchange rate API, which filters the results based on the user's currency.
Company
Hasura
Date published
Aug. 2, 2019
Author(s)
Praveen Durairaju
Word count
344
Hacker News points
None found.
Language
English