'Does aws appsync have scan operations to scan dynamoDB

I am building a serveless web app with aws amplify - graphql - dynamodb. I want to know what exactly a scan operation is in this context. For example, I have an User table and queries listUsers and getUser were generated from amplify schema. Are they scan operations or queries?

Thank you for your answers in advance as I could only find the definition of a scan operation but there aren't example for me to identify one when it comes to graphql.



Solution 1:[1]

Amplify uses Filter Expressions which are a type of Query.

You can see this yourself by looking at the .vtl files that amplify generates and uploads to appsync.

They are located here: amplify/#current-cloud-backend/api/[API NAME]/build/resolvers

In that folder you can open up one of the Query.list[Model].req.vtl. Even if you are not familiar with Velocity Template Language you can still get the idea. You can see that it uses the expression $util.transform.toDynamoDBFilterExpression.

More info about that util and then looking at the docs for toDynamoDBFilterExpression.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 nmajor