Advanced Data Access Patterns with GraphQL, Amazon DynamoDB, and AWS Amplify

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 มิ.ย. 2024
  • In this video I go through how you can use GraphQL, Amazon DynamoDB, and the Amplify CLI to model multiple data access patterns for performing many different types of queries against a DynamoDB table and strategies for querying against global secondary indexes.

ความคิดเห็น • 57

  • @neaumusic
    @neaumusic ปีที่แล้ว

    I’m so excited to watch all these videos

  • @randomlife3050
    @randomlife3050 3 ปีที่แล้ว +1

    Bro you should be having a lot more subscribers. The content you present is very detailed and helpful.

  • @tariqmahamid1633
    @tariqmahamid1633 2 ปีที่แล้ว +1

    Great tutorial!

  • @cafemike111
    @cafemike111 3 ปีที่แล้ว +1

    This is an extremely helpful session that helps me understand the capabilities in Amplify and AppSync. Thank you very much! As a side note though, a few of the auto generated GSIs in this demo may imply hot partitions in DynamoDB, given the primary keys (for example baseType and category) by nature are not random. I would suggest to mention that potential drawback during the demo next time so developers can hopefully be more mindful about this. All in all, thank you Nader for the thorough demo!

  • @contractorwolf
    @contractorwolf 4 ปีที่แล้ว +2

    Wow Nader, this really filled in some of the gaps in my understanding of using DynamoDB properly with Amplify. I am going to try this out immediately, thanks!

  • @dialnco
    @dialnco 4 ปีที่แล้ว +1

    Awesome!! just updated a list query to a GSI with field and sort after the video. Worked right away ;) Thank!!

  • @lardosian
    @lardosian 4 ปีที่แล้ว +1

    Thanks Nader, please keep these videos coming!

  • @gpathela
    @gpathela 3 ปีที่แล้ว

    Amazing tutorial for AppSync & GraphQL. Must watch for beginners.

  • @kickbird2008
    @kickbird2008 4 ปีที่แล้ว

    Way better than Amplify document where I know each word but understand nothing collectively.

  • @VincentFulco
    @VincentFulco 4 ปีที่แล้ว +2

    Excellent as always

  • @hongwenli541
    @hongwenli541 2 ปีที่แล้ว

    Very Nice Video!
    I was looking for this for a few hours! Great!

  • @samthetester8099
    @samthetester8099 3 ปีที่แล้ว

    Thank you so much for these really helpful videos 🙏

  • @mohammedgt8102
    @mohammedgt8102 3 ปีที่แล้ว

    Awesome work Nader!!

  • @VincentFulco
    @VincentFulco 4 ปีที่แล้ว +3

    Awesome, can't wait!

  • @tylermorales9043
    @tylermorales9043 2 ปีที่แล้ว +3

    Love this! Can you make an updated version to this as the Amplify version was bumped up recently and some of the new directives are confusing.

  • @joshbedo8291
    @joshbedo8291 3 ปีที่แล้ว +2

    This was great you explain things so well. I was a little stuck on graphql transforms (@key and @connection confused me) but this totally made everything super clear.

  • @sylvain1099
    @sylvain1099 3 ปีที่แล้ว

    Thanks mate, very useful

  • @101appsCoZa
    @101appsCoZa 4 ปีที่แล้ว

    great tutorial. thanks!

  • @haticeedis5032
    @haticeedis5032 3 ปีที่แล้ว

    Awesome, thank you so much ♥️

  • @quangle5701
    @quangle5701 4 ปีที่แล้ว +4

    I am excited to learn how different query patterns of the DynamoDB single table design best practice can be supported with GraphQL and AWS Amplify.

  • @loganpowell
    @loganpowell 4 ปีที่แล้ว +8

    Ah! I just missed it! Could you go over custom resolvers in a future video (e.g., batching / transactions / etc.)?

  • @RahulRaj-mo9ck
    @RahulRaj-mo9ck 3 ปีที่แล้ว

    Thank You!

  • @emersonsmithperu
    @emersonsmithperu 4 ปีที่แล้ว +9

    Tranform Graphql advanced please.
    ​Workshop amplify, graphql, react, aws S3.

  • @hariharan16
    @hariharan16 4 ปีที่แล้ว +10

    What can I say this is the talk I needed to fill that gaps I had in my understanding. Thanks you. Quick question with so many GSIs isn’t dynamodb replicating the data and would end up increasing the cost? Is it ok to create so many GSI?

    • @bernhardsmuts2265
      @bernhardsmuts2265 4 ปีที่แล้ว +2

      also wondering this...

    • @garygriffin7979
      @garygriffin7979 3 ปีที่แล้ว +1

      You can get some efficiency by overloading GSIs, using the same one for different node types.
      Ref: docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-gsi-overloading.html
      Ref: www.goingserverless.com/blog/single-table-dynamodb-for-appsync

  • @bennettsmith6745
    @bennettsmith6745 4 ปีที่แล้ว

    Great presentation. Part way through, you show a slide titled "Pointers". It mentions "When changing index structures via Amplify CLI, remove then add them back." I am having trouble understanding how I would do this in a multi-environment setup. Do you have any suggestions on how to push index or model changes from a dev environment all the way through to production? Do I really need to push each incremental change all the way to production before moving to the next step?

  • @tranminhhaifet
    @tranminhhaifet 2 ปีที่แล้ว

    Thanks

  • @humblepolitician301
    @humblepolitician301 3 ปีที่แล้ว +1

    thank you. keep up the good work.

  • @ErayTonyali
    @ErayTonyali 3 ปีที่แล้ว +1

    It would be great if you explain the baseType usage a little more. I feel like you could've done all that without having the baseType field. When is this actually comes into play?

  • @visvajeet5609
    @visvajeet5609 2 ปีที่แล้ว

    👏

  • @iquabius
    @iquabius 3 ปีที่แล้ว

    I wonder how these data access patterns intersect with the models from Amplify DataStore...

  • @bernhardsmuts2265
    @bernhardsmuts2265 4 ปีที่แล้ว

    At 31:37 ... If you do this will you lose the data currently in the database? Say I have a working DB and I realise a query isn't working nicely and I need to update the index structure, won't deleting it and adding the next index structure delete all the data currently in the DB?

  • @AjitGoel
    @AjitGoel 4 ปีที่แล้ว +1

    Will this be recorded and show on youtube?

  • @MarkStatkus
    @MarkStatkus 3 ปีที่แล้ว

    Is there a good resource for dealing with a one to many relationship, but with the ability to specify sub query to reduce everything you’d get back. I guess in a way this would be like matching on ID and say UserID instead of just getting all (many) records back that only match on ID?

    • @MarkStatkus
      @MarkStatkus 3 ปีที่แล้ว

      I think I got it figured out .. I have Assets, then Attempts so I opted to :
      attempts: [Attempt] @connection(keyName: "attemptByAssetIndex", fields: ["id", "owner"]) # and now I can filter by id and owner

  • @lardosian
    @lardosian 4 ปีที่แล้ว +1

    I'm still a bit unsure of the table concept with appsync, do we have one dynamodb table in the end or multiple tables or could anyone help me understand better, thanks!

    • @lardosian
      @lardosian 3 ปีที่แล้ว +1

      @@zed8490 Thanks Kevin, turns out with amplify you have multiple tables, each model in your schema is converted to a dynamodb table.

  • @phantazzor
    @phantazzor 2 ปีที่แล้ว

    what if you just want to sort them by priority ?

  • @contractorwolf
    @contractorwolf 4 ปีที่แล้ว +1

    when you have an access pattern from the list at 13:34 that is a "search products by..." you are just using the beginsWith for the search right?

    • @naderdabit
      @naderdabit  4 ปีที่แล้ว

      Yes, exactly

    • @contractorwolf
      @contractorwolf 4 ปีที่แล้ว +1

      are there any solutions for doing more of a fuzzy search (name contains x, etc) in dynamodb that doesnt involve a full table scan?

    • @garygriffin7979
      @garygriffin7979 3 ปีที่แล้ว

      @@contractorwolf Ideally at least a PK value is known so that a key condition can be applied with a Query operation and limit what is retrieved from the db. Next best is to also include a range function on the sort key, e.g. PK = :pk and begins_with(SK, :prefix), to further limit what is returned by the database. After this cost of retrieval is incurred, a filter condition, e.g. contains(), can be applied to limit what subset of the queried data is sent to the client. The filter does not help with cost since the data has already been returned. If a key condition is not applicable, then a Scan operation must be used with something like contains(), which would involve a full table scan.

  • @vmailtk5
    @vmailtk5 3 ปีที่แล้ว

    Using a PK of baseType of Product for everything creates a "Hot Zone" on the partitions as everything is on the same partition leading to ProvisionedThroughputExceededException error. Is this the best way to go? I tried setting the PK as the ID but that then breaks the sorting of data

    • @vmailtk5
      @vmailtk5 2 ปีที่แล้ว

      @Pínned by Nader Dabit I'm not falling for this scam

  • @NyraDob
    @NyraDob 3 ปีที่แล้ว

    Question about auth. What happens if you have multiple owners. Like for eg., you might have a blog site that allows multiple ppl/users to edit and those users are not the original owner but have been given access to edit. How can you add this level of auth using the auth directive? Can i create a users type that is an array of user names? One thought was to create a group for those uses but i don't think using groups would make sense as I believe there is a cap with how many groups you can create.

    • @MarkStatkus
      @MarkStatkus 3 ปีที่แล้ว

      I will run into this too, I think I will head down a path of - {allow: owner, ownerField: "editors"} as a array of owners/editors .. I feel like for editors: AWSJSON in the schema though is the right move. Could be [ID] or [String] too .. guess we'll see!

  • @sushantbharat
    @sushantbharat ปีที่แล้ว

    make new tutorial on graphql with aplify

  • @kiquetal
    @kiquetal 3 ปีที่แล้ว

    annotation key is translated to a gsi?wow

  • @RaulGlasgow
    @RaulGlasgow 2 ปีที่แล้ว +1

    this is outdated now. need an update

  • @neaumusic
    @neaumusic ปีที่แล้ว

    I’m so excited to watch all these videos