Skip to content

manhhavu/weather-graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenWeatherMap's GraphQL implementation

Demonstrates a GraphQL server proxied to OpenWeatherMap API

Features

  1. Query following services:
  2. Combine multiple services in a same GraphQL query, e.g. we can have current weather and forecasts in a same response.

How to run

You need to specify a OpenWeatherMap APPID as an environment variable (OWM_ID).

Example request:

{ 
	location(cityName: "London") { 
		id 
		name  
		now {
		    main {
			    temp 
			    humidity
			 }
		} 
		forecasts  { 
			dt 
			dt_txt 
			main { 
				temp 
				humidity 
			} 
			weather { 
				main 
				description 
			} 
		}  
	} 
}

as query parameter in a POST (x-www-form-urlencoded) request sent to http://localhost:9090/location. More technicalIndicators can be found in WeatherSchema class.

Credits

About

An OpenWeatherMap API's GraphQL implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages