Upgrade to Pro — share decks privately, control downloads, hide ads and more …

GraphQLの負債と向き合うためにやっていること

 GraphQLの負債と向き合うためにやっていること

Kazuhito Hokamura

July 18, 2023
Tweet

More Decks by Kazuhito Hokamura

Other Decks in Programming

Transcript

  1. 12 ಉҰεΩʔϚͰͷҠߦͷ೉͍͠ͱ͜Ζ • id Λ Int ͔Β ID ܕʹม͑ΔέʔεΛߟ͑Δ •

    ΫϥΠΞϯτ͸ id: number Ͱ͘ΔલఏͰίʔυ͕ॻ͔Ε͍ͯΔ • ͜ͷ··Կ΋ߟ͑ͣʹAPIͷ࣮૷͚ͩม͑ΔͱյΕΔ • ϑϩϯτΤϯυͱόοΫΤϯυΛಉ࣌ʹมߋͰ͖Δͱ͍͍͕ 
 ϦϦʔεͷ࢓૊ΈతʹෆՄೳʢଟগͷΤϥʔΛڐ༰Ͱ͖Ε͹Մೳʣ idͷܕΛม͑Δ
  2. 14 ୅ସҊ • εΩʔϚͱΤϯυϙΠϯτΛ෼͚ͯ৽͘͠࡞Γ௚͢Ҋ: ◦ /v2/graphql ͷΑ͏ͳΤϯυϙΠϯτʹͯ͠εΩʔϚΛ׬શʹ෼͚Δ ◦ ໊લͷॏෳ໰୊͕ͳ͍ͷͰଟগҠߦָ͕ʹͳΔ ◦

    ར༻͍ͯ͠ΔDGS framework͕ରԠ͍ͯ͠ͳͯ͘அ೦...ʂ • Kotlin ͔Β Node.js Ͱॻ͖௚͢Ҋ: ◦ ϢϏʔ͸ٕज़ελοΫΛ Kotlin ͔Β Node.js ʹҠߦ͢ΔҙࢥܾఆΛͨ͠ ◦ εΩʔϚͷҠߦͷ͍ͭͰʹ Node.js Ͱॻ͖௚͢ͱ͍͏Ҋ΋ ◦ ಉ࣌ʹେ͖͍มߋΛ2ͭ΍Δͷ͸ةݥͳͷͰࠓճ͸ݟૹΓ Kotlin ͷ··΍Δ • … ͱ͍͏Θ͚Ͱ໘౗͚ͩͲ prefix ઓུͰҠߦத
  3. 16 εΩʔϚͷࣗಈςετ • graphql-schema-linter Λ CI Ͱ࣮ߦ ◦ https://github.com/cjoudrey/graphql-schema-linter •

    ૊ΈࠐΈͷϧʔϧͩͱෆे෼ͩͬͨͷͰ͍͔ͭ͘ΧελϜϧʔϧΛࣗલͰॻ͍ͨ ◦ updateUser ͸ UpdateUserInput Λ͏͚ͬͱͬͯ UpdateUserPayload Λฦ͢ɺͳͲ • VSCode Plugin ͕ͳ͔ͬͨͷͰࣗ࡞ ◦ https://github.com/hokaccha/vscode-graphql-schema-linter