rans>Skip to main content
Community Plugin
View plugin on GitHub
See starters using this

gatsby-source-openweathermap

This source plugin for Gatsby will make weather infomation from OpenWeatherMap available in GraphQL queries.

Installation

# Install the plugin
yarn add gatsby-source-openweathermap

In gatsby-config.js:

module.exports = {
  plugins: [
 {
      resolve: `gatsby-source-openweathermap`,
      options: {
        apikey: 'YOUR KEY',
        location: 'York',
        units: 'metric',
        type: 'forecast'
      },
    },
  ]
};

NOTE: To get a OpenWeatherMap API key, register for a OpenWeatherMap account.

See the OpenWeatherMap API docs.

Docs
Tutorials
Plugins
Blog
Showcase