Runtimes
Web triggers
Async functions
Product REST APIs
Fetch APIs

Function Arguments

Forge functions recieve two arguments, a module specific payload and an object containing contextual information for the function invocation.

1
2
export const handler = (payload, context) => {
  // Do something
}

Functions implemented with @forge/resolver resolver definitions receive arguments differently.

Payload Schema

The payload is entirely module specific, for example a webtriggers request.

Context Schema

Context is the same for all modules.

PropertyType
principal{ accountId: string } | undefined
installContextstring
workspaceIdstring | undefined
license{ isActive: string } | undefined

Rate this page: