A strongly-typed, caching GraphQL client for iOS, written in Swift.
Questions tagged [apollo-ios]
32 questions
7
votes
1 answer
Error xcodebuild NSFileHandle couldn't write. Exception: *** -[_NSStdIOFileHandle writeData:]: Broken pipe while generate Apollo GraphQL API
Helpppp ! I just want to get my pipeline run successfully T.T Anyone can help me here~
Situation: I am integrating Apollo client in my iOS project and following the instruction provided by official Apollo -…

janice chau
- 475
- 1
- 3
- 13
7
votes
3 answers
How to implement graphql subscription using apollo ios client
I am trying to implement graphql subscription using apollo ios client. But not able to figure it out as lack of documentation examples.
Example given on apollo documentation is:
let apollo: ApolloClient = {
let configuration =…

Rajesh Ujade
- 2,715
- 19
- 39
4
votes
0 answers
Apollo iOS GraphQL Subscription Error: "Invalid HTTP upgrade"
I'm trying to get a GraphQL subscription from SoundtrackYourBrand working within my iOS app. The queries/mutations work fine but when I use the web socket I get either error 400 or 403 ("Invalid HTTP upgrade") or 1011 (no message) depending on how…

Jack Vanderpump
- 216
- 2
- 16
4
votes
2 answers
Error in "Loading schema for Unnamed Project" while integrating apollo ios client
I am trying to integrate apollo iOS client and after doing all steps I am getting the error while running build phase script.
so there are three errors in total.
one is
Error initializing Apollo GraphQL project "Unnamed Project".
Error: Error in…

M Faheem Rajput
- 768
- 2
- 9
- 27
4
votes
3 answers
Apollo-IOS build error "Command PhaseScriptExecution failed with a nonzero exit code"
I'm trying to build a sample Apollo-IOS on Xcode 10. I have followed all the step describe in the docs:
Apolo-IOS getting started
There is an error as bellow
++ npx --no-install apollo codegen:generate --queries=./GraphQL/Queries.graphql…

Lê Khánh Vinh
- 2,591
- 5
- 31
- 77
3
votes
1 answer
'SchemaMetadata' is not a member type of type 'Self.Schema'
I'm working in xcode project (xcode --version 14 && swift --version 5.7) and build an apollo client project in which after generating query.graphql file I'm getting this error in Schema Package which is generated after executing following…

Abhishek Singh
- 33
- 3
3
votes
3 answers
Exclude a swift file from XCode code coverage
I am using Apollo SDK, which generates an API.swift file. Can we exclude this file from the code coverage

UdayM
- 1,725
- 16
- 34
3
votes
1 answer
Subscription Failure Error WSError(type: Starscream.ErrorType.upgradeError message: \"Invalid HTTP upgrade\", code: 400)?
I need to integrate subscription in my iOS app. The subscription works fine on localhost in graphiql. I have deployed my backend on Heroku. I am using apollo-server and not hasura. My subscriptions are not working for the url given by Heroku but it…

BraveEvidence
- 53
- 11
- 45
- 119
3
votes
1 answer
How to correctly use Apollo GraphQL on iOS with background session configuration?
I use Apollo iOS 0.8 with Xcode 9.3, Swift 4.1 and iOS 11, and initialise Apollo client instance like this:
import Apollo
// ... unrelated code skipped
let configuration = URLSessionConfiguration.default
if let token = keychain.accessToken {
//…

Max Desiatov
- 5,087
- 3
- 48
- 56
2
votes
1 answer
How to Make Apollo Client iOS Accept Self-Signed Certificates
How does one make ApolloClient accept self-signed certificates? We are using it for internal apps, and calls to the GraphQL endpoints are failing because of the certification issues. I found this thread in the repository issues, but it seems that…

Sean McMains
- 57,907
- 13
- 47
- 54
2
votes
1 answer
Apollo GraphQL iOS
I add this run script on my swift3 project
APOLLO_FRAMEWORK_PATH="$(eval find $FRAMEWORK_SEARCH_PATHS -name "Apollo.framework" -maxdepth 1)"
if [ -z "$APOLLO_FRAMEWORK_PATH" ]; then
echo "error: Couldn't find Apollo.framework in…

Luigi Marino
- 139
- 6
2
votes
1 answer
Is it possible to share the Apollo cache in React Native and iOS/Android?
If I build an app that has both React Native and native (iOS/Android) views, is it possible to make Apollo use a single unified cache to store the normalized data? This would be extremely useful to make sure the data is consistent across views, and…

helfer
- 7,042
- 1
- 20
- 20
2
votes
1 answer
Automatic UI updates with Apollo in Swift not working
I have the following setup for a small Apollo iOS app where I display a list of conferences in a table view and want to be able to add a conference to the list:
GraphQL:
query AllConferences {
allConferences {
...ConferenceDetails
…

nburk
- 22,409
- 18
- 87
- 132
1
vote
0 answers
iOS/Xcode 14, Apollo Upgrade from 0.40.0 to 1.0.7 - Swift Package Manager
I have an existing project using an old Apollo build(0.4.0) w/cocoapods and am trying to upgrade to 1.0.7. I followed all the steps here:
https://www.apollographql.com/docs/ios/migrations/1.0/#breaking-changes
using the 'SPM With Xcode project' set…

cspam
- 2,911
- 2
- 23
- 41
1
vote
1 answer
Constant sessionInvalidated on Apollo iOS
I am looking to add GraphQL to our current iOS app. Every time I make a request, it fails with a "sessionInvalidated" message.
I have followed along with the getting started documentation, and followed along with the Advanced Networking…

Preston Howell
- 78
- 8