Colocating & Composing Data Dependencies with Fragments - Austin Chauncey

Sdílet
Vložit
  • čas přidán 25. 10. 2023
  • The value of GraphQL fragments goes beyond simple reusability. When used to colocate and compose data dependencies, fragments enable you to define and evolve them at the component level. The result? More performant, flexible, and maintainable code.
  • Věda a technologie

Komentáře • 1

  • @austinchauncey2437
    @austinchauncey2437 Před 8 měsíci +1

    👋I'd love to highlight one thing I forget to note in this demo at the ~ 13:30 mark is why the application doesn't error when we didn't compose the `NutritionFactsCard` component's data dependencies. It's probably slightly concerning that the application "silently errored". If I would've simply ran codegen after this step, the application would've properly gave us typescript errors noting we're trying to access a field that's not available.