Skip to content

Change this.input to args.input in DocumentMarshall middlewareΒ #6936

@zshzbh

Description

@zshzbh

Describe the feature

Source code
In order to mutate the input of DynamoDBDocumentClient operations, we need to add addRelativeTo with { relation: "after", toMiddleware: "DocumentMarshall" } .

This is because we assign this.input to args.input in DocumentMarshall middleware - args.input = marshallInput(this.input, this.inputKeyNodes, marshallOptions);

Change this.input to args.input in DocumentMarshall middleware, so that we can use stack.add with step:initial`` to mutate the input.

This is related to this issue - #6743

Use Case

we can use stack.add with step:"initial" to mutate the input.

Proposed Solution

Change this.input to args.input in DocumentMarshall middleware

Change
args.input = marshallInput(this.input, this.inputKeyNodes, marshallOptions);
to
args.input = marshallInput(args.input, this.inputKeyNodes, marshallOptions);

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

SDK version used

latest

Environment details (OS name and version, etc.)

OS

Metadata

Metadata

Assignees

Labels

closed-for-stalenessfeature-requestNew feature or enhancement. May require GitHub community feedback.p2This is a standard priority issuepending-releaseThis issue will be fixed by an approved PR that hasn't been released yet.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions