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

Finding alternatives for GraphQL client for iOS

Finding alternatives for GraphQL client for iOS

Yuki Yamamoto

March 24, 2022
Tweet

More Decks by Yuki Yamamoto

Other Decks in Programming

Transcript

  1. A new co-working space has opened in Shimokitazawa GraphQL is

    used in the new seat reservation featur e (Both iOS/Android)
  2. About apollo-ios • The most popular open-sourced GraphQL client library

    for iOS • Used in production by many companies around the world Github uses Apollo client potatotips #61
  3. Today, I will be.. • Explaining the hurdle I had

    in using Apollo • Looking at other alternatives
  4. Today, I will be.. • Explaining the hurdle I had

    in using Apollo • Looking at other alternatives New to GraphQL? The details of GraphQL will not be covered here. However, you will probably able to understand this talk since I will be explaining about the implementation one by one 😉
  5. Apollo iOS: Things I like about it 1. Strong community

    2. Guarantees compile time type safety
  6. Apollo iOS: Things I like about it 1. Strong community

    2. Guarantees compile time type safety
  7. Apollo iOS has a strong community • Actively maintained by

    Apollo, which is a GraphQL focused company
  8. • Actively maintained by Apollo, which is a GraphQL focused

    company Had seen an amazing work done in the community by the team, especially by Ellen 😭 Apollo iOS has a strong community
  9. • Actively maintained by Apollo, which is a GraphQL focused

    company • Easy to fi nd resources about the library Apollo iOS has a strong community
  10. Apollo iOS: Things I like about it 1. Strong community

    2. Guarantees compile time type safety
  11. Apollo iOS: Things I like about it 1. Strong community

    2. Guarantees compile time type safety
  12. Queries are fl exible name name name PersonCell CharacterList Tie

    a query to a view = View : Query or Fragment (Works well with SwiftUI)
  13. • Dealing with nested structs can be a hassle especially

    when passing it to your domain layer Apollo iOS: The Struggle
  14. Generated structs are nested based on a query The more

    query gets complicated, so does the structs. Apollo iOS: The Struggle
  15. Generated structs are nested based on a query Generated structs

    does not conform to the Equatable protocol Apollo iOS: The Struggle 👆
  16. It’s always an option • Not to use a client

    library and write your own client • Utilize Fragment
  17. Summary • Mapping generated structs to domain objects can be

    a hassle • Other GraphQL clients can be your solution depending on your situation