Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Amplify API (GraphQL) が簡単すぎて泣けてくる #jawsug_asa #...
Search
Kihara, Takuya
PRO
July 22, 2020
Technology
0
1.4k
Amplify API (GraphQL) が簡単すぎて泣けてくる #jawsug_asa #jawsug
https://jawsug-asa.connpass.com/event/180589/
#jawsug_asa #jawsug
AWS Amplify の API (GraphQL) の話。
Kihara, Takuya
PRO
July 22, 2020
Tweet
Share
More Decks by Kihara, Takuya
See All by Kihara, Takuya
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
430
Amplify Gen2 Deep Dive / How to convey backend types to the frontend #30DaysOfAmplify
tacck
PRO
0
7
TypeScript 雰囲気勢がライブラリのコードリーディングで得た知識 #sacss
tacck
PRO
1
33
ライブコーディングで知るAmplify Gen 2 #AWSAmplifyJP
tacck
PRO
1
120
AWS Amplify Gen 2 GA記念 ~Gen1との違いを確認
tacck
PRO
0
340
Amplify Gen2 が GA したよ! #jawsug_sapporo #jawsug
tacck
PRO
0
310
Flutter で "Hello World!! #ゆるWeb札幌
tacck
PRO
0
140
AWS Lambda で LLRT を動かしてみた #北海道まったりLT大会
tacck
PRO
0
150
地方から始める登壇のステップアップ 〜Java Do から JJUG CCC への登壇参加記録 #javado
tacck
PRO
0
200
Other Decks in Technology
See All in Technology
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.2k
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
220
AWS Lambda のトラブルシュートをしていて思うこと
kazzpapa3
2
210
アプリエンジニアのためのGraphQL入門.pdf
spycwolf
0
140
The Rise of LLMOps
asei
9
2.1k
SRE×AIOpsを始めよう!GuardDutyによるお手軽脅威検出
amixedcolor
1
270
【平成レトロ】へぇボタンハック👨🔧
vanchan2625
0
150
Storybook との上手な向き合い方を考える
re_taro
5
3.8k
セキュリティ運用って包括的にできていますか?SaaSを使って次のステップへ / Comprehensive Cyber Security Operations for Cloud Services Using SaaS
sakaitakeshi
0
220
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
350
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
280
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
2.1k
Featured
See All Featured
Building Adaptive Systems
keathley
38
2.3k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Building Applications with DynamoDB
mza
90
6.1k
KATA
mclloyd
29
14k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
The Invisible Side of Design
smashingmag
298
50k
Typedesign – Prime Four
hannesfritz
40
2.4k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Transcript
גࣜձࣾϊʔεσΟςʔϧ ։ൃ%JWJTJPOٕज़ਪਐ(SPVQ ݪ +"846(ேձKBXTVH@BTB "NQMJGZ"1* (SBQI2- ͕ ؆୯͗ͯ͢ٽ͚ͯ͘Δ ݄
+"846(ேձKBXTVH@BTB ୭ 2 PHP Conference Hokkaido 2019 ໊લ ݪ
/ ɹɹ@tacck ॴଐ גࣜձࣾϊʔεσΟςʔϧ ։ൃDivision ٕज़ਪਐGroup / Leader ओ࠵ ΏΔWebษڧձ@ࡳຈ εϚʔτεϐʔΧʔͰ༡΅͏ձ@ࡳຈ ͖ͳ AWSαʔϏε Route 53 ͖ͳ ϑΟΪϡΞεέʔτͷٕ εϓϨουɾΠʔάϧ
+"846(ேձKBXTVH@BTB 3 "NQMJGZ"1* (SBQI2- ͕ ؆୯͗ͯ͢ٽ͚ͯ͘Δ
+"846(ேձKBXTVH@BTB "84"NQMJGZ 4 https://aws.amazon.com/jp/amplify/
+"846(ேձKBXTVH@BTB "84"NQMJGZ 5 https://aws.amazon.com/jp/amplify/ ৭ʑศརͳ͍ͭ͢͝
+"846(ேձKBXTVH@BTB 6 ࡞ྫ
+"846(ேձKBXTVH@BTB • ͜͜࠷ۙɺͳͳ࡞͍ͬͯ·͢ɻ FNPGVMM ϦϞʔτײڞ༗αʔϏε 7 ΞΫηεͯ͠Έ͍ͯͩ͘͞ʂʂʂ https://emofull.com/
+"846(ேձKBXTVH@BTB ࣾπʔϧ ϑϦʔΞυϨε࠲੮֬ೝ 8 https://www.northdetail.co.jp/blog/870/
+"846(ேձKBXTVH@BTB 9
+"846(ேձKBXTVH@BTB 10 "1* (SBQI2-
+"846(ேձKBXTVH@BTB • AWS AppSync ΛɺϑϩϯτΤϯυ͔Β؆୯ʹ͑Δɻ (ඪ४ͩͱɺ DynamoDB ΛετϨʔδͱͯ͠͏ɻ) • Amplify
CLI Λ͏ͱɺ͍ΘΏΔ CRUD ͷΫΤϦΛ ੜͯ͘͠ΕΔɻ • ݺͼग़͠ํ͕Θ͔Εɺ͙͢ʹ͑Δɻ "1* (SBQI2- 11
+"846(ேձKBXTVH@BTB 12 GraphQL Schema ϑΝΠϧ amplify/backend/api/asuuyt/schema.graphql ~~~ type Todo @model
{ id: ID! name: String! description: String }
+"846(ேձKBXTVH@BTB 13 import { API, graphqlOperation } from 'aws-amplify' import
{ getTodo, listTodos } from ‘@/graphql/queries’ ~~~ // queries const todo = await API.graphql( graphqlOperation(getTodo, { id: this.todoId }), ).catch(err => console.error('getTodo', err)) const todos = await API.graphql( graphqlOperation(listTodos, {}), ).catch(err => console.error('listTodos', err))
+"846(ேձKBXTVH@BTB 14 import { API, graphqlOperation } from 'aws-amplify' import
{ createTodo, updateTodo, deleteTodo } from '@/graphql/mutations' ~~~ // mutations const createdTodo = await API.graphql( graphqlOperation(createTodo, { input: { name: 'new todo', description: 'sample description' }, }), ).catch(err => console.error('createTodo', err)) const updatedTodo = await API.graphql( graphqlOperation(updateTodo, { input: { id: createdTodo.data.createTodo.id, name: 'update todo', description: 'update description', }}), ).catch(err => console.error('updateTodo', err)) const deletedTodo = await API.graphql( graphqlOperation(deleteTodo, { input: { id: createdTodo.data.createTodo.id }, }), ).catch(err => console.error('deleteTodo', err))
+"846(ேձKBXTVH@BTB 15 import { API, graphqlOperation } from 'aws-amplify' import
{ onCreateTodo, onUpdateTodo, onDeleteTodo } from '@/graphql/subscriptions' ~~~ // subscriptions const subscriptionCreateTodo = API.graphql( graphqlOperation(onCreateTodo), ).subscribe({ next: data => console.log(data) }) const subscriptionUpdateTodo = API.graphql( graphqlOperation(onUpdateTodo), ).subscribe({ next: data => console.log(data) }) const subscriptionDeleteTodo = API.graphql( graphqlOperation(onDeleteTodo), ).subscribe({ next: data => console.log(data) })
+"846(ேձKBXTVH@BTB 16 const todo = await API.graphql( graphqlOperation(getTodo, { id:
this.todoId }), ).catch(err => console.error('getTodo', err)) const createdTodo = await API.graphql( graphqlOperation(createTodo, { input: { name: 'new todo', description: 'sample description' }, }), ).catch(err => console.error('createTodo', err)) const subscriptionCreateTodo = API.graphql( graphqlOperation(onCreateTodo), ).subscribe({ next: data => console.log(data) })
+"846(ேձKBXTVH@BTB 17 const todo = await API.graphql( graphqlOperation(getTodo, { id:
this.todoId }), ).catch(err => console.error('getTodo', err)) const createdTodo = await API.graphql( graphqlOperation(createTodo, { input: { name: 'new todo', description: 'sample description' }, }), ).catch(err => console.error('createTodo', err)) const subscriptionCreateTodo = API.graphql( graphqlOperation(onCreateTodo), ).subscribe({ next: data => console.log(data) })
+"846(ேձKBXTVH@BTB 18
+"846(ேձKBXTVH@BTB 19 ·ͱΊ
+"846(ேձKBXTVH@BTB • Amplify API (GraphQL) ͍࢝ΊΔͷ؆୯͗ͯ͢ٽ͚ͯ͘Δɻ • ಛʹϦΞϧλΠϜ௨(subscriptions)͕ɺ ؆୯͗ͯ͢େ߸ٽɻ
·ͱΊ 20
+"846(ேձKBXTVH@BTB • Amplify API (GraphQL) ͍࢝ΊΔͷ؆୯͗ͯ͢ٽ͚ͯ͘Δɻ • ಛʹϦΞϧλΠϜ௨(subscriptions)͕ɺ ؆୯͗ͯ͢େ߸ٽɻ
• ηΩϡϦςΟΛߴΊΑ͏ͱ͢Δͱɺ Α͘Θ͔Βͳ͘ͳ͖ͬͯͯٽ͚ͯ͘Δɻ ·ͱΊ 21
+"846(ேձKBXTVH@BTB • ϒϩάͰӶҙࣥචத ͓·͚ 22 https://www.northdetail.co.jp/blog/905/
+"846(ேձKBXTVH@BTB 23 FOE