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

Amplifyの紹介/amplify-introduction

 Amplifyの紹介/amplify-introduction

howyi

May 03, 2019
Tweet

More Decks by howyi

Other Decks in Programming

Transcript

  1. LambdaΛ࢖ͬͨAPIαʔόΛ࡞Δ •amplify add function •ExpressͷίʔυΛੜ੒͢ΔઃఆΛબ୒ •amplify add api → API

    Gateway Λબ୒ •add functionͰ௥Ճͨ͠lambdaͱ݁߹͢ΔΑ͏ʹઃఆ •amplify push •APIαʔόΛpush →
  2. AppSyncͷGraphQL Transform type Blog @model { id: ID! name: String!

    posts: [Post] @connection(name: "BlogPosts") } type Post @model { id: ID! title: String! blog: Blog @connection(name: "BlogPosts") comments: [Comment] @connection(name: "PostComments") } type Comment @model { id: ID! content: String post: Post @connection(name: "PostComments") } ϦϨʔγϣϯͷఆٛ @modelΛ͚ͭΔͱDynamoDBͷςʔϒϧͱͳΔ
  3. AppSyncͷGraphQL Transform type Blog @model { id: ID! name: String!

    posts: [Post] } $ amplify gql-compile type Blog { id: ID! name: String! posts: [Post] } type Query { getBlog(id: ID!): Blog } Type Mutation { createBlog(input: CreateBlogI updateBlog(input: CreateBlogI deleteBlog(input: CreateBlogI } CRUDૢ࡞ͷQueryɺMutation ͦΕʹඥͮ͘ResolverΛࣗಈੜ੒ ͦͷଞʹ΋ListऔಘͷQuery΍ SubscriptionͳͲ͕ࣗಈൃߦ͞ΕΔ