Slide 1

Slide 1 text

/VYUͰ(SBQI2-ͷΫΤϦΛૹ৴͢Δํ๏ 3FCPPUWLBOTBJ.FFUVQ 4"8

Slide 2

Slide 2 text

$(whoami) ࢯ໊Ճ౻फҰ࿠ ࡀ ϋϯυϧωʔϜ4"8 ؔ੢ͷ*5ΤϯδχΞίϛϡχςΟͷ೐΍͔͠୲౰ ࣗশ େࡕࡏॅɾѪ஌ग़਎ 9 چ5XJUUFS !B[VLJ@FBUFS ಘҙ෼໺8FCΞϓϦέʔγϣϯ։ൃ 7VF -BSBWFM 2

Slide 3

Slide 3 text

ಈػ/VYU͔Β(SBQI2-ͷΫΤϦΛૹ৴͍ͨ͠ /VYUͰϑϩϯτΤϯυΛ։ൃ όοΫΤϯυ͸-BSBWFMͰ։ൃ "1*͸(SBQI2-Λར༻ /VYU͔Β(SBQI2-ͷΫΤϦΛૹ৴ͯ͠σʔλΛऔಘ͍ͨ͠ /VYU޲͚ͷ(SBQI2-$MJFOUΛར༻͍ͨ͠ 3 ϑϩϯτΤϯυ όοΫΤϯυ ϦΫΤετ Ϩεϙϯε

Slide 4

Slide 4 text

/VYUͷͨΊͷ(SBQI2-ΫϥΠΞϯτ /VYUͷެࣜυΩϡϝϯτͷ/VYU.PEVMFT͔Βݕࡧ /VYU(SBQI2-$MJFOU /VYUͷͨΊͷHSBQIRMSFRVFTU(SBQI2-$PEF(FOFSBUPSͷ࠷খߏ੒ /VYU"QPMMP /VYUͷͨΊͷ"QPMMP$MJFOU (SBQI2-3FRVFTU.PEVMF ࠷খͷ(SBQI2-ΫϥΠΞϯτͷͨΊͷαϙʔτΛ͢ΔͨΊͷ/VYUϞδϡʔϧ 4

Slide 5

Slide 5 text

/VYU(SBQI2-$MJFOUͷಛ௃ (SBQI2-ͷΫΤϦΛผϑΝΠϧʹهड़ 7VFͷίʔυ͔Β(SBQI2-ͷΫΤϦΛ෼཭Մೳ ݸਓతਪ͠ϙΠϯτ ΄΅ઃఆͳ͠Ͱར༻Մೳ nuxt.config.tsͷmodulesͱ؀ڥม਺ͷઃఆͷΈ 5ZQF4DSJQUΛ׬શαϙʔτ (SBQI2-ͷΫΤϦΛ΋ͱʹϨεϙϯεͷܕ৘ใΛࣗಈੜ੒ 5

Slide 6

Slide 6 text

/VYU(SBQI2-$MJFOUͷجຊతͳ࢖͍ํ (SBQI2-ͷΫΤϦΛهड़ ϑΝΠϧͷ֦ுࢠ͸.gql·ͨ͸.graphql useAsyncGql()Λݺͼग़͠ ΫΤϦ͸operation͔Βࢦఆ 6 query getCountries { countries { code name } } const { data } = await useAsyncGql({ operation: 'getCountries', }); (SBQI2-ͷΫΤϦ໊Λ VTF"TZOD(RM ͷ PQFSBUJPOʹࢦఆ

Slide 7

Slide 7 text

ඞཁ࠷খݶͷઃఆ nuxt.config.tsͷmodulesΛ௥Ճ (SBQI2-αʔόʔͷ63-Λ֨ೲ͢Δ؀ڥม਺Λઃఆ (SBQI2-αʔόʔͷ63-Λ.envͷGQL_HOSTʹઃఆ 7 export default defineNuxtConfig({ modules: ['nuxt-graphql-client'], }); nuxt.config.ts GQL_HOST='https://localhost/graphql' .env

Slide 8

Slide 8 text

5ZQF4DSJQU׬શαϙʔτͷڧΈ (SBQI2-ͷΫΤϦ͔Βฦ٫ܕͷ৘ใΛࣗಈੜ੒ useAsyncGql()ͷฦΓ஋ͷ5ZQF)JOUJOHʹ൓ө 8 (SBQI2-$PEF(FOFSBUPSͰ ΫΤϦ͔Βܕ৘ใΛࣗಈੜ੒

Slide 9

Slide 9 text

(SBQI2-ͷWBSJBCMFTͷࢦఆ useAsyncGql()ͷҾ਺͔Βม਺Λࢦఆ ΫΤϦม਺͸variables͔Βࢦఆ ΫΤϦͷม਺͕5ZQF)JOUJOHʹ΋൓ө 9 (SBQI2-$PEF(FOFSBUPSͰ ΫΤϦม਺͔Βܕ৘ใΛࣗಈੜ੒

Slide 10

Slide 10 text

ࠔͬͨ఺ ެࣜυΩϡϝϯτ͕΍΍ಡΈͮΒ͍ ެࣜυΩϡϝϯτҎ֎ͷ৘ใ΋গͳΊ ϑΝΠϧͷΞοϓϩʔυ͕࣮૷Ͱ͖ͳͦ͞͏ ͦ΋ͦ΋ґଘύοέʔδͷHSBQIRMSFRVFTU͕ϑΝΠϧΞοϓϩʔυʹඇରԠ ϛυϧ΢ΣΞΛ࣮૷ͯ͠ΞοϓϩʔυΛ࣮ݱ͢Δ͜ͱ͸Մೳ /YVU(SBQI2-$MJFOUʹHSBQIRMSFRVFTUͷϛυϧ΢ΣΞΛ૊ΈࠐΊͳͦ͞͏ 10

Slide 11

Slide 11 text

૯ׅ /VYU(SBQI2-$MJFOUʹ͍ͭͯ঺հ (SBQI2-ͷΫΤϦΛ7VFϑΝΠϧ͔Β෼཭ͯ͠هड़ ΄΅ઃఆͳ͠Ͱར༻Մೳ 5ZQF4DSJQU΁ͷ׬શαϙʔτͰ5ZQF)JOUJOH͕ར༻Մೳ /VYU(SBQI2-$MJFOUΛ࢖͏্Ͱࠔͬͨ఺ υΩϡϝϯτ͕΍΍ಡΈͮΒ͍ ϑΝΠϧΞοϓϩʔυʹະରԠͬΆ͍ 11

Slide 12

Slide 12 text

͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠