Skip to content

Where is selectionSet in a list query applied? #3317

@mkaivs

Description

@mkaivs

DynamoDB query supports ProjectionExpression to read partial record (a subset of fields) instead of full record (all fields), when fetching a large number records, if only a small number fields are needed, applying selectionSet at the AppSync layer (resolver) is inefficient (more RCUs, more data transferring).

I take a look that the resolver created by amplify for the list query of my DynamoDB table (also created by amplify), it doesn't use ProjectionExpression so DynamoDB always read full records, give them to the resolver, then the resolver filters for fields in selectionSet and returns only those fields to client.

Can someone from the amplify dev team confirms if selectionSet in a list query applied at dynamodb layer (via ProjectionExpression) or appsync layer in the list resolver generate by amplify?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions