aws / aws-appsync-community

The AWS AppSync community
https://aws.amazon.com/appsync
Apache License 2.0
506 stars 32 forks source link

DynamoDBBatchGetItemRequest has incorrect type #360

Open LewisW opened 4 months ago

LewisW commented 4 months ago

The type for DynamoDBBatchGetItemRequest includes projection as a top level attribute:

export type DynamoDBBatchGetItemRequest = {
    operation: 'BatchGetItem';
    tables: {
        [tableName: string]: {
            keys: Key[];
            consistentRead?: boolean;
        };
    };
    projection?: DynamoDBProjectionExpression;
};

But the documentation shows it should be on the table:

type DynamoDBBatchGetItemRequest = {
  operation: 'BatchGetItem';
  tables: {
    [tableName: string]: {
      keys: { [key: string]: any }[];
      consistentRead?: boolean; 
      projection?: {
        expression: string;
        expressionNames?: { [key: string]: string };
      };
    };
  };
};

Using version 1.7.0 (the latest as-of posting).