GraphQL

July 16, 2020

Zusammen mit Mathías schauen wir uns heute GraphQL genauer an.



WWDC Highlights

GraphQL

Experiment: GraphQL vs. REST

Scenario Δ Bytes Δ RTT
Worst-Case +80% +18%
Average-Case -16% -42%
// Define a Cell
struct CharacterCell: View {
    // Use the GraphQL Property Wrapper
    @GraphQL(StarWars.Person.name)
    var name: String?

    @GraphQL(StarWars.Person.homeworld.name)
    var home: String?

    var body: some View {
        HStack {
            name.map { Text($0).bold() }
            Spacer()
            home.map { Text($0) }
        }
    }
}

Picks

Social