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
Nuxt.jsとGraphcoolで ツールを作っている話
Search
starfish719
June 25, 2018
0
120
Nuxt.jsとGraphcoolで ツールを作っている話
starfish719
June 25, 2018
Tweet
Share
More Decks by starfish719
See All by starfish719
ファインディの テックブログ爆誕までの軌跡
starfish719
1
650
動作確認やテストで漏れがちな観点3選
starfish719
5
450
GitHub CopilotでTypeScriptの コード生成するワザップ
starfish719
28
6.1k
Findyの爆速開発を支えるPull requestの粒度
starfish719
0
280
フロントエンドの設計刷新〜決断から効果検証まで〜
starfish719
0
40
開発生産性実践入門 Pullrequestの粒度編
starfish719
0
950
Gatsby + Netlifyで ポートフォリオサイトを 作った話
starfish719
0
55
vegatech_3.pdf
starfish719
0
390
CloudFunctionsと CloudVisionで 遊んでみた
starfish719
0
59
Featured
See All Featured
Embracing the Ebb and Flow
colly
84
4.5k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
Scaling GitHub
holman
459
140k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
The Pragmatic Product Professional
lauravandoore
32
6.4k
Become a Pro
speakerdeck
PRO
26
5.1k
Designing for humans not robots
tammielis
250
25k
Writing Fast Ruby
sferik
628
61k
VelocityConf: Rendering Performance Case Studies
addyosmani
327
24k
Transcript
Nuxt.jsͱGraphcoolͰ πʔϧΛ࡞͍ͬͯΔ
ࣗݾհ • ށా ઍ൏ (Toda Chihaya) • @starfish0206 • PHP
Swift Vue.js • झຯɹϙέϞϯɺఉΩϟϯ˚
ࠓ͢͜ͱ
Nuxt.jsͱGraphcoolʹ͍ͭͯ ΊͬͪΌ ࡶʹઆ໌͠·͢
Nuxt.js is Կ • ΊͬͪΌ؆୯ʹαʔόʔαΠυϨϯμϦϯά Ͱ͖ΔVue.jsͷϑϨʔϜϫʔΫ • ੩తϑΝΠϧ؆୯ʹੜͰ͖ΔͬΆ͍
Graphcool is Կ • ΊͬͪΌ؆୯ʹGraphQLΛ͏͜ͱ͕Ͱ͖Δ BaaSαʔϏε • ϞσϧΛఆٛ͢Δ͚ͩͰɺQueryͱMutation ͕ࣗಈతʹఆٛ͞ΕΔ •
GUIͷπʔϧ͕ΊͬͪΌศར
Կ࡞ͬͯΔʁ • ҭͨ͠ϙέϞϯͷཧπʔϧ • demoݟͤ·͢
Nuxt.jsΛͬͯΈΔ
Πϯετʔϧ $ npm install -g vue-cli $ vue init nuxt/starter
projectName $ cd projectName $ npm install $ npm run dev
ϧʔςΟϯάͱϏϡʔ • ෦తʹvue-routerΛར༻ • pagesσΟϨΫτϦԼʹviewίϯϙʔωϯτͷϑΝ ΠϧΛ࡞ • ϑΝΠϧ໊ͱσΟϨΫτϦߏʹΑͬͯɺrouter.jsͷ ઃఆ͕ࣗಈతʹ࡞͞ΕΔ •
router.jsʹॻ͍ͨํָ͕(ݸਓతײ
GraphcoolΛͬͯΈΔ
Πϯετʔϧ $ npm install -g graphcool $ graphcool init server
$ graphcool deploy $ graphcool local up
Ϟσϧఆٛ type Type @model { id: ID! @isUnique createdAt: DateTime!
updatedAt: DateTime! name: String! }
ಈ࡞ • docker্ཱ͕͕͍ͪͬͯΔ • PrismaͰMySQLΛϥούʔ͍ͯ͠Δ • ϦϨʔγϣϯΛར༻͢Δ͜ͱ͕Ͱ͖Δ
Nuxt.js ͔ΒGraphcoolଓ • apollo-moduleΛར༻ • https://github.com/nuxt-community/apollo- module • graphcool info
ͰΤϯυϙΠϯτͷใΛऔ ಘ͢Δ͜ͱ͕Մೳ
·ͱΊ • Nuxt.js GraphcoolΊͬͪΌ؆୯ʹಋೖ͢Δ͜ ͱ͕Ͱ͖Δ • ͲͬͪυΩϡϝϯτ͕͔ͬ͠Γ͍ͯ͠Δ • όοΫΤϯυଆϞσϧΛఆٛ͢Δ͚ͩ
• Graphcoolͷ͓͔͛Ͱɺϑϩϯτଆʹूத͢Δ͜ ͱ͕Ͱ͖ͨ