Openweather is a favorite utility for quickly integrating weather data into applications all around the web. With this integration, you can now use this popular resource without writing a custom endpoint to handle the request!
This integration maps the /weather
endpoint which takes an input artgument of "location" which can be a city, city/state pair, or postal code. See the Openweather API documentation for further details..
An example query:
{
openweather_current(location: "Seattle, Washington") {
weather
visibility
wind
dt
}
}
You can use the one-click to deploy on Hasura Cloud to get started quickly
You'll need the following environment variables.
OPEN_WEATHER_API_PATH: "https://api.openweathermap.org/data/2.5"
Additionally, you'll need your Openweather API Key which you can find from your key settings page. The Environment variable can be added along with the rest of your Hasura GraphQL Engine settings, but the API key will need to be added as a query parameter value for the action itself.
Importing actions and events into Hasura apply one or more actions. Actions based on request configurations and will need metadata to be applied. Events need underlying table structure to trigger the events.
Steps required for this integration:
To apply metadata into your project. You will need:
/hasura
.More information about Hasura CLI can be found in the documentation.
Working on an interesting idea using Hasura?
Submit a new integration