GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — graphql-lambda-subscriptions/docs at main · reconbot/graphql-lambda-subscriptions

This repository was archived by the owner on May 17, 2025. It is now read-only.

Expand file tree

/

docs

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

docs

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
interfaces
interfaces
 
 
.nojekyll
.nojekyll
 
 
README.md
README.md
 
 

README.md

Outline

graphql-lambda-subscriptions

graphql-lambda-subscriptions

Table of contents

Interfaces

  • APIGatewayWebSocketEvent
  • APIGatewayWebSocketRequestContext
  • ApiGatewayManagementApiSubset
  • PubSubEvent
  • ServerArgs
  • StateFunctionInput
  • SubscribeOptions
  • SubscribePseudoIterable
  • SubscriptionServer

Type Aliases

  • LoggerFunction
  • MaybePromise
  • SubscribeArgs
  • SubscriptionFilter
  • WebSocketResponse

Functions

  • makeServer
  • subscribe

Type Aliases

LoggerFunction

Ƭ LoggerFunction: (message: string, obj: Record<string, any>) => void

Type declaration

▸ (message, obj): void

Log operational events with a logger of your choice. It will get a message and usually object with relevant data

Parameters
Name Type
message string
obj Record<string, any>
Returns

void


MaybePromise

Ƭ MaybePromise<T>: T | Promise<T>

Type parameters

Name
T

SubscribeArgs

Ƭ SubscribeArgs<TRoot, TArgs, TContext>: [root: TRoot, args: TArgs, context: TContext, info: GraphQLResolveInfo]

Type parameters

Name Type
TRoot unknown
TArgs Record<string, any>
TContext unknown

SubscriptionFilter

Ƭ SubscriptionFilter<TSubscribeArgs, TReturn>: Partial<TReturn> | void | (...args: TSubscribeArgs) => MaybePromise<Partial<TReturn> | void>

Type parameters

Name Type
TSubscribeArgs extends SubscribeArgs = SubscribeArgs
TReturn extends Record<string, any> = Record<string, any>

WebSocketResponse

Ƭ WebSocketResponse: Object

Type declaration

Name Type
body string
headers? Record<string, string>
statusCode number

Functions

makeServer

▸ makeServer(opts): SubscriptionServer

Parameters

Name Type
opts ServerArgs

Returns

SubscriptionServer


subscribe

▸ subscribe<T, TRoot, TArgs, TContext>(topic, options?): SubscribePseudoIterable<T, SubscribeArgs<TRoot, TArgs, TContext>>

Creates subscribe handler for use in your graphql schema.

subscribe is the most important method in the library. It is the primary difference between graphql-ws and graphql-lambda-subscriptions. It returns a SubscribePseudoIterable that pretends to be an async iterator that you put on the subscribe resolver for your Subscription. In reality it includes a few properties that we use to subscribe to events and fire lifecycle functions. See SubscribeOptions for information about the callbacks.

Type parameters

Name Type
T extends PubSubEvent
TRoot extends unknown = any
TArgs extends Record<string, any> = any
TContext extends unknown = any

Parameters

Name Type Description
topic T["topic"] Subscriptions are made to a string topic and can be filtered based upon the topics payload.
options SubscribeOptions<T, SubscribeArgs<TRoot, TArgs, TContext>> Optional callbacks for filtering, and lifecycle events.

Returns

SubscribePseudoIterable<T, SubscribeArgs<TRoot, TArgs, TContext>>

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.