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

20年続いているサービスの複雑な注文画面を GraphQL を使って改善した話

20年続いているサービスの複雑な注文画面を GraphQL を使って改善した話

株式会社出前館

October 27, 2022
Tweet

More Decks by 株式会社出前館

Other Decks in Technology

Transcript

  1. screen RecoilをState管理に使ってみた Recoil Server user input item info amount coupon

    delivery type LINE point order type terms agreement isEnabled receipt address phone number payment method
  2. screen RecoilをState管理に使ってみた Recoil Server user input item info amount coupon

    delivery type LINE point order type terms agreement isEnabled receipt address phone number payment method
  3. screen RecoilをState管理に使ってみた Recoil Server user input item info amount coupon

    delivery type LINE point order type terms agreement isEnabled receipt address phone number payment method 依存関係が多すぎる…😵
  4. screen RecoilをState管理に使ってみた Recoil Server user input item info amount coupon

    delivery type LINE point order type terms agreement isEnabled receipt address phone number payment method
  5. screen RecoilをState管理に使ってみた Recoil Server user input item info amount coupon

    delivery type LINE point order type terms agreement isEnabled receipt address phone number payment method
  6. screen RecoilをState管理に使ってみた Recoil Server user input item info amount coupon

    delivery type LINE point order type terms agreement isEnabled receipt address phone number payment method 頻繁に更新される…😵
  7. screen RecoilをState管理に使ってみた Recoil Server user input item info amount coupon

    delivery type LINE point order type terms agreement isEnabled receipt address phone number payment method かえって複雑に…😵
  8. Server Cache→ apollo client のキャッシュを使う • BFFのレスポンス情報自体を、Server Cacheとして保持する • BFF

    (GraphQL) によって、1画面描画のためのリクエストが1回で 済むのでServer Cacheの状態管理が容易 • BFFのスキーマで型定義できる
  9. screen Before... Recoil Server user input item info amount coupon

    delivery type LINE point order type terms agreement isEnabled receipt address phone number payment method
  10. screen After... Apollo Server (BFF) user input Apollo Client Cache

    useState isEnabled address payment method