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.
The frontend for this repository can be found here
.
├── 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
-
Clone the Repository:
$ git clone https://github.com/ejkorol/graphql-weather-api && cd graphql-weather-api
-
Install dependencies:
$ npm install
-
Transfer
.env.sample
variables into.env
:$ touch .env && cat .env.sample > .env
-
Spin up the dev server:
$ npm run dev
-
Development server:
$ npm run dev
-
Building:
$ npm run build
-
Running compiled server:
$ npm run start
Author: Jason Korol