Skip to content

Is a serverless computing platform with a pay-for-use billing model that enables you to run code without worrying about provisioning or managing servers.

License

Notifications You must be signed in to change notification settings

anopszetex/Graphql-AWS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Graphql-AWS

Simple Template with Apollo Server (v4) and AWS Lambda

Prerequisites 👨‍💻


Installation 🗃️

  1. Clone the repository:
git clone https://github.com/anopszetex/Graphql-AWS.git
  1. Install dependencies:
npm ci --silent

Configuration of LocalStack 🐳

This project uses LocalStack to simulate AWS services locally. To run LocalStack, follow these steps:

  1. Ensure you have Docker and Docker Compose installed.
  2. Navigate to the root directory of the project and run:
docker-compose up -d

Running the Project 🚀

  1. Start the server:

    In the root directory, run:

yarn dev
  1. Access the API:
    The server will be running at http://0.0.0.0:3000

Example GraphQL Query ⚛️

query Hello {
  getHero
  ping
}

Project Structure 🧱

├── src/
│   ├─ handler.js         # Main lambda function
│   ├── mocks/
│   │    ├── query.json   # Mock http request locally
│   ├── graphql/
│           ├── hero/               # Hero-related GraphQL files
│           │     ├── index.js      # Merges schemas and resolvers for Hero
│           │     ├── resolvers.js  # Resolvers for Hero queries/mutations
│           │     └── schema.js     # GraphQL schema definition for Hero
│           ├── index.js            # Merges all schemas and resolvers
├── docker-compose.yml    # LocalStack configuration
├── serverless.yml        # Serverless Framework configuration
├── package.json          # Project dependencies and scripts
└── README.md             # Project documentation

About

Is a serverless computing platform with a pay-for-use billing model that enables you to run code without worrying about provisioning or managing servers.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published