To improve network performance with GraphQL, it would really be nice to have the option to enable APQ in the iOS ApolloClient. On Android this feature is already implemented like this:
ApolloClient.builder()
/* ... */
.enableAutoPersistedQueries(true)
/* ... */
.build()
Hi, I'm actively working on this.
Better merge #572 first, as it will need useGetMethodForPersistedQueries for APQs with Couldflare support.
I hacked together really super basic support for APQ today on this branch here (It is pointing to my forked master branch though): https://github.com/SirensOfTitan/apollo-ios/tree/sirensoftitan/jun-28/apq
I didn't build subscription support yet, and haven't added GET support for queries yet. I essentially just created an APQNetworkTransport that wraps another network transport and handles persisted queries. I could probably just not use CryptoSwift and use CommonCrypto instead for sha256 hashes.
My feeling after adding this is that a lot of this stuff is starting to feel a bit busy. It might be getting to the point where an ApolloLink kind-of abstraction for iOS would be really valuable.
@SirensOfTitan a branch that supports GET method is already merged. What do you think of updating your branch to continue your work?
It would be great to have persisted queries.
I plan on working more on this today, so hopefully I’ll get to something I find PR worthy today! I’ll check back in soon.
Sent from ProtonMail Mobile
On Sun, Jun 30, 2019 at 3:19 PM, dmandarino notifications@github.com wrote:
@SirensOfTitan a branch that supports GET method is already merged. What do you think of updating your branch to continue your work?
It would be great to have persisted queries.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
Ops. Actually I was testing it for weeks, anyway I made a PR too #608
It supports fetchOption and also useGetMethodWithPersistedQueries which sync up the changes on Android project for CDN support.
Please see if it's useful for you.
This support shipped with 0.17.0! I missed this issue when I was closing everything else out. Please file a new issue if there's anything not working correctly with this.
Most helpful comment
Hi, I'm actively working on this.