Skip to content
Google Places Rest API transformed into GraphQL to be added as a remote schema in Hasura
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
index.js
package-lock.json
package.json
resolvers.js
type_defs.js

README.md

google-places-remote-schema

Google Places API is a service that returns information about places using HTTP requests. Places are defined within this API as establishments, geographic locations, or prominent points of interest.

Adding Google Places as Remote Schema

  • Get the Google Maps API Key by visting the Google Maps Platform page https://developers.google.com/places/web-service/get-api-key.
  • Set the API key as GOOGLE_MAPS_API_KEY environment variable.
  • This custom resolver is used to accept a location argument of type "Point" of Postgres and returns restaurants around a radius with rating and address details.
  • Refer to API documentation for integration with other information like Photos, Reviews etc.

Google Places API Documentation

API Documentation.

Deploy with Glitch

  1. Click the following button to edit on glitch

    glitch-deploy-button

  2. Add the following environment variables in the .env file on glitch.

    GOOGLE_MAPS_API_KEY=xxx
    PORT=3000
    

Running Locally

npm install
PORT=3000 GOOGLE_MAPS_API_KEY=xxx npm start
You can’t perform that action at this time.