Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
GraphQL RubyͰ εΩʔϚۦಈ։ൃΛମײͨ͠ 2022/10/09 Kaigi on Rails _2022_ new Amane Inoue (@isaka1022), mybest, Inc.
Slide 2
Slide 2 text
Amane Inoue @isaka1022 גࣜձࣾϚΠϕετ21ଔೖࣾ όοΫΤϯυΤϯδχΞ ॳΊͯ৮ͬͨWEBΞϓϦέʔγϣϯϑϨʔϜɿ Ruby on Rails ະख़ऀͰ͕͢ԿଔΑΖ͓͘͠ئ͍͠·͢ʂ
Slide 3
Slide 3 text
͓͢͢ΊใݕࡧαʔϏεʮmybestʯ
Slide 4
Slide 4 text
ΞʔΩςΫνϟҠߦΛਐߦத ੩తͳslimϑΝΠϧ + VueʹΑΔಈతͳϨϯμϦϯά Next.jsʹΑΔSSR + GraphQLʹΑΔసૹ + RailsʹΑΔσʔλॲཧ
Slide 5
Slide 5 text
• ͜Ε·ͰAPIΛ࣮͔ͯ͠ΒϑϩϯτΤϯυͷ࣮ʹότϯλον εΩʔϚۦಈ։ൃΛମײͰ͖ͨ GraphQL Λ׆༻ͨ͠εΩʔϚۦಈ։ൃͷ࣮ફ( qsona ) https://speakerdeck.com/qsona/schema-driven-development-with-graphql
Slide 6
Slide 6 text
• GraphQLεΩʔϚΛఆٛͯ͠ฒߦͯ͠։ൃ εΩʔϚۦಈ։ൃΛମײͰ͖ͨ GraphQL Λ׆༻ͨ͠εΩʔϚۦಈ։ൃͷ࣮ફ( qsona ) https://speakerdeck.com/qsona/schema-driven-development-with-graphql
Slide 7
Slide 7 text
࣮ࡍʹࠓظͬͨखॱ
Slide 8
Slide 8 text
Resolverͱܕɺٴͼඞཁͳ fi eldΛ༻ҙ • ϚΠϕετͰcode- fi rstΞϓϩʔνΛ࠾༻ • RubyͷίʔυΛݩʹεΩʔϚΛఆٛ͢Δ • ຊདྷతʹ͜ϑϩϯτΤϯυΤϯδχΞͱҰॹʹεΩʔϚઃܭ͢Δ • ࠓճطଘͷ༷ʹैͬͯόοΫΤϯυଆͰԾ࣮
Slide 9
Slide 9 text
μϛʔσʔλΛฦ͢Α͏ʹ͢Δ • ϩδοΫ࣮͠ͳ͍ • ฦ͢ܕ͚ͩ߹ΘͤͨμϛʔσʔλΛฦ͢Α͏ʹ͢Δ
Slide 10
Slide 10 text
ϑϩϯτΤϯυଆ͔ΒͷϨϏϡʔ • ͜ͷ࣌ͰϑϩϯτΤϯυଆ͔ΒͷϨϏϡʔΛΒ͏ • OKͦ͏Ͱ͋Ε͜ͷ··APIϦϦʔεʢ৽نՃͷΤϯυϙΠϯτʣ
Slide 11
Slide 11 text
όοΫΤϯυͱϑϩϯτΤϯυΛฒߦ࣮ͯ͠ • όοΫΤϯυͱϑϩϯτΤϯυΛฒߦ࣮ͯ͠ • ϑϩϯτΤϯυˠը໘ • όοΫΤϯυˠϩδοΫͷৄࡉ • ΤϯυϙΠϯτͷϞοΫΛཱ͔ͯͯͯ͢ΒϩδοΫͷৄࡉΛ࣮͍ͯ͘͠
Slide 12
Slide 12 text
ϑϩϯτΤϯυͷ࣮தʹϑΟʔϧυʹ มߋ͕ඞཁͳ߹ • ϑϩϯτΤϯυͷ࣮ʹԠͯ͡ϑΟʔϧυͷఆٛʹมߋ͕ඞཁͳ߹ • దٓ૬ஊ • ·ͨϑϩϯτΤϯυଆʹ߹Θͤͯमਖ਼ˠόοΫΤϯυͰίʔυϨϏϡʔ
Slide 13
Slide 13 text
ͬͯΈͨײ • ʮ࣮ͪʯ͕࣌ؒѹతʹݮͬͨ • ૣ͍ஈ֊ͰϑϩϯτΤϯυΤϯδχΞʹλεΫΛͤΔͷͰɺϓϨο γϟʔ͕গͳ͍ • εΩʔϚΛϕʔε(ڞ௨ݴޠ)ʹϑϩϯτΤϯυΤϯδχΞͱ༷ʹͭ ͍ͯίϛϡχέʔγϣϯ͕औΕΔ
Slide 14
Slide 14 text
ͬͯΈͯͷ՝ײɾল • εΩʔϚͷઃܭΛόοΫΤϯυ͕த৺ʹͳͬͯߦͬͨ݁Ռɺϑϩϯτ Τϯυͷ࣮ͷࡍʹઃܭमਖ਼͕ͬͨ • ৮Δਓ͕ϑϩϯτɾόοΫ྆ํͷ͕ࣝଟগඞཁ • όοΫΤϯυΤϯδχΞ͕ϑϩϯτΤϯυͷ࣮Πϝʔδ͕ͣ͠Β ͍ͱεΩʔϚͷઃܭ͍͠ • ϑϩϯτΤϯυΤϯδχΞ͕ fi eldͷमਖ਼Λ͍ͨ͠ͱ͖ʹRubyͷίʔ υΛ৮Βͳ͍ͱ͍͚ͳ͍
Slide 15
Slide 15 text
ऴΘΓʹ • ·ͩ·ͩख୳ΓதɺࢼߦࡨޡதͳͷͰ࠙ձͰͥͻ৭ʑ͓Λฉ͔ ͍͚ͤͯͨͩΔͱخ͍͠Ͱ͢ʂ • ZennͰൃ৴தͰ͢ʂ • https://zenn.dev/mybest