Upgrade to Pro — share decks privately, control downloads, hide ads and more …

サーバレスライブコマースシステムの構築

 サーバレスライブコマースシステムの構築

#jawsug #jawsug_asa

Kazuki Miura

October 27, 2020
Tweet

More Decks by Kazuki Miura

Other Decks in Technology

Transcript

  1. query お買い物 { id : 'aircaravan' } type Query {

    singlePost(id: ID!): Post } { "data": { "singlePost": { "id": "aircaravan", "timeSaleFlg": 1 } } } { "id": "aircaravan", "timeSaleFlg": 1 } AppSync Amplify DynamoDB
  2. mutation お買い物 {   timeSaleFlg: 1 } type Mutation {

    putPost(id: ID, timeSaleFlg: Int!): Post } { id: "aircaravan", timeSaleFlg: event.arguments.timeSaleFlg } Item: { id: "aircaravan", timeSaleFlg: event.arguments.timeSaleFlg } { "data": { "singlePost": { "id": "aircaravan", "timeSaleFlg": 1 } } } なんも返してない console AppSync Lambda DynamoDB query用にDynamoDBに保存
  3. subscriptin お買い物 console AppSync Amplify {   timeSaleFlg: 1 }

    type Subscription { onPutPost: Post @aws_subscribe(mutations: ["putPost"]) } { "data": { "onPutPost": { "id": "aircaravan", "timeSaleFlg": 1 } } } WebSocket type Mutation { putPost(id: ID, timeSaleFlg: Int!): Post }
  4. AppSync AppSync お買い物 {   timeSaleFlg: 0 } {  

    timeSaleFlg: 1 } shopify GraphQL 非表示 商品入れ替え 表示 イベント会場でインカム聞きながら コンソールで直操作
  5. AppSync AppSync Amplify お買い物 {   timeSaleFlg: 0 } {

      timeSaleFlg: 1 } shopify GraphQL イベント会場でインカム聞きながら コンソールで直操作 <v-if="timeSaleFlg"> 非表示 表示