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
GraphcoolとVue.jsでちょっとしたサービスを作ってみた話
Search
foxtrackjp
February 10, 2018
Technology
3.2k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
GraphcoolとVue.jsでちょっとしたサービスを作ってみた話
foxtrackjp
February 10, 2018
More Decks by foxtrackjp
See All by foxtrackjp
ITエンジニアが産業機器メーカーに転職してみた話
foxtrackjp
0
53
LOWYA ARを支える技術
foxtrackjp
0
220
Amazon_Connectで遊ぼう.pdf
foxtrackjp
0
360
温泉について語る
foxtrackjp
2
470
ARとかMRとかVRの話 ~実物から3Dモデルを生成するよ~
foxtrackjp
0
570
サーバーレス時代のユーザー認証を考える
foxtrackjp
13
5.2k
サーバレスアーキテクチャ
foxtrackjp
0
350
Other Decks in Technology
See All in Technology
SmartHR Engineering Team Deck
smarthr
1
3.4k
トークンマネジメントでAIにとって働きやすい環境を実現する
hikaruegashira
0
140
Model Studio CLI × Token Plan
maigo999
0
210
dbt in Microsoft Fabric
ryomaru0825
0
120
Go 1.27 の標準パッケージに uuid が入った!のでいろいろ喋る / go_127_std_go_uuid
convto
3
580
도구에서 동료까지: 10년차 AI 스타트업의 AI 적응기
inureyes
PRO
1
330
20260817_生成AIの動向と中学校・高等学校での活用を考える_v1.00_公開用
doradora09
PRO
0
190
Software Supply Chain Attackからクラウド環境を守るためにできること
lhazy
2
290
強化学習「理論」入門
enakai00
3
3.6k
AI画像認識を活用したゲーム内決済処理検証の自動化
gree_tech
PRO
0
110
2026-08-15 JAWS-UG 茨城 #16 Secrets ManagerにおけるSecret値の管理(Terraformの場合) / Secrets Manager Secrets
masasuzu
0
520
英語が話せなくてもKubeConスタッフに参加した話
yusuke427
2
1.1k
Featured
See All Featured
For a Future-Friendly Web
brad_frost
183
10k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Embracing the Ebb and Flow
colly
88
5.1k
The Curious Case for Waylosing
cassininazir
1
480
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
380
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
490
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
470
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
220
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Transcript
GraphcoolͱVue.jsͰͪΐͬͱ ͨ͠αʔϏεΛ࡞ͬͯΈͨ FUKUOKA Engineers Day 2018
Keigo Miyasue • ͖ͭͶ͕͖ • 30ࡀ • Ո۩ΠϯςϦΞϝʔΧʔͷΤϯδχΞ • @foxtrackjp
GraphQLͱʁ
ಛ1 • FacebookͷΫΤϦݴޠ • RESTͷؒͱ͍͏ΑΓɺSQLͷؒ • GitHubͷAPIGraphQLΛ࠾༻
ಛ2 • ඞཁͳσʔλ͚ͩʹΞΫηεͰ͖Δ
ಛ3 • ୯ҰΤϯυϙΠϯτ const httpLink = new HttpLink({ uri: 'http://localhost:60000/simple/v1/cjc4fa0b0000401526lki4orj',
})
GraphcoolͱVue.jsͰͪΐͬͱ ͨ͠αʔϏεΛ࡞ͬͯΈͨ
GraphcoolͱVue.jsͰͪΐͬͱ ͨ͠αʔϏεΛ࡞ͬͯΈͨ Α͘Θ͔Βͳ͍ͷ
͜Μͳͷ࡞ͬͨʂ
None
None
ͬͨαʔϏε vue-apollo αʔόʔ ΫϥΠΞϯτ Graphcool
Graphcool • ؆୯ʹGraphQLڥΛ࡞ͬͯ͘ΕΔ type User @model { id: ID! @isUnique
name: String! createdAt: DateTime! updatedAt: DateTime! posts: [Post!]! @relation(name: "UserPosts") } type Post @model { id: ID! @isUnique type: String! memo: String! minutes: Int! createdAt: DateTime! updatedAt: DateTime! owner: User! @relation(name: "UserPosts") } npm install -g graphcool graphcool-framework init Fox cd Fox graphcool-framework deploy Simple API: http://localhost:60000/simple/v1/cjc4fa0b0000401526lki4orj Relay API: http://localhost:60000/relay/v1/cjc4fa0b0000401526lki4orj Subscriptions API: ws://localhost:60000/subscriptions/v1/cjc4fa0b0000401526lki4orj
None
͔͜͜Βಥવͷϑϩϯτͷ
Vue.js + Vuex + vue-apollo export const GET_USER = gql`
query{ User(id: "cjdg6asik018w0152p0m3t2r7") { id name posts { id type minutes memo } } } ` created: function () { this.$apollo.query({ query: GET_USER, }).then(data => { this.$store.commit('updateUser', data.data.User); }) },
·ͱΊ • GraphQLָͰ͍͍ͧ • Graphcoolָʹڥߏஙͯ͘͠ΕΔͧ • Vue.jsָ͍ͧ͠ • ͖ͭͶ͔Θ͍͍ͧ •
גࣜձࣾϕΨίʔϙϨʔγϣϯͰΤϯδχΞΛืू͠ ͓ͯΓ·͢