INNER CODE UNIT · TypeScript
isGQLConnectionInit
michalkvasnicak/aws-lambda-graphql · packages/aws-lambda-graphql/src/protocol/index.ts:77
export function isGQLConnectionInit(event: any): event is GQLConnectionInit {
return (
event &&
typeof event === 'object' &&
event.type === CLIENT_EVENT_TYPES.GQL_CONNECTION_INIT
);
}
/**
* Client -> Server
*/
export interface GQLConnectionTerminate {
// id is not sent
// see https://github.com/apollographql/subscriptions-transport-ws/blob/master/src/client.ts#L170
payload?: {
[key: string]: any;
};
type: CLIENT_EVENT_TYPES.GQL_CONNECTION_TERMINATE;