Skip to content

Apollo transport layer for direct invocation of AWS Lambdas

Notifications You must be signed in to change notification settings

GuildEducationInc/apollo-link-lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm

Apollo Link Lambda

The Lambda link is similar in functionality to the http-link except it allows direct invocation of an AWS Lambda vs requiring an HTTP call. This has the benefit of allowing cross-lambda calls to stay within a given VPC and not have to go out to the greater internet and back in via API Gateway

Usage

JavaScript

import { LambdaLink } from "apollo-link-lambda";

const options = {
  functionName: 'MyLambdaFunc'
  httpMethod: 'GET'
  invocationType: 'Event'
};
const lambdaLink = new LambdaLink(options)
// Use just like you would an HTTP link

TypeScript

import { LambdaLink, LambdaOptions } from "apollo-link-lambda";

const options: LambdaOptions = {
  functionName: 'MyLambdaFunc'
  httpMethod: 'GET'
  invocationType: 'Event'
};
const lambdaLink = new LambdaLink(options)
// Use just like you would an HTTP link

About

Apollo transport layer for direct invocation of AWS Lambdas

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published