Swiftpack.co - Swift Packages by apollographql

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.

Packages published by apollographql

apollographql/apollo-ios v0.3.0
📱  A strongly-typed, caching GraphQL client for iOS, written in Swift.
⭐️ 3,832
🕓 8 hours ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
1.10.0
1 week ago
### New - **Added support for visionOS ([#3320](https://github.com/apollographql/apollo-ios/issues/3320)):** All the dependecies that Apollo iOS requires have been updated to add support for visionOS, so we can now add official support for visionOS too. See PR [#333](https://github.com/apollographql/apollo-ios-dev/pull/333). ### Improvement - **Add Sendable conformance to some basic SchemaTypes:** This adds `Sendable` conformance to the some of the generated schema types. This does not mean that all of the generated code is safe to use yet with complete concurrency checking of Swift 5.10 but it gets us closer to that goal. See PR [#322](https://github.com/apollographql/apollo-ios-dev/pull/322). _Thanks to [@bdbergeron](https://github.com/bdbergeron) for the contributon._
preview-defer.2
3 weeks ago
This is the second preview release of `@defer` support in Apollo iOS which focuses on providing early access to using the `@defer` directive in your operations. During preview releases bugs can occur, if you do experience anything unexpected please report it to us. **Note:** Apollo supports a very specific version of the `@defer` directive proposal as documented [here](https://www.apollographql.com/docs/router/executing-operations/defer-support#specification-status). The `@defer` directive is still in the proposal stage and is not an official addition to the [GraphQL specification](https://spec.graphql.org/draft/) yet. This means that Apollo iOS may not work with all servers that currently support `@defer`. ### In this release * Fixed: If your schema explicitly declared the `@defer` directive then an error about duplicate directives would be thrown during code generation. * Fixed: In some cases the operation metadata for deferred fragments may have been generated with incorrect Swift syntax resulting in a build error. ### How to use it We have a [sample schema/server that supports `@defer`](https://github.com/apollographql/client-router-e2e-tests/tree/main) and can be launched using the [Docker configuration](https://github.com/apollographql/client-router-e2e-tests/blob/main/scripts/docker-compose.router.yml). Once you have that service launched you can configure your Apollo iOS client to target the `apollo-ios` and `apollo-ios-codegen` dependency packages using the `preview-defer.2` tag. Below is an example query using `@defer` against the schema. ``` query ExampleQuery { allProducts { sku id ... on Product @defer(label: "additional") { dimensions { size } variation { id name } } } } ``` Alternatively [here](https://github.com/apollographql/apollo-ios/files/13845848/DeferExampleClient.zip) is a sample client to demonstrate the code generation and operation execution of the `@defer` directive. **Caveats in this preview release** * Caching is intentionally disabled for operations using `@defer`.
1.9.3
4 weeks ago
### Fixed - **Fix injecting of context for UploadRequest:** Any request context passed into an upload request was not being added to the HTTP request and would not be available to the interceptor chain. See PR ([#302](https://github.com/apollographql/apollo-ios-dev/pull/302)). _Thanks to [@RobertDresler](https://github.com/RobertDresler) for the contribution._ - **Added support for SPM Package.resolved format version 3 ([#3355](https://github.com/apollographql/apollo-ios/issues/3355)):** When using Xcode 15.3 the codegen CLI would fail the `generate` command with an error stating the Package.resolve file version is unsupported. Version 3 is now accepted as a valid file format for the codegen version checker. See PR ([#304](https://github.com/apollographql/apollo-ios-dev/pull/304)). - **PrivacyInfo.xcprivacy file is invalid for Apollo and ApolloApi ([#3359](https://github.com/apollographql/apollo-ios/issues/3359)):** We received reports that when submitting to the App Store the submission would fail with an error stating that the privacy manifests were invalid. We identified the error and updated the privacy files. See PR ([#309](https://github.com/apollographql/apollo-ios-dev/pull/309)). _Thanks to [@azilbershtein](https://github.com/azilbershtein) for raising the issue._ ### Improvement - **Provide a direct means to observe changes in ApolloStore:** `ApolloStore` now exposes it's subscriber mechanism publicly. This means you can now observe and receive notifications about changes to the store. See PR ([#300](https://github.com/apollographql/apollo-ios-dev/pull/300)). _Thanks to [@jamesonwilliams](https://github.com/jamesonwilliams) for the contribution._ - **Remove redundant iteration in EntitySelectionTree merging algorithm:** The conditions for merging selections were revisited and we identified, and removed, a redundant iteration. This is a significant performance improvement as it removes an entire additional iteration through all the conditional scopes in the tree. See PR ([#308](https://github.com/apollographql/apollo-ios-dev/pull/308)).
1.9.2
6 weeks ago
Alongside the release of Apollo iOS 1.9.2, we are excited to announce the release of [Apollo iOS Pagination](https://github.com/apollographql/apollo-ios-pagination)! This package works alongside the Apollo iOS Client to make fetching and caching of paginated data a lot easier! Fetching paginated data has always been a pain point with our mobile clients, and an elegant solution for this has been a common feature request for many years. This library is feature rich and highly configurable, so we believe that it will be able to make this previously complex and difficult task a lot easier for our users! This library supports: - Reading/Writing paginated data with an Apollo NormalizedCache - Watching paginated data for changes - Forward, Reverse, and Bi-directional pagination - Cursor-based, offset-based, and custom pagination mechanisms This library is currently released as a 0.x version and is in active development. The API is subject to breaking changes until the stable 1.0 release. We hope that you will check it out and give us your feedback so that we can address any API improvements, edge cases, bugs, or valuable features we hadn’t considered before moving to a 1.0 release soon! To learn more about Apollo iOS Pagination, see our [usage docs](https://www.apollographql.com/docs/ios/pagination/introduction). ### Fixed - **Backwards Compatibility issues in 1.9.1:** 1.9.1 introduced a minor breaking change for some users who were creating a custom implementaiton of `ApolloClientProtocol`. Sorry about that! This patch release fixed the compatiblity. See PR [#290](https://github.com/apollographql/apollo-ios-dev/pull/290). _Thanks to [@michaelloo](https://github.com/michaelloo) for raising the issue._ ### Improvement - **Session and task descriptions parameters added to `URLSessionClient` ([#286](https://github.com/apollographql/apollo-ios-dev/pull/286)):** The `URLSessionClient` now allows you to set a `sessionDescription` on the session and `taskDescription` on each task. These are helpful when debugging, especially when analyzing HTTP traffic with Instruments. _Thanks to [@hishma](https://github.com/hishma) for the contribution._
1.9.1
7 weeks ago
### Fixed - **`SelectionSet` generated initializers don't compile with `self` parameter ([#3330](https://github.com/apollographql/apollo-ios/issues/3330)):** Selection set initializers now use a local property name when the external property name is a Swift reserved word; see PR [#257](https://github.com/apollographql/apollo-ios-dev/pull/257). _Thanks to [@grantjbutler](https://github.com/grantjbutler) for raising the issue._ - **asXXXXXXX property on a union never returning `nil` if selection set empty ([#3326](https://github.com/apollographql/apollo-ios/issues/3326)):** - The codegen logic to determine whether a selection set is composite or not has been improved to handle the case when `__typename` was the only field in the selection set; see PR [#261](https://github.com/apollographql/apollo-ios-dev/pull/261). _Thanks to [@vincentisambart](https://github.com/vincentisambart) for raising the issue._ ### Improvement - **Feature/ContextIdentifier for the mutate queries ([#281](https://github.com/apollographql/apollo-ios-dev/pull/281)):** Mutation operations can now be given a context identifier to be used later in the request. _Thanks to [@VladimirK-ah](https://github.com/VladimirK-ah) for the contribution._
1.9.0
11 weeks ago
### Improvement - **New import directive for operations:** GraphQL operations now support a directive to control custom module import statements in the generated file. Any operation that includes the directive `@import(module:)`, on the defintion line, with a supplied `String` as the module name will have that module used in a Swift `import` statement at the top of the operation file and any referenced fragments. _Thank you to [@hemel](https://github.com/hemel) for the contribution ([#236](https://github.com/apollographql/apollo-ios-dev/pull/236) / [#245](https://github.com/apollographql/apollo-ios-dev/pull/245))._ ### Fixed - **The `fragmentDefinition` remains in all generated fragments when `operationDocumentFormat` does not include `.definition` ([#3282](https://github.com/apollographql/apollo-ios/issues/3282)):** Code generation will now only generate definitions in fragment files if the `operationDocumentFormat` config contains the `.definition` value ([#218](https://github.com/apollographql/apollo-ios-dev/pull/218)). _Thank you to [@jimisaacs](https://github.com/jimisaacs) for raising the issue._ - **Custom scalar file header comment ([#3323](https://github.com/apollographql/apollo-ios/issues/3323)):** The header comment for generated custom scalar files was incorrectly changed to state that the output "should not be edited" but the file content could still be edited and would not be overwritten. The header comment has been changed back to state that the contents will be preserved during subsequent codegen executions. _Thank you to [@matsudamper](https://github.com/matsudamper) for raising the issue and the contribution to fix it ([#243](https://github.com/apollographql/apollo-ios-dev/pull/243))._ ### Changed - **WebSocket disconnection errors are no longer printed to stdout ([#3325](https://github.com/apollographql/apollo-ios/issues/3325)):** See PR ([#253](https://github.com/apollographql/apollo-ios-dev/pull/253)) _Thank you to [@sgade](https://github.com/sgade) for raising the issue._
1.8.0
14 weeks ago
### Fixed - **Duplicate `@defer` directive error ([#235](https://github.com/apollographql/apollo-ios-dev/pull/235)):** When executing codegen against Apollo Router and a schema that supports the `@defer` directive it would fail with an error stating the directive is duplicated. ### Changed - **InstallCLI plugin updates ([#132](https://github.com/apollographql/apollo-ios-dev/pull/132)):** The InstallCLI plugin now downloads the CLI binary from GitHub. This requires that we update the `swift-tools-version` to `5.9`, therefore **Xcode 15 is now the minimum version of Xcode allowed.** ### Improvement - **Added `InputObject` casing strategy ([#137](https://github.com/apollographql/apollo-ios-dev/pull/137)):** We've added a new casing strategy option for InputObjects which mimics the behaviour of the enum case conversion strategy. _Thank you to [@alexifrim](https://github.com/alexifrim) for raising this in issue [#3257](https://github.com/apollographql/apollo-ios/issues/3257)._ - **Added `GraphQLResult` conversion extension ([#139](https://github.com/apollographql/apollo-ios-dev/pull/139)):** `GraphQLResult` response data can now be easily converted into a JSON dictionary. This is useful for taking server response data and serializing it into a JSON dictionary which can then be used in a test suite. - **Codegen performance improvements ([#152](https://github.com/apollographql/apollo-ios-dev/pull/152)):** There has been a bunch of refactoring work to prepare for future codegen features but we've also managed to squeeze out some performance improvements.
preview-defer.1
15 weeks ago
This is the first preview release of `@defer` support in Apollo iOS which focuses on providing early access to using the `@defer` directive in your operations. During preview releases bugs can occur, if you do experience anything unexpected please report it to us. **Note:** Apollo supports a very specific early RFC version of the `@defer` directive as documented [here](https://www.apollographql.com/docs/router/executing-operations/defer-support#specification-status). The `@defer` directive is still an RFC and is not an official addition to the [GraphQL specification](https://spec.graphql.org/draft/) yet. This means that Apollo iOS may not work with all servers that currently support `@defer`. **How to use it** We have a [sample schema/server that supports `@defer`](https://github.com/apollographql/client-router-e2e-tests/tree/main) and can be launched using the [Docker configuration](https://github.com/apollographql/client-router-e2e-tests/blob/main/scripts/docker-compose.router.yml). Once you have that service launched you can configure your Apollo iOS client to target the `apollo-ios` and `apollo-ios-codegen` dependency packages using the `preview-defer.1` tag. Below is an example query using `@defer` against the schema. ``` query ExampleQuery { allProducts { sku id ... on Product @defer(label: "additional") { dimensions { size } variation { id name } } } } ``` Alternatively [here](https://github.com/apollographql/apollo-ios/files/13845848/DeferExampleClient.zip) is a sample client to demonstrate the code generation and operation execution of the `@defer` directive. **Caveats in this preview release** * Caching is intentionally disabled for operations using `@defer`.
1.7.1
23 weeks ago
### Fixed - **Fixed inconsistent ordering of fragments in generated operation definitions ([#130](https://github.com/apollographql/apollo-ios-dev/pull/130)):** In order to make the ordering of fragments consistent, they are now alphabetized. This is a change to the data that gets sent over the wire when making a network request for an operation with fragments. **[Persisted Queries](https://www.apollographql.com/docs/ios/fetching/persisted-queries) users should re-register their queries when upgrading to this version.** _Thank you to [@scottasoutherland](https://github.com/scottasoutherland) for reporting the issue._ ### Improvement - **Add initializer for `SelectionSet` that takes a `[String: Any]` JSON object ([#102](https://github.com/apollographql/apollo-ios-dev/pull/102)):** _Thank you to [@Cookiezby](https://github.com/Cookiezby) for the contribution._
1.7.0
25 weeks ago
**`ApolloCodegenLib` Now Uses Swift Concurrency** To improve the performance of the code generation, the `ApolloCodegenLib` now uses `async/await`. Code generation is now parallelized and should complete much faster for users with a large number of GraphQL files. This means that the entry point function, `ApolloCodegen.build(with configuration:)` is now an `async` function. For users using the `ApolloCodegenLib` directly, you will need to make your call sites into this function use `async/await`. In most cases, this requires minimal code changes. Please see the [1.7.0 migration guide](https://www.apollographql.com/docs/ios/migrations/1.7) for information on how to upgrade. See PR [#57](https://github.com/apollographql/apollo-ios-dev/pull/57). ### Fixed - **Fixed a bug with ApolloAPI.Object clashing with custom objects name Object ([#94](https://github.com/apollographql/apollo-ios-dev/pull/94)):** _Thank you to [215eight](https://github.com/215eight) for reporting the issue._
iOS macOS watchOS tvOS

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics