Skip to content

Commit

Permalink
Prepare beta 3 release (#2474)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyMDev committed Aug 29, 2022
1 parent b632373 commit 894de85
Show file tree
Hide file tree
Showing 37 changed files with 1,543 additions and 1,417 deletions.
23 changes: 22 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Change Log

## v1.0.0-beta.3

This is the third Beta Release of Apollo iOS 1.0. The Beta version has full feature parity with the 0.x.x releases. The API is expected to be mostly stable. Some breaking changes may occur due to user feedback prior to General Availability (GA) Release. The Beta does not have complete documentation or usage guides, which will be completed prior to GA.

This first major version will include a new code generation engine, better generated models, and many syntax and performance improvements across the entire library. The primary goal of Apollo iOS 1.0 is to stabilize the API of the model layer and provide a foundation for future feature additions and evolution of the library.

**Breaking: Changed the generated Schema files**
* The schema will now have two generated files, `SchemaMetadata.swift` and `SchemaConfiguration.swift.`
* We wanted to more clearly separate the parts of the schema that are generated for you (metadata) from the parts that you can configure yourself (configuration).
* **If you were using the last beta, you’ll need to move your cache key resolution logic into `SchemaConfiguration.swift`. You should also delete the old generated files.*
* *We will be implementing automatic deletion of generated files that should no longer be part of your project in a future beta, so you won't need to delete those files manually anymore.*
**New: Added SPM Plugin for Code Generation CLI**
* When including Apollo iOS via Swift Package Manager, the Code Generation CLI is now accessible as an SPM Plugin.
* After installing the `apollo-ios` package, run `swift package --disable-sandbox apollo-initialize-codegen-config` to create the codegen configuration file.
* Then you can run `swift package --disable-sandbox apollo-generate` to run code generation.
* The `--disable-sandbox` or `--allow-writing-to-directory .` arguments must be used when running the Code Generation CLI via the SPM plugin to give the plugin permission to write the generated files to the output directory configured in your codegen configuration file.
**Fixed: Compilation errors when schema types had lowercase names**
**Fixed: Codegen engine crashing in specific situations**
* There were some bugs in the codegen compiler when merging nested fragments with non-matching parent types and using default values for input object list fields.
**Fixed: Issues with websocket reconnections** Thanks [@STomperi](https://github.com/STomperi) for the fix!

## v1.0.0-beta.2

This is the second Beta Release of Apollo iOS 1.0. The Beta version has full feature parity with the 0.x.x releases. The API is expected to be mostly stable. Some breaking changes may occur due to user feedback prior to General Availability (GA) Release. The Beta does not have complete documentation or usage guides, which will be completed prior to GA.
Expand All @@ -9,7 +30,7 @@ This first major version will include a new code generation engine, better gener
**Breaking: Changed API for Cache Key Configuration:** Cache Key Resolution is now easier to configure. See `CacheKeyInfo` for examples and documentation.
**Breaking: Changed API for generated Schema Types to support dynamic types** The API for generated schema types now initializes instances of `Object`, `Interface`, and `Union` for each corresponding type in your schema. These are still generated by the code generation engine. This differs from the previous API which generated static types that were subclasses of `Object`, `Interface`, and `Union`. The change provides the API to support the future addition of dynamic types added to your schema at runtime.
**New: Codegen CLI will now automatically create output directories:** You no longer are required to have already created all intermediary directories for your codegen output paths prior to running code generation.
**New: CodegenCLI is built locally with CocoaPods installations:** This is to ensure that the version of the Codegen CLI is the same as ApolloCodegenLib. This behaviour will be extended to Swift Package Manager installations too.
**New: Codegen CLI is built locally with CocoaPods installations:** This is to ensure that the version of the Codegen CLI is the same as ApolloCodegenLib. This behaviour will be extended to Swift Package Manager installations too.
**New: Swift Keywords are escaped when used as names of fields or types in generated objects:** Previously, using Swift keywords (eg. `self`, `protocol`, `Type`) as the names of fields in your operations or types in your schema would cause compilation errors in your generated code. Now, these names will be escaped with backticks to prevent compiler errors. **The names `\_\_data` and `fragments` cannot be used as field names as they conflict with Apollo's generated object APIs** Using these names will result in a validation error being thrown when attempting to run the code generation engine.
**Fixed: Fragments with lowercase names caused compilation errors:** This bug is fixed. Fragments with lowercase names will be correctly uppercased when referencing the generated `Fragment` objects.
**Fixed: Build errors in Xcode 14/Swift 5.7:** The library was updated to support the Swift 5.7 language version. Swift 5.6 is still supported.
Expand Down
2 changes: 1 addition & 1 deletion Configuration/Shared/Project-Version.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CURRENT_PROJECT_VERSION = 1.0.0-beta.2
CURRENT_PROJECT_VERSION = 1.0.0-beta.3
2 changes: 1 addition & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ These are the three guiding principles we aim for in each major release:

## 1.0 - _In Beta release phase_

[Beta 2 is available](https://github.com/apollographql/apollo-ios/releases/tag/1.0.0-beta.2), please try it and give us your feedback.
[Beta 3 is available](https://github.com/apollographql/apollo-ios/releases/tag/1.0.0-beta.3), please try it and give us your feedback.

These are the major initiatives planned for 1.0/1.x:

Expand Down
2 changes: 1 addition & 1 deletion Sources/AnimalKingdomAPI/AnimalKingdomAPI/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let package = Package(
.library(name: "AnimalKingdomAPI", targets: ["AnimalKingdomAPI"]),
],
dependencies: [
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.2"),
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.3"),
],
targets: [
.target(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct SwiftPackageManagerModuleTemplate: TemplateRenderer {
.library(name: "\(casedModuleName)", targets: ["\(casedModuleName)"]),
],
dependencies: [
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.2"),
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.3"),
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion Sources/GitHubAPI/GitHubAPI/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let package = Package(
.library(name: "GitHubAPI", targets: ["GitHubAPI"]),
],
dependencies: [
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.2"),
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.3"),
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion Sources/StarWarsAPI/StarWarsAPI/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let package = Package(
.library(name: "StarWarsAPI", targets: ["StarWarsAPI"]),
],
dependencies: [
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.2"),
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.3"),
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion Sources/SubscriptionAPI/SubscriptionAPI/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let package = Package(
.library(name: "SubscriptionAPI", targets: ["SubscriptionAPI"]),
],
dependencies: [
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.2"),
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.3"),
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion Sources/UploadAPI/UploadAPI/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let package = Package(
.library(name: "UploadAPI", targets: ["UploadAPI"]),
],
dependencies: [
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.2"),
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.3"),
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion Sources/apollo-ios-cli/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ struct Apollo_iOS_CLI: ParsableCommand {
static var configuration = CommandConfiguration(
commandName: "apollo-ios-cli",
abstract: "A command line utility for Apollo iOS code generation.",
version: "1.0.0-beta.2",
version: "1.0.0-beta.3",
subcommands: [
CodegenCLI.Initialize.self,
CodegenCLI.Generate.self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class SwiftPackageManagerModuleTemplateTests: XCTestCase {

let expected = """
dependencies: [
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.2"),
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.3"),
],
"""
// when
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let package = Package(
.library(name: "GraphQLSchemaName", targets: ["GraphQLSchemaName"]),
],
dependencies: [
.package(name: "apollo-ios", path: "../../.."),
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.3"),
],
targets: [
.target(
Expand Down
43 changes: 0 additions & 43 deletions docs/docc/Apollo.doccarchive/data/documentation/apollo.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@
{
"identifiers" : [
"doc:\/\/Apollo\/documentation\/Apollo\/CacheKey",
"doc:\/\/Apollo\/documentation\/Apollo\/CacheKeyForObject",
"doc:\/\/Apollo\/documentation\/Apollo\/DidChangeKeysFunc",
"doc:\/\/Apollo\/documentation\/Apollo\/GraphQLResultHandler"
],
Expand Down Expand Up @@ -506,48 +505,6 @@
"type" : "topic",
"url" : "\/documentation\/apollo\/cachekey"
},
"doc://Apollo/documentation/Apollo/CacheKeyForObject": {
"abstract" : [
{
"text" : "A function that returns a cache key for a particular result object. If it returns ",
"type" : "text"
},
{
"code" : "nil",
"type" : "codeVoice"
},
{
"text" : ", a default cache key based on the field path will be used.",
"type" : "text"
}
],
"fragments" : [
{
"kind" : "keyword",
"text" : "typealias"
},
{
"kind" : "text",
"text" : " "
},
{
"kind" : "identifier",
"text" : "CacheKeyForObject"
}
],
"identifier" : "doc:\/\/Apollo\/documentation\/Apollo\/CacheKeyForObject",
"kind" : "symbol",
"navigatorTitle" : [
{
"kind" : "identifier",
"text" : "CacheKeyForObject"
}
],
"role" : "symbol",
"title" : "CacheKeyForObject",
"type" : "topic",
"url" : "\/documentation\/apollo\/cachekeyforobject"
},
"doc://Apollo/documentation/Apollo/CachePolicy": {
"abstract" : [
{
Expand Down

This file was deleted.

Loading

0 comments on commit 894de85

Please sign in to comment.