jeremydaly / jeremydaly/lambda-api

Add a context

Open
#197 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.5k
Forks
127
Avg merge
31m
Merged PRs (30d)
2

Description

Hey, im loving lambda-api so far.
Quick question, is there a way to add a context to handlers ?
Let's say

app.get("/posts", getPosts);
async function getPosts(req,res,context){
const prisma = context.prisma;
return prisma.posts.findMany({});
}

And this is basically for code splitting

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the app.get("/posts", getPosts) example and trace how lambda-api invokes the getPosts handler. Define what "context" should contain and how code splitting should use it; done means the requested context is available to handlers without breaking existing handler usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, javascript, node.js
Domain
api, backend, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.