Giter VIP home page Giter VIP logo

Comments (10)

mikeparisstuff avatar mikeparisstuff commented on June 3, 2024 2

To get a set of values based on id, you should use the BatchGetItem resolver operation as outlined here https://docs.aws.amazon.com/appsync/latest/devguide/tutorial-dynamodb-batch.html. This is currently a bit tough to use when using multiple environments because you need to know the table name in the resolver and ideally would be encapsulated as a transformer such as @batchGet. We have plans to open up the CLI such that you can run custom transformers and that would be the best way to get this working in a reproducible manner.

from amplify-category-api.

andreialecu avatar andreialecu commented on June 3, 2024

@mikeparisstuff, have there been any recent developments into making this work with multiple environments?

from amplify-category-api.

tomhirschfeld avatar tomhirschfeld commented on June 3, 2024

+1, is there any way to do this more easily now?

from amplify-category-api.

crolly avatar crolly commented on June 3, 2024

The batchGet is actually the best shot at doing this, although you will be limited to 100 items (https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchGetItem.html). The sole problem at the moment, however, is that as far as I know, we are not able to inject any environment variables such as the table name - which is required for the BatchGetItem - into the custom resolver.

This is supposedly tracked in #408.
Maybe somebody in the near future will find some time to dig deep into it and find a way to make this work.

Other than that, I think, you can pretty much only run the expensive scan with the filter expression.

Or instead, in case you are using GraphQL, you can run the list query with a filter. This should already be a scan with the filter, depending on where you want to have your logic for building the filter.

from amplify-category-api.

crolly avatar crolly commented on June 3, 2024

Oh, #415 ist also talking about this. I don't know, what the pricing implications are, but if you really need a batchGet you can of course always lean back to a lambda for the resolver. Lambdas can be added with amplify add function and detailed configuration which other resources access is required to.

from amplify-category-api.

yaquawa avatar yaquawa commented on June 3, 2024

any updates on this?

from amplify-category-api.

Lorenzohidalgo avatar Lorenzohidalgo commented on June 3, 2024

any updates on this?

from amplify-category-api.

mandrelbrotset avatar mandrelbrotset commented on June 3, 2024

It’s 2023 already, any updates on this?

from amplify-category-api.

emiltorlen avatar emiltorlen commented on June 3, 2024

the future called and is asking for updates?

from amplify-category-api.

NairiAreg avatar NairiAreg commented on June 3, 2024

Yeah this is still needed

from amplify-category-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.