How to use the aws-lambda-graphql.DynamoDBConnectionManager function in aws-lambda-graphql

To help you get started, we’ve selected a few aws-lambda-graphql examples, based on popular ways it is used in public projects.

github michalkvasnicak / aws-lambda-graphql / packages / chat-example-server / src / index.ts View on Github external
endpoint: 'http://localhost:3001',
      }
    : {}),
});
const dynamoDbClient = new DynamoDB.DocumentClient({
  ...(process.env.IS_OFFLINE
    ? {
        endpoint: 'http://localhost:8000',
      }
    : {}),
});

const eventStore = new DynamoDBEventStore({ dynamoDbClient });
const pubSub = new PubSub({ eventStore });
const subscriptionManager = new DynamoDBSubscriptionManager({ dynamoDbClient });
const connectionManager = new DynamoDBConnectionManager({
  apiGatewayManager,
  dynamoDbClient,
  subscriptions: subscriptionManager,
});

type MessageType = 'greeting' | 'test';

type Message = {
  id: string;
  text: string;
  type: MessageType;
};

type SendMessageArgs = {
  text: string;
  type: MessageType;

aws-lambda-graphql

Apollo server for AWS Lambda with WebSocket subscriptions support over API Gateway v1 + v2

MIT
Latest version published 9 months ago

Package Health Score

61 / 100
Full package analysis

Similar packages