# \#ios

**URL:** https://community.apollographql.com/tag/ios/12.md

[Latest](https://community.apollographql.com/latest.md) · [Categories](https://community.apollographql.com/categories.md) · [Tags](https://community.apollographql.com/tags.md)

---

## [iOS SQLiteNormalizedCache cold start can be slower than reloading data from backend](https://community.apollographql.com/t/ios-sqlitenormalizedcache-cold-start-can-be-slower-than-reloading-data-from-backend/9344)

<div class="topic-metadata">

**Author:** [@josh\_josh\_josh](https://community.apollographql.com/u/josh_josh_josh)\
**Replies:** 5\
**Last updated:** [August 2, 2026, 8:23pm UTC](https://community.apollographql.com/t/ios-sqlitenormalizedcache-cold-start-can-be-slower-than-reloading-data-from-backend/9344 "2026-08-02T20:23:31Z")

</div>

I have a simple query that loads a list of Visa card transactions. I’m currently testing with a large list of 4922 TransactionFragments. (Queries & Fragments shown at bottom of this post). As you can see from the follow…

---

## [Apollo iOS 2.0 Migration and parsing data](https://community.apollographql.com/t/apollo-ios-2-0-migration-and-parsing-data/9756)

<div class="topic-metadata">

**Author:** [@irisha8787](https://community.apollographql.com/u/irisha8787)\
**Replies:** 1\
**Last updated:** [March 21, 2026, 12:39am UTC](https://community.apollographql.com/t/apollo-ios-2-0-migration-and-parsing-data/9756 "2026-03-21T00:39:37Z")

</div>

Prior to 2.0 version, GraphQLResponse had a few helpful public functions like parseResponse that could be used by the consumers, but now they seem to be removed. I didn’t see any info on these in the migration guide, is …

---

## [Question about generateApolloMetadata support in Apollo iOS for multi-module projects](https://community.apollographql.com/t/question-about-generateapollometadata-support-in-apollo-ios-for-multi-module-projects/9742)

<div class="topic-metadata">

**Author:** [@engsulta](https://community.apollographql.com/u/engsulta)\
**Replies:** 1\
**Last updated:** [March 9, 2026, 4:46pm UTC](https://community.apollographql.com/t/question-about-generateapollometadata-support-in-apollo-ios-for-multi-module-projects/9742 "2026-03-09T16:46:02Z")

</div>

Hi team, We’re working on an iOS project with a multi-module architecture where several feature modules share core GraphQL fragments defined in a common module. In Apollo Android/Kotlin, the generateApolloMetadata opt…

---

## [User Apollo Client in combination wit Pulse Logger](https://community.apollographql.com/t/user-apollo-client-in-combination-wit-pulse-logger/9595)

<div class="topic-metadata">

**Author:** [@Paul\_Vaughan](https://community.apollographql.com/u/Paul_Vaughan)\
**Replies:** 0\
**Last updated:** [December 17, 2025, 4:03pm UTC](https://community.apollographql.com/t/user-apollo-client-in-combination-wit-pulse-logger/9595 "2025-12-17T16:03:43Z")

</div>

Question: How should network logging & URLSession metrics be implemented in Apollo iOS v2 (replacement for URLSessionClient subclassing)? I’m migrating an iOS app from Apollo iOS \< 2.0 to Apollo iOS v2, and I’m running i…

---

## [Caching and error handling](https://community.apollographql.com/t/caching-and-error-handling/9493)

<div class="topic-metadata">

**Author:** [@persilja](https://community.apollographql.com/u/persilja)\
**Replies:** 0\
**Last updated:** [October 9, 2025, 9:25am UTC](https://community.apollographql.com/t/caching-and-error-handling/9493 "2025-10-09T09:25:59Z")

</div>

Hi! I was wondering how to make the cache NOT write when there is an error in the graph ql response. Error Handling - Apollo GraphQL Docs The reason to not write responses that contains errors are the it could overwrit…

---

## [Is @stream field directive supported in v2?](https://community.apollographql.com/t/is-stream-field-directive-supported-in-v2/9491)

<div class="topic-metadata">

**Author:** [@Pat](https://community.apollographql.com/u/Pat)\
**Replies:** 0\
**Last updated:** [October 8, 2025, 5:29pm UTC](https://community.apollographql.com/t/is-stream-field-directive-supported-in-v2/9491 "2025-10-08T17:29:33Z")

</div>

The docs and a previously filed issue appear to indicate that @defer is supported, but it’s not clear if @stream is as well? Is that something that can be properly documented, as well as what other directives are (or are…

---

## [iOS's SQLiteError doesn't expose underlying SQLite error code](https://community.apollographql.com/t/ioss-sqliteerror-doesnt-expose-underlying-sqlite-error-code/9440)

<div class="topic-metadata">

**Author:** [@potrebic](https://community.apollographql.com/u/potrebic)\
**Replies:** 3\
**Last updated:** [September 16, 2025, 6:11pm UTC](https://community.apollographql.com/t/ioss-sqliteerror-doesnt-expose-underlying-sqlite-error-code/9440 "2025-09-16T18:11:27Z")

</div>

In Pre 1.0 Apollo the calls like: do { return try SQLiteNormalizedCache(fileURL: fileURL) } catch let sqlError as SQLite.Result { ... error handling } would throw the SQLite native SQLite.Result error. This allow…

---

## [Initializing selection set manually without using \_dataDict initializer](https://community.apollographql.com/t/initializing-selection-set-manually-without-using-datadict-initializer/9395)

<div class="topic-metadata">

**Author:** [@pszmurlo](https://community.apollographql.com/u/pszmurlo)\
**Replies:** 8\
**Last updated:** [September 9, 2025, 6:47pm UTC](https://community.apollographql.com/t/initializing-selection-set-manually-without-using-datadict-initializer/9395 "2025-09-09T18:47:28Z")

</div>

We’re migrating from Apollo 0.x to 1.22. We need to initialize Apollo classes manually, because we intercept and “fake” some of GQL endpoint responses. I’m currently using this in Apollo 1.22: let itemDetail = itemDTO.t…

---

## [Apollo iOS bypassing URLSession's cache-control behaviour by checking its own store first in \`.returnCacheDataElseFetch\`](https://community.apollographql.com/t/apollo-ios-bypassing-urlsessions-cache-control-behaviour-by-checking-its-own-store-first-in-returncachedataelsefetch/9417)

<div class="topic-metadata">

**Author:** [@grse](https://community.apollographql.com/u/grse)\
**Replies:** 2\
**Last updated:** [September 2, 2025, 12:34am UTC](https://community.apollographql.com/t/apollo-ios-bypassing-urlsessions-cache-control-behaviour-by-checking-its-own-store-first-in-returncachedataelsefetch/9417 "2025-09-02T00:34:05Z")

</div>

Hi team, While digging into caching behavior in Apollo iOS, I noticed something I wanted to clarify. In CacheReadInterceptor, the .returnCacheDataElseFetch currently checks Apollo’s store first: case .returnCacheDataEl…

---

## [Negative Request Timing from URLSession delegate for TransactionMetrics](https://community.apollographql.com/t/negative-request-timing-from-urlsession-delegate-for-transactionmetrics/9317)

<div class="topic-metadata">

**Author:** [@Reshu\_Malik](https://community.apollographql.com/u/Reshu_Malik)\
**Replies:** 3\
**Last updated:** [August 15, 2025, 10:51pm UTC](https://community.apollographql.com/t/negative-request-timing-from-urlsession-delegate-for-transactionmetrics/9317 "2025-08-15T22:51:00Z")

</div>

Hello, We recently had a surge in following issue, although this seems like something that always existed (With Apollo iOS 0.x too). We implement urlSession(\_:task:didFinishCollecting:) delegate method and collect requ…

---

## [Apollo iOS 1.22.0 always converts Date variables to UTC, dropping their original time zone information](https://community.apollographql.com/t/apollo-ios-1-22-0-always-converts-date-variables-to-utc-dropping-their-original-time-zone-information/9336)

<div class="topic-metadata">

**Author:** [@p\_lizak](https://community.apollographql.com/u/p_lizak)\
**Replies:** 2\
**Last updated:** [August 5, 2025, 10:57am UTC](https://community.apollographql.com/t/apollo-ios-1-22-0-always-converts-date-variables-to-utc-dropping-their-original-time-zone-information/9336 "2025-08-05T10:57:50Z")

</div>

Description When I send a Date object using Apollo 1.22.0, it’s automatically converted to UTC, so we lose the client’s time zone and the backend misses that potentially useful information. We could pre-format dates as …

---

## [Eliding namespace for code generation embedded in a module](https://community.apollographql.com/t/eliding-namespace-for-code-generation-embedded-in-a-module/8924)

<div class="topic-metadata">

**Author:** [@rajivjhoomuck](https://community.apollographql.com/u/rajivjhoomuck)\
**Replies:** 1\
**Last updated:** [July 24, 2025, 7:55pm UTC](https://community.apollographql.com/t/eliding-namespace-for-code-generation-embedded-in-a-module/8924 "2025-07-24T19:55:43Z")

</div>

Hello, I am writing a command plugin (SPM) and I already have a module where I want to embed the generated source files. This is part of the outport object in the config file: "schemaTypes" : { "moduleType" : { …

---

## [Enabling flexibility for iOS cache](https://community.apollographql.com/t/enabling-flexibility-for-ios-cache/9140)

<div class="topic-metadata">

**Author:** [@ChrisLaganiere](https://community.apollographql.com/u/ChrisLaganiere)\
**Replies:** 1\
**Last updated:** [June 4, 2025, 5:12pm UTC](https://community.apollographql.com/t/enabling-flexibility-for-ios-cache/9140 "2025-06-04T17:12:08Z")

</div>

Hi! I am aiming to empower consumers of the iOS sdk to build their own solutions to different problems by making the local cache more flexible. A simple change to the sdk would allow developers to solve for their own cus…

---

## [Fragments: Use in the UI or map to a model?](https://community.apollographql.com/t/fragments-use-in-the-ui-or-map-to-a-model/9119)

<div class="topic-metadata">

**Author:** [@Hunter\_Freas](https://community.apollographql.com/u/Hunter_Freas)\
**Replies:** 1\
**Last updated:** [May 30, 2025, 3:15pm UTC](https://community.apollographql.com/t/fragments-use-in-the-ui-or-map-to-a-model/9119 "2025-05-30T15:15:21Z")

</div>

Hello, I was wondering about the usage of Fragments in the UI. If you are trying to follow a more clean architecture approach, a Fragment would be considered a DTO and then should be mapped to a model from the domain to …

---

## [How can I mock a realistic response from the Apollo Client?](https://community.apollographql.com/t/how-can-i-mock-a-realistic-response-from-the-apollo-client/9104)

<div class="topic-metadata">

**Author:** [@Hunter\_Freas](https://community.apollographql.com/u/Hunter_Freas)\
**Replies:** 2\
**Last updated:** [May 28, 2025, 5:31am UTC](https://community.apollographql.com/t/how-can-i-mock-a-realistic-response-from-the-apollo-client/9104 "2025-05-28T05:31:06Z")

</div>

Hello, I am currently trying to make tests using the Apollo Client and I would like to get realistic mocked responses from the Apollo Client. I would like to create a class that returns mock responses from the Apollo Cli…

---

## [Mutating cache crashing immediately](https://community.apollographql.com/t/mutating-cache-crashing-immediately/8437)

<div class="topic-metadata">

**Author:** [@arvinshen](https://community.apollographql.com/u/arvinshen)\
**Replies:** 1\
**Last updated:** [May 7, 2025, 7:19pm UTC](https://community.apollographql.com/t/mutating-cache-crashing-immediately/8437 "2025-05-07T19:19:06Z")

</div>

I am trying to mutate my cache, but it is crashing immediately when using ApolloStore.withinReadWriteTransaction(\_:callbackQueue:completion:) and need help troubleshooting as I don’t know what is causing this issue. I re…

---

## [Schedule App Refresh in the background](https://community.apollographql.com/t/schedule-app-refresh-in-the-background/8751)

<div class="topic-metadata">

**Author:** [@rajivjhoomuck](https://community.apollographql.com/u/rajivjhoomuck)\
**Replies:** 4\
**Last updated:** [March 24, 2025, 11:10pm UTC](https://community.apollographql.com/t/schedule-app-refresh-in-the-background/8751 "2025-03-24T23:10:09Z")

</div>

Hi, When my app is in the background, I need to wake it up periodically to refresh data. I am not sure how to achieve that since, from what I have seen so far, the URLSessionConfiguration that is passed to the URLSessio…

---

## [How to create a GraphQL response from json?](https://community.apollographql.com/t/how-to-create-a-graphql-response-from-json/7824)

<div class="topic-metadata">

**Author:** [@JanC](https://community.apollographql.com/u/JanC)\
**Replies:** 2\
**Last updated:** [March 21, 2025, 5:27pm UTC](https://community.apollographql.com/t/how-to-create-a-graphql-response-from-json/7824 "2025-03-21T17:27:54Z")

</div>

Hi, I have a saved json response of GetCustomersQuery and I’d like to instantiante the GetCustomersQuery.Data using that saved file. It is described in the docs but when I do it, I get the exception JSONDecodingError.mi…

---

## [I have some problems with Xcode ios-cli errors](https://community.apollographql.com/t/i-have-some-problems-with-xcode-ios-cli-errors/8419)

<div class="topic-metadata">

**Author:** [@Jensileus](https://community.apollographql.com/u/Jensileus)\
**Replies:** 2\
**Last updated:** [February 10, 2025, 7:21pm UTC](https://community.apollographql.com/t/i-have-some-problems-with-xcode-ios-cli-errors/8419 "2025-02-10T19:21:54Z")

</div>

I have used Apollo-ios-cli version (CLI version: 1.15.3) Now i have 17. Here is my .config file: \`{ “schemaNamespace” : “xxxAPI”, “input” : { “operationSearchPaths” : \[ “GraphQL/.graphql” \], “schemaSearchPaths” : …

---

## [iOS Linking Help Please](https://community.apollographql.com/t/ios-linking-help-please/8130)

<div class="topic-metadata">

**Author:** [@Scott\_Please](https://community.apollographql.com/u/Scott_Please)\
**Replies:** 7\
**Last updated:** [January 24, 2025, 10:03pm UTC](https://community.apollographql.com/t/ios-linking-help-please/8130 "2025-01-24T22:03:42Z")

</div>

We recently started seeing 5 runtime warnings when running our iOS app. ApolloSQLite is the only library that has SQLite as a dependency… objc\[11149\]: Class \_TtC6SQLite6Backup is implemented in both /Library/Developer/C…

---

## [How to initialise inline fragments manually?](https://community.apollographql.com/t/how-to-initialise-inline-fragments-manually/8094)

<div class="topic-metadata">

**Author:** [@akshaymantasolutions](https://community.apollographql.com/u/akshaymantasolutions)\
**Replies:** 1\
**Last updated:** [January 16, 2025, 7:14pm UTC](https://community.apollographql.com/t/how-to-initialise-inline-fragments-manually/8094 "2025-01-16T19:14:47Z")

</div>

I am trying to initiate inline fragments manually due to some api requirements like below. let details = BalanceHistoryQuery.Data.Me.BalanceHistoryEvents.Edge.Node.Details(\_dataDict: node.details.\_\_data) But details ob…

---

## [ApolloWebSocket.WebSocketError](https://community.apollographql.com/t/apollowebsocket-websocketerror/8066)

<div class="topic-metadata">

**Author:** [@yarden](https://community.apollographql.com/u/yarden)\
**Replies:** 3\
**Last updated:** [January 9, 2025, 5:44pm UTC](https://community.apollographql.com/t/apollowebsocket-websocketerror/8066 "2025-01-09T17:44:39Z")

</div>

who can pls help me I’m try to disconnect several times and i get errors like ApolloWebSocket.WebSocket.WSError.ErrorType.protocolError, message: “Invalid operation”, code: 4400)), kind: and Subscriber for 6 already exi…

---

## [Upgrading from 0.53 to 1.0 in Apollo iOS Getting “Multiple Commands produce" error](https://community.apollographql.com/t/upgrading-from-0-53-to-1-0-in-apollo-ios-getting-multiple-commands-produce-error/8063)

<div class="topic-metadata">

**Author:** [@akshaymantasolutions](https://community.apollographql.com/u/akshaymantasolutions)\
**Replies:** 3\
**Last updated:** [January 9, 2025, 11:41am UTC](https://community.apollographql.com/t/upgrading-from-0-53-to-1-0-in-apollo-ios-getting-multiple-commands-produce-error/8063 "2025-01-09T11:41:07Z")

</div>

We are trying to upgrade our iOS Apollo library from 0.53 to 1.15.3. We have followed the steps mentioned in this migration doc But we are getting this error in Xcode after performing all the steps

---

## [Help with Configuring Apollo iOS Code Generation](https://community.apollographql.com/t/help-with-configuring-apollo-ios-code-generation/7977)

<div class="topic-metadata">

**Author:** [@ruvalcaba18](https://community.apollographql.com/u/ruvalcaba18)\
**Replies:** 4\
**Last updated:** [January 6, 2025, 11:39pm UTC](https://community.apollographql.com/t/help-with-configuring-apollo-ios-code-generation/7977 "2025-01-06T23:39:31Z")

</div>

Hi everyone, I’m using Apollo and GraphQL in an iOS project, and I’m trying to configure the code generation for my queries and mutations. Following the Apollo documentation, I noticed that it generates a Swift Package …

---

## [Enums and classes not found after codegen](https://community.apollographql.com/t/enums-and-classes-not-found-after-codegen/7957)

<div class="topic-metadata">

**Author:** [@gbe](https://community.apollographql.com/u/gbe)\
**Replies:** 1\
**Last updated:** [November 22, 2024, 8:54pm UTC](https://community.apollographql.com/t/enums-and-classes-not-found-after-codegen/7957 "2024-11-22T20:54:10Z")

</div>

Hello, We’ve been using Apollo without issue for our iOS app, but our backend team made changes to the schema (new stucts and enums) and they are not found. Our generated code is output to a local Swift package. For exa…

---

## [How can we avoid sending hardcoded format while reading fragment](https://community.apollographql.com/t/how-can-we-avoid-sending-hardcoded-format-while-reading-fragment/7951)

<div class="topic-metadata">

**Author:** [@P\_1433](https://community.apollographql.com/u/P_1433)\
**Replies:** 2\
**Last updated:** [November 22, 2024, 1:23am UTC](https://community.apollographql.com/t/how-can-we-avoid-sending-hardcoded-format-while-reading-fragment/7951 "2024-11-22T01:23:35Z")

</div>

Is there a better way to send the non hardcode key as define below ref: Direct cache access - Apollo GraphQL Docs - Apollo Doc let data = try transaction.readObject( ofType: HeroDetails.self, withKey: "Hero:123…

---

## [Code signing required error on Github Action](https://community.apollographql.com/t/code-signing-required-error-on-github-action/7934)

<div class="topic-metadata">

**Author:** [@Karan\_Gavali](https://community.apollographql.com/u/Karan_Gavali)\
**Replies:** 0\
**Last updated:** [November 7, 2024, 6:03pm UTC](https://community.apollographql.com/t/code-signing-required-error-on-github-action/7934 "2024-11-07T18:03:31Z")

</div>

We integrated the Apollo SDK through SPM with Xcode Project. Able to generate code using CLI tool and included generated code as a local package in project. It woks perfectly on local machine. But as soon as we push code…

---

## [Subscription with AppSync needs update requestBodyCreator after token expiration](https://community.apollographql.com/t/subscription-with-appsync-needs-update-requestbodycreator-after-token-expiration/7781)

<div class="topic-metadata">

**Author:** [@andr3a88-amk](https://community.apollographql.com/u/andr3a88-amk)\
**Replies:** 11\
**Last updated:** [October 29, 2024, 3:35pm UTC](https://community.apollographql.com/t/subscription-with-appsync-needs-update-requestbodycreator-after-token-expiration/7781 "2024-10-29T15:35:24Z")

</div>

I’m using subscriptions with AppSync, so i need to override the requestBodyCreator parameters to make it work with AppSync. AppSync’s server protocol is graphql-ws and the payload using Amazon Cognito user pools is the …

---

## [Getting response nil](https://community.apollographql.com/t/getting-response-nil/7903)

<div class="topic-metadata">

**Author:** [@ankit\_shelar](https://community.apollographql.com/u/ankit_shelar)\
**Replies:** 3\
**Last updated:** [October 24, 2024, 12:38pm UTC](https://community.apollographql.com/t/getting-response-nil/7903 "2024-10-24T12:38:34Z")

</div>

I am getting response has nil but getting success in result in iOS below is the code please help final class NetworkLoggerInterceptor: ApolloInterceptor { public var id: String = UUID().uuidString func interceptAsync\<O…

---

## [Apollo iOS - fragments on tags - used across model objects causes namespace collisions?](https://community.apollographql.com/t/apollo-ios-fragments-on-tags-used-across-model-objects-causes-namespace-collisions/7898)

<div class="topic-metadata">

**Author:** [@vade](https://community.apollographql.com/u/vade)\
**Replies:** 2\
**Last updated:** [October 17, 2024, 3:53am UTC](https://community.apollographql.com/t/apollo-ios-fragments-on-tags-used-across-model-objects-causes-namespace-collisions/7898 "2024-10-17T03:53:41Z")

</div>

Hello On my GQL server, we have various model objects, let’s call them Foo and Bar. Both foo and bar have a field called tags which resolve to the same server side Tags model. So in theory, I can make queries like foo…

[Next page](https://community.apollographql.com/tag/ios/12.md?match_all_tags=true&page=1&tags%5B%5D=ios)
