I want to send a query with filterexpression and limit in javascript resolver to DynamoDB . DynamoDB returns the matching values up to the limit, and a key in LastEvaluatedKey to apply in a subsequent operation to continue the operation. It is possible to get zero matched items at first operation. How can I implement in javascript resolver to send again a subsequent operation to get all matched items to the limit? In another word, how can I paginate in javascript resolver? Not pagination at Client. Or I have to implement in lamdbda function to get all matched items to the limit?
Is it possible to execute more than one operation in appsync javascript resolver?
137 views Asked by Manuel Gnerlich At
1
There are 1 answers
Related Questions in AMAZON-DYNAMODB
- S3 integration testing
- Why Scanning GSI on DynamoDb doesnt work as fast as expected when using CONTAINS?
- TypeError trying to upload a row to DynamoDB; Unsupported type "<class 'numpy.int64'>" for value "0"
- Terraform/AWS - Error while acquiring state lock
- Problems with Sets in Nested Schemas with Dynamoose
- DynamoDBIndexHashKey annotation on entity field make queries fail
- AWS DynamoDB QueryRequest multiple sort key values
- AWS insert lambda function values into DynamoDB
- How to integrate JIRA with AWS dynamodb service, If any story/task movement has been occured on jira dashabord it should reflect on the AWS dynamodb?
- Create custom IAM policy to hide S3 objects based on a catalog hosted in DynamoDB
- What is the relation between partition key and partition in dynamodb
- Enforce schema on schemaless DynamoDB database
- DynamoDB: Using SET on an UpdateExpression to increment a field is not working
- DynamoDB structure recommendation
- DynamoDB TTL Interaction When Dealing with A Single Partition Key
Related Questions in AWS-APPSYNC
- Use AWS AppSync as a target group for AWS Application Load Balancer
- I am working on aws appsync project where one of my resolver is not getting identity information in the context while others are getting
- Is there any way to get around the Exceptions of enhanced subscription filters of AppSync at the server side?
- Unable to auto-generate resolvers after updating schema in AWS Amplify
- aws appsync custom subscription resolver: connection failed, runtime error
- Global Secondary Indexes in AppSync Schemas (with DynamoDB)
- GraphQL query validation with schema which we fetch using get_introspection_schema method
- AWS AppSync XRay Tracing Context not sharing with Auth Lambda
- AWS - Make multiple HTTP requests in pipeline resolver function
- Appsync "Variable 'timestamp' has an invalid value."
- Why is my resolver query function not returning items from dynamodb that has an sk value above 9999
- Auto generated Amplify ManyToMany table - Unable to serialize `2023-06-12T01:48:00.288432` as a valid DateTime Object
- Follow-redirects setting for AWS appsync
- Is there any way to handle big responses in Graphql (Appsync)?
- Amplify AppSync Codegen Error - invalid WIN32 path characters
Related Questions in AWS-APPSYNC-RESOLVER
- I am working on aws appsync project where one of my resolver is not getting identity information in the context while others are getting
- Is there any way to get around the Exceptions of enhanced subscription filters of AppSync at the server side?
- aws appsync custom subscription resolver: connection failed, runtime error
- GraphQL query validation with schema which we fetch using get_introspection_schema method
- AWS AppSync VTL Templates failing
- AWS CDK - Appsync Javascript Resolver Validation with DynamoDB datasource
- "Cannot return null for non-nullable type: 'ID' within parent 'MasterBom' (/queryMasterBomWithin/id)"
- Is it possible to set the auth type when evaluating resolver code via AppSync?
- Set-Cookie header not working AWS AppSync
- AppSync DynamoDB types not working for generated create function
- In AWS AppSync VTL resolvers how to change a value before writing it to the datasource?
- Custom resolver / response VTL templates for fine grained auth with AppSync and DataStore
- How can we execute two queries with same $context in AppSync
- AppSync VTL resolver - how to resolve parse error
- Why does AWS AppSync only directly support VTL (Velocity Template Language) for Resolvers?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
You are forced to implement client side logic to meet this use-case. The alternative is to set your limit considerably higher than you need, and discard the items you don't need when returned.
The issue isn't Appsync, but how DynamoDB implements filtering, which I assume is what you are doing. The limit is applied before the FilterExpression, meaning you can get
<=Limitnumber of items. To apply your custom logic for pagination you will need to use a Lambda Resolver.