Serverless app using graphql.
This is a Hello World
app that uses Serverless & GraphQL
- Dependencies:
apollo-server-lambda
: Apollo Servergraphql
: GraphQL
- Dev Dependencies
serverless-offline
: Run Serverless Server Offline
After download, just run this command to install the dependencies:
npm i
If you want to run the app offline, run this command:
npm run start
And the app will be running on http://localhost:PORT/graphql
.
If you want to deploy it to an AWS service, run this command:
sls deploy
To check if the app is running, go to the route /graphql
, and execute this query:
query {
hello
}
The expected response is:
{
"data": {
"hello": "Hello world!"
}
}