Imagining what the future might be like with direct support for GraphQL in SwiftUI.
SwiftUI and GraphQL both represent new paradigms, these new paradigms—when paired together—offer an unparalleled, streamlined, client development experience. Today the most widely used and robust Swift GraphQL clients lack direct SwiftUI support, as well as support for #8 and #9 of Jordan Eldridge's "GraphQL Maturity Model".
- Each View declares it's data requirements using Fragments
- Each View observes it's fragment data from the GraphQL normalized cache, limiting large-tree re-renders
- Sensible defaults for cache policies and other configuration cover most cases, but can be overridden in intuitive ways
- As Views are decomposed into subviews, queries are decomposed into fragments