New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@aws-appsync/utils

Package Overview
Dependencies
Maintainers
0
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-appsync/utils - npm Package Compare versions

Comparing version 1.9.0 to 1.10.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [1.10.0](https://github.com/aws/aws-appsync-toolkit/compare/v1.9.0...v1.10.0) (2024-10-30)
### Features
* Add event api specific type definitions ([0a8ab05](https://github.com/aws/aws-appsync-toolkit/commit/0a8ab05cd0e5067372a75240da38d598d8d71bcb))
# [1.9.0](https://github.com/aws/aws-appsync-toolkit/compare/v1.8.0...v1.9.0) (2024-07-17)

@@ -8,0 +19,0 @@

@@ -161,2 +161,88 @@ export * from './resolver-return-types';

};
type EventContext<T extends any = any> = {
/**
* An object that contains information about the caller. For more information about the
* structure of this field, see Identity.
*/
identity: Identity;
/**
* An object that contains information about the associated channel and namespace. For more
* information about the structure of this field, see EventInfo.
*/
info: EventInfo;
/**
* AWS AppSync supports passing custom headers from clients and accessing them in your GraphQL
* resolvers by using context.request.headers. You can then use the header values for actions
* such as inserting data into a data source or authorization checks.
*/
request: Request;
};
export type EventOnPublishContext<T extends any = any> = EventContext & {
/**
* An array representing events published into the system. For more information about the
* structure of this field, see Event. On populated in OnPublish handlers.
*/
events: IncomingEvent<T>[];
};
export type EventOnSubscribeContext = EventContext;
export type EventOnPublishResult<T extends any = any> = OutgoingEvent<T>[];
export type EventInfo = {
/**
* The Channel currently being published or subscribed to. For more information about the
* structure of this field, see Channel.
*/
channel: Channel;
/**
* The Channel Namespace currently being published or subscribed to. For more information
* about the structure of this field, see ChannelNamespace.
*/
channelNamespace: ChannelNamespace;
/**
* The operation currently being performed.
*/
operation: EventOperation;
};
export type EventOperation = 'SUBSCRIBE' | 'PUBLISH';
export type Channel = {
/**
* The full path of the channel.
*/
path: string;
/**
* Array of segments contained in the full channel path.
*/
segments: string[];
};
export type ChannelNamespace = {
/**
* The name of the channel namespace.
*/
name: string;
};
export type IncomingEvent<T extends any = any> = {
/**
* The ID associated with the event.
*/
id: string;
/**
* The payload associated with the event.
*/
payload: T;
};
export type OutgoingEvent<T extends any = any> = {
/**
* The ID associated with the event.
*/
id: string;
/**
* The payload associated with the event. Not required if an error is defined.
*/
payload?: T;
/**
* The error associated with the event. Populating this field with a value will
* result in this error being marked as a failure and not propogated through the
* system.
*/
error?: string;
};
type Context<TArgs extends Record<string, any> | unknown = any, TStash extends Record<string, any> = Record<string, any>, TPrev extends Record<string, any> | undefined = any, TSource extends Record<string, any> | undefined = any, TResult extends any = any> = {

@@ -163,0 +249,0 @@ /**

4

package.json
{
"name": "@aws-appsync/utils",
"version": "1.9.0",
"version": "1.10.0",
"description": "This project contains type definitions for AppSync resolver types.",

@@ -30,3 +30,3 @@ "main": "lib/index.js",

},
"gitHead": "56168d0b2066ff174113c1e0132c0fe42b7f6cdc"
"gitHead": "662b59d3b9bcbc2f505317995ef66682cf2919c1"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc