https://github.com/epicallan/webpack-graphql-typescript
An awesome webpack graphql typescript starter kit
https://github.com/epicallan/webpack-graphql-typescript
expressjs graphql nodejs typescript webpack
Last synced: about 1 year ago
JSON representation
An awesome webpack graphql typescript starter kit
- Host: GitHub
- URL: https://github.com/epicallan/webpack-graphql-typescript
- Owner: epicallan
- Created: 2017-06-10T16:09:22.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-10T17:09:35.000Z (about 9 years ago)
- Last Synced: 2025-03-23T20:51:13.216Z (over 1 year ago)
- Topics: expressjs, graphql, nodejs, typescript, webpack
- Language: TypeScript
- Homepage:
- Size: 15.6 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Data hub graphql-server
[](https://travis-ci.org/epicallan/webpack-graphql-typescript)

[](https://codecov.io/gh/epicallan/webpack-graphql-typescript)
[](https://gemnasium.com/github.com/epicallan/webpack-graphql-typescript)
Webpack typescript Graphql server start kit inspired greatly by
[DxCx/webpack-graphql-server](https://github.com/DxCx/webpack-graphql-server) that grew out of a need for a project I am working on.
Useful commands:
----
npm run build - build the library files (Required for start:watch)
npm run build:watch - build the library files in watchmode (Useful for development)
npm start - Start the server
npm run dev - Start the server in watchmode (Useful for development)
npm test - run tests once
npm run test:watch - run tests in watchmode (Useful for development)
npm run gqlToTs - builds out typescript types from your graphql types and puts them in src/types
How to run it:
----
```bash
yarn install --ignore-scripts
## development mode
npm run dev
## production
npm run build & npm start
```
Files explained:
----
1. src - directory is used for typescript code that is part of the project
1a. main.ts - Main server file. (Starting Apollo server)
1c. dw/schema - Contains modules used to build dataware house schemas
- modules/ - directory for modules
3. package.json - file is used to describe the library
4. tsconfig.json - configuration file for the library compilation
6. tslint.json - configuration file for the linter
8. webpack.config.js - configuration file of the compilation automation process for the library
10. Dockerfile - Dockerfile used to describe how to make a container out of apollo server
Output files explained:
----
1. node_modules - directory npm creates with all the dependencies of the module (result of npm install)
2. dist - directory contains the compiled server (javascript)
3. html-report - output of npm test, code coverage html report.
Development GuideLines
Typescript requires types for external dependency. When you install a new run time dependency endevour to install types for it.
```
// eg
$ yarn add --dev @types/fs-extra
```
TODO
- [ ] add more guidlines
- [ ] publisht to yeoman and neutrino
- [ ] possibly move some of the library code into a separate npm package