Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Finding alternatives for GraphQL client for iOS
Search
Yuki Yamamoto
March 24, 2022
Programming
3.1k
0
Share
Finding alternatives for GraphQL client for iOS
Yuki Yamamoto
March 24, 2022
More Decks by Yuki Yamamoto
See All by Yuki Yamamoto
tvOSにちょっと注目してみる
redryerye
0
1k
Implementing MVVM in 2019
redryerye
2
1.3k
Implement P2P connection and stream your content
redryerye
0
720
Other Decks in Programming
See All in Programming
瑠璃の宝石に学ぶ技術の声の聴き方 / 【劇場版】アニメから得た学びを発表会2026 #エンジニアニメ
mazrean
0
240
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
210
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
260
「Linuxサーバー構築標準教科書」を読んでみた #ツナギメオフライン.7
akase244
0
1.4k
mruby on C#: From VM Implementation to Game Scripting (RubyKaigi 2026)
hadashia
1
290
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
480
Radical Imagining - LIFT 2025-2027 Policy Agenda
lift1998
0
300
AI-DLC Deep Dive
yuukiyo
8
3.4k
AIエージェントで業務改善してみた
taku271
0
520
Exploring RuboCop with MCP
koic
0
560
実用!Hono RPC2026
yodaka
2
160
Claude Codeをカスタムして自分だけのClaude Codeを作ろう
terisuke
0
130
Featured
See All Featured
For a Future-Friendly Web
brad_frost
183
10k
Making Projects Easy
brettharned
120
6.6k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
400
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Raft: Consensus for Rubyists
vanstee
141
7.4k
Embracing the Ebb and Flow
colly
88
5k
WCS-LA-2024
lcolladotor
0
540
The Mindset for Success: Future Career Progression
greggifford
PRO
0
310
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
170
Speed Design
sergeychernyshev
33
1.6k
A Soul's Torment
seathinner
6
2.6k
Transcript
@redryerye ࠷దͳiOSͷ GraphQLΫϥΠΞϯτΛٻΊͯ Finding alternatives for GraphQL client for iOS
Yuki Yamamoto @redryerye iOS Engineer @
Last year, my team decided to use GraphQL for our
new feature 🏃
A new co-working space has opened in Shimokitazawa GraphQL is
used in the new seat reservation featur e (Both iOS/Android)
GraphQL is used
GraphQL is used with apollo-ios
GraphQL is used with apollo-ios
About apollo-ios • The most popular open-sourced GraphQL client library
for iOS
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
Apollo is great!
But it can be a hassle 🧐
• Explaining the hurdle I had in using Apollo Today,
I will be..
Today, I will be.. • Explaining the hurdle I had
in using Apollo • Looking at other alternatives
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 😉
Apollo iOS: Things I like about it
Apollo iOS: Things I like about it 1. Strong community
2. Guarantees compile time type safety
Apollo iOS: Things I like about it 1. Strong community
2. Guarantees compile time type safety
Apollo iOS has a strong community • Actively maintained by
Apollo, which is a GraphQL focused company
• 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
• Actively maintained by Apollo, which is a GraphQL focused
company • Easy to fi nd resources about the library Apollo iOS has a strong community
Apollo iOS: Things I like about it 1. Strong community
2. Guarantees compile time type safety
Apollo iOS: Things I like about it 1. Strong community
2. Guarantees compile time type safety
What does this mean? 🤔
None
None
None
Queries are fl exible
None
None
Query-speci fi c nested structs will be generated ✅ Compile
time safety
Queries are fl exible
Queries are fl exible name name name PersonCell CharacterList Tie
a query to a view = View : Query or Fragment (Works well with SwiftUI)
name name name PersonCell CharacterList But this did not suit
our case
name name name PersonCell CharacterList 👆 Check this out for
the details
What’s the struggle? 🤔
• Dealing with nested structs can be a hassle especially
when passing it to your domain layer Apollo iOS: The Struggle
Generated structs are nested based on a query Apollo iOS:
The Struggle
Generated structs are nested based on a query The more
query gets complicated, so does the structs. Apollo iOS: The Struggle
Generated structs are nested based on a query Generated structs
does not conform to the Equatable protocol Apollo iOS: The Struggle 👆
I wish I could easily map to domain objects a
little more…
It’s always an option • Not to use a client
library and write your own client • Utilize Fragment
Any alternative?
Yes. graphql.org/code
Yes. Graphaello will not be covered here since it focuses
on SwiftUI graphql.org/code 👉
Let’s look at SwiftGraphQL graphql.org/code 👉
Apollo iOS
Apollo iOS
Apollo iOS
SwiftGraphQL
SwiftGraphQL
SwiftGraphQL
SwiftGraphQL
SwiftGraphQL
Looks good for mapping to models!
Comparing apollo-ios and SwiftGraphQL
Comparing apollo-ios and SwiftGraphQL
Comparing apollo-ios and SwiftGraphQL
Summary • Mapping generated structs to domain objects can be
a hassle • Other GraphQL clients can be your solution depending on your situation
developers.kankak.com I will post my update on the blog
Thank you!
Resources • https://www.apollographql.com/docs/ios/ • https://www.apollographql.com/blog/community/bringing-graphql-to-ios- fc46423befa1/#generating-native-result-types • https://miyashi.app/post/graphql-impressions/ • https://speakerdeck.com/sonatard/swiftui-graphql
• https://www.the-guild.dev/blog/swift-graphql? utm_content=175727619&utm_medium=social&utm_source=twitter&hss_cha nnel=tw-1141026790653059072