Skip to content

Instantly share code, notes, and snippets.

@koingdev
Created July 22, 2019 09:36
Show Gist options
  • Save koingdev/cfe4224b5cd414135156e92b0f8e7a5f to your computer and use it in GitHub Desktop.
Save koingdev/cfe4224b5cd414135156e92b0f8e7a5f to your computer and use it in GitHub Desktop.
Query items with PK and response in an order based on range key
{
"version" : "2017-02-28",
"operation" : "Query",
"query" : {
"expression" : "author = :author",
"expressionValues" : {
":author" : $util.dynamodb.toDynamoDBJson($ctx.args.author)
}
},
## false -> DESC ORDER
"scanIndexForward" : false
}
@ohsik
Copy link

ohsik commented Aug 12, 2019

@koingdev Thank you! didn't know u replied here till today haha.

So as long as I have the scalable database structure, I can user resolvers for custom queries and mutations.

I ended up modifying the schema file little bit the way I think it makes sense here(https://gist.github.com/ohsik/1506c0530a6744cff158f8af408be731) and moving on to building the app again.

Thank you for the help again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment