npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

create-lambda-graphql-app

v1.0.2

Published

A CLI to create AWS Appsync-Sam-Lambda based GraphQL apps quickly

Downloads

11

Readme

Create Lambda GraphQL App

npm version

A CLI tool to quickly scaffold a new Node.js GraphQL project for AWS Lambda, using AWS SAM for deployment.

✨ Features

  • GraphQL Ready: Starts you with a working GraphQL schema and resolver.
  • AWS Lambda: Pre-configured for deployment to AWS Lambda.
  • AWS SAM: Uses AWS Serverless Application Model (SAM) for defining and deploying your serverless application.
  • ES Modules: Uses modern ES modules syntax.
  • Local Development: Test your Lambda functions locally with sam local start-api.
  • Linting: Comes with ESLint configured for code quality.
  • VS Code Integration: Includes a launch.json for easy debugging from VS Code.
  • Interactive CLI: An interactive CLI to customize your project setup.
  • Organized Structure: A clean and scalable project structure.
  • Extensible: Easily add new handlers with a single command.
  • Modular Templates: Internal templates for YAML and GraphQL schemas are now more modular and functional.

🧠 Tech Stack

  • Runtime: Node.js 20.x
  • Framework: None (vanilla Node.js)
  • Deployment: AWS SAM
  • GraphQL: graphql npm package
  • Linting: ESLint

⚙️ Installation

No global installation needed. Just run it via npx:

npx create-lambda-graphql-app

🚀 Usage

🆕 Creating a New Project

To create a new project, simply run:

npx create-lambda-graphql-app cool-project-name

The CLI will guide you through the setup process — asking for the project name, folder structure, and initial handler creation.


📁 Project Structure

Your generated project will look like this:

├── .vscode/
│   └── launch.json
├── local-test/
│   └── your-handler/
│       ├── local-test.json
│       ├── local-test.mjs
├── handlers/
│   └── your-handler/
│       ├── index.mjs
│       ├── constants/
│       ├── dal/
│       ├── dao/
│       ├── exceptions/
│       ├── helpers/
│       ├── transformers/
│       └── validators/
├── schema/
│   └── schema.graphql
├── mapping/
│   └── request.vtl
│   └── response.vtl
├── template.yaml
├── .env
├── .npmignore
├── .gitignore
├── package.json
└── ...

Folder Breakdown

  • handlers/: Each folder is an independent Lambda function.
  • schema/schema.graphql: Your GraphQL schema definition.
  • template.yaml: The AWS SAM template that defines your Lambda functions and API.

🧩 Add a Handler to Existing Project

You can add a new handler anytime without breaking your existing project.

npx create-lambda-graphql-app add <handler-name>

This command will:

  1. Prompt for a handler name.
  2. Create all standard subfolders (constants, dao, helpers, etc.).
  3. Update template.yaml with the new function.
  4. Update the GraphQL schema with new mutations/queries.

🧰 Local Development

To run locally:

sam build
sam local start-api

☁️ Deployment

Deploy to AWS using the SAM CLI:

sam build
sam deploy --guided

You’ll be prompted for the stack name, AWS region, and other configuration details.


🤝 Contributing

Contributions are welcome!
If you find a bug or want to suggest a feature, feel free to open an issue or submit a PR.


📄 License

This project is licensed under the MIT License.


💬 Author

Developed with ❤️ by Jamal
GitHub: @unsuredev
NPM: create-lambda-graphql-app