Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ApolloSQLite and ApolloWebSockets to Package.swift #674

Merged
merged 2 commits into from
Aug 9, 2019

Conversation

noahemmet
Copy link
Contributor

This exposes the ApolloSQLite and ApolloWebSockets sub-frameworks to clients.

This comes after I tried to set up disk-caching and realized SQLiteNormalizedCache wasn't available for use in SPM, although it was for Carthage and Cocoapods. I also included ApolloWebSockets since it seemed to be in the same situation.

Copy link
Contributor

@designatednerd designatednerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I was literally about to put this on my checklist for this week.

Package.swift Outdated Show resolved Hide resolved
@noahemmet
Copy link
Contributor Author

Would you mind (if you haven't already) checking that this builds and compiles generated code? I should have mentioned this in the description, but I uh forgot 😬 :

I was unable to verify that this works, cause I was having problems using the code gen with my weird Swift backend. I got to a certain point and started running into some name clashing errors. Hold off on merging one minute, lemme pull up the branch.

@noahemmet
Copy link
Contributor Author

noahemmet commented Jul 28, 2019

Here it is, it's a runtime error in ApolloStore.ReadTransaction:

failed to demangle witness for associated type 'FinalResult' in conformance 'Apollo.Zip2Accumulator<Apollo.GraphQLSelectionSetMapper<Views.MainTabBarQuery.Data>, Apollo.GraphQLDependencyTracker>: GraphQLResultAccumulator' from mangled name '11FinalResult6Apollo24GraphQLResultAccumulatorPQz_AaDQy_t'

I assumed it was just an issue with my setup and didn't pursue it further, and then forgot I had put up the PR. I'm wondering now if it could also be an SPM issue, but I don't have a handy schema to test with. Sorry to push untested work, it was real late! 😦

@designatednerd
Copy link
Contributor

OK - I'll take a look tomorrow! I'm gonna mark this as changes requested so I don't accidentally merge it

Copy link
Contributor

@designatednerd designatednerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to make sure this is building properly

@designatednerd
Copy link
Contributor

Gonna take another swing through this for 0.15.0 - would love to make sure this is building properly with SPM before I move to 🇺🇸in a couple weeks.

@designatednerd designatednerd added this to the 0.15.0 milestone Aug 7, 2019
@designatednerd
Copy link
Contributor

OK! I was able to confirm this is working in Xcode 11b5 with the attached dummy project - run it and you'll see both web sockets and sqlite working nicely!

SPMTest2.zip

@designatednerd designatednerd merged commit b719f5a into apollographql:master Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants