Skip to content

ejkorol/graphql-weather-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lush Technical Challenge

An Apollo GraphQL server written in TypeScript.

This API utilizes the Pothos schema builder for type safety, Axios for requests, Open Meteo API for fetching weather data and country-city-state for geographical coordinates.

Additionally, it utilizes country-city-state to fetch city longitude and latitudes for ease of use.

Frontend

The frontend for this repository can be found here

graphql-weather-client

Features

Architecture

.
├── src/
│   │  
│   ├── graphql/
│   │   │ 
│   │   ├── schemas/     // pothos schemas
│   │   └── server/      // apollo server instance
│   │
│   ├── lib/             // shared 3rd party libraries
│   ├── types/           // typscript types
│   ├── utils/           // utils and helper functions
│   │  
│   └── index.ts         // entry point
│ 
├── .gitignore
├── .env.sample
├── .env
├── README.md
├── nodemon.json
└── tsconfig.json

Installation

  1. Clone the Repository:

    $ git clone https://github.com/ejkorol/graphql-weather-api && cd graphql-weather-api
  2. Install dependencies:

    $ npm install
  3. Transfer .env.sample variables into .env:

    $ touch .env && cat .env.sample > .env
  4. Spin up the dev server:

    $ npm run dev

Startup

  • Development server:

    $ npm run dev
  • Building:

    $ npm run build
  • Running compiled server:

    $ npm run start

Author: Jason Korol

About

Lush technical challenge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published