Giter Club home page Giter Club logo

graphql-weather-api's Introduction

🌦️ GraphQL Weather API

A GraphQL Wrapper for the Open Weather Map API

Retrieve the current weather for any given city. Since this GraphQL API uses the free-tier of the Open Weather Map API, it is restricted to 60 calls/minute.

However, feel free to use it for prototyping and demo projects anyways. A live version is available at:

graphql-weather-api.herokuapp.com 🌈

How to Use

Queries

  • getCityByName (name required, country optional, config optional)
  • getCityById (id required, , config optional)

Language and unit system can be specified via config.

Example with all weather data

query {
  getCityByName(name: "Gothenburg") {
    id
    name
    country
    coord {
      lon
      lat
    }
    weather {
      summary {
        title
        description
        icon
      }
      temperature {
        actual
        feelsLike
        min
        max
      }
      wind {
        speed
        deg
      }
      clouds {
        all
        visibility
        humidity
      }
      timestamp
    }
  }
}

How to Install

For running this project locally, you must register your own application at Open Weather Map. Then, create an .env file and add the following variable: KEY=<YOUR-APP-ID>

npm install
npm run dev # Using nodemon for auto-reloading

The server starts at http://localhost:4000/

About

Konstantin Münster – konstantin.digital[email protected]

Distributed under the MIT license. See LICENSE for more information.

https://github.com/konstantinmuenster

graphql-weather-api's People

Contributors

konstantinmuenster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

graphql-weather-api's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.