Skip to content

refactor(event-handler): mark identity field as unknown in event #3922

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 13, 2025
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/event-handler/src/types/appsync-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,13 @@ type RouteOptions<T extends boolean | undefined = false> = {
// #region Events

type AppSyncEventsEvent = {
identity: null;
/**
* The `identity` field is marked as `unknown` because it varies based on the authentication type used in AppSync.
* When using an API key, it will be `null`. When using IAM, it will contain the AWS credentials of the user. When using Cognito,
* it will contain the Cognito user pool information. When using a Lambda authorizer, it will contain the information returned
* by the authorizer.
*/
identity: unknown;
result: null;
request: {
headers: Record<string, string>;
Expand Down
Loading