Boilerplate project for create-graphql-app cli.
Deploy graphql-server-typed on AWS lambda, using:
- typescript
- apollo-server 2
- serverless-offline
- graphql-code-generator
- merge-graphql-schemas
- Dependency injection with
injection-js
This project demonstrates how to easily deploy a server, based on the graphql-server-typed starter, as AWS lambda.
Execute queries to the demo server here
Clone the repository and run npm install
git clone https://github.com/tomyitav/apollo-typed-lambda.git
npm install
Run:
npm run build
and
npm start
Or, you can do it in one command as:
npm run sls:offline
The server will run on port 3000. You can change this by editing the config file.
We use Prettier and Tslint to format and enforce standards on our code.
Both will run on the project automatically before each commit.
Prettier rewrites code according to the .prettierrc.json configuration file.
If you want to activate prettier manually (on all .ts files inside src folder) without committing, run:
npm run prettier
Tslint will check rules found in the tslint.json configuration file.
If you want to check tslint manually (on all .ts files inside src folder) without committing, run:
npm run tslint
First, make sure you have the serverless platform installed. Then, execute the following command:
npm run deploy
That's it! The server will be deployed as a lambda on AWS
See the following example on how to connect to the server using apollo-angular.